Skip to content

Commit

Permalink
Initial 1.13.2 update. Major thing to note is that Dimensions have be…
Browse files Browse the repository at this point in the history
…en completely revamped.

DimensionType is not unique per Dimension. See DimensionManager for more details.
Vanilla now has a chunk loading system, so Forge's will need to be deprecated/adapted.
  • Loading branch information
LexManos committed Feb 14, 2019
1 parent 9a16885 commit ca72710
Show file tree
Hide file tree
Showing 361 changed files with 3,150 additions and 3,531 deletions.
10 changes: 5 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
buildscript {
repositories {
//mavenLocal()
mavenLocal()
maven { url = 'https://files.minecraftforge.net/maven' }
jcenter()
mavenCentral()
Expand Down Expand Up @@ -45,8 +45,8 @@ ext {
}
MAPPING_CHANNEL = 'snapshot'
MAPPING_VERSION = '20180921-1.13'
MC_VERSION = '1.13'
MCP_VERSION = '2018.09.12.04.11.00'
MC_VERSION = '1.13.2'
MCP_VERSION = '20190213.203750'
}

project(':mcp') {
Expand Down Expand Up @@ -75,7 +75,7 @@ project(':clean') {
mkdir 'runclient'
}
classpath sourceSets.main.runtimeClasspath
args = ['--accessToken', '0', '--version', '1.13']
args = ['--accessToken', '0', '--version', MC_VERSION]
main 'net.minecraft.client.main.Main'
workingDir 'runclient'
}
Expand Down Expand Up @@ -140,7 +140,7 @@ project(':forge') {
}

ext {
SPEC_VERSION = '24.0' // This is overwritten by git tag, but here so dev time doesnt explode
SPEC_VERSION = '25.0' // This is overwritten by git tag, but here so dev time doesnt explode
// The new versioning sceme is <MCVersion>-<ForgeMC>.<RB>.<CommitsSinceRB>
// ForgeMC is a unique identifier for every MC version we have supported.
// Essentially, the same as the old, except dropping the first number, and the builds are no longer unique.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
boolean flag1 = advancementprogress.func_192105_a();
@@ -186,6 +188,7 @@
if (p_192750_1_.func_192068_c() != null && p_192750_1_.func_192068_c().func_193220_i() && this.field_192762_j.field_70170_p.func_82736_K().func_82766_b("announceAdvancements")) {
this.field_192756_d.func_184103_al().func_148539_a(new TextComponentTranslation("chat.type.advancement." + p_192750_1_.func_192068_c().func_192291_d().func_192307_a(), new Object[]{this.field_192762_j.func_145748_c_(), p_192750_1_.func_193123_j()}));
this.field_192756_d.func_184103_al().func_148539_a(new TextComponentTranslation("chat.type.advancement." + p_192750_1_.func_192068_c().func_192291_d().func_192307_a(), this.field_192762_j.func_145748_c_(), p_192750_1_.func_193123_j()));
}
+ net.minecraftforge.common.ForgeHooks.onAdvancement(this.field_192762_j, p_192750_1_);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
--- a/net/minecraft/advancements/criterion/ItemPredicate.java
+++ b/net/minecraft/advancements/criterion/ItemPredicate.java
@@ -23,6 +23,8 @@
import net.minecraft.util.ResourceLocation;
@@ -24,6 +24,8 @@
import net.minecraft.util.registry.IRegistry;

public class ItemPredicate {
+ private static final Map<ResourceLocation, java.util.function.Function<JsonObject, ItemPredicate>> custom_predicates = new java.util.HashMap<>();
+ private static final Map<ResourceLocation, java.util.function.Function<JsonObject, ItemPredicate>> unmod_predicates = java.util.Collections.unmodifiableMap(custom_predicates);
public static final ItemPredicate field_192495_a = new ItemPredicate();
@Nullable
private final Tag<Item> field_200018_b;
@@ -89,6 +91,11 @@
@@ -90,6 +92,11 @@
public static ItemPredicate func_192492_a(@Nullable JsonElement p_192492_0_) {
if (p_192492_0_ != null && !p_192492_0_.isJsonNull()) {
JsonObject jsonobject = JsonUtils.func_151210_l(p_192492_0_, "item");
Expand All @@ -21,7 +21,7 @@
MinMaxBounds.IntBound minmaxbounds$intbound = MinMaxBounds.IntBound.func_211344_a(jsonobject.get("count"));
MinMaxBounds.IntBound minmaxbounds$intbound1 = MinMaxBounds.IntBound.func_211344_a(jsonobject.get("durability"));
if (jsonobject.has("data")) {
@@ -180,6 +187,14 @@
@@ -181,6 +188,14 @@
}
}

Expand All @@ -34,5 +34,5 @@
+ }
+
public static class Builder {
private final List<EnchantmentPredicate> field_200312_a = Lists.<EnchantmentPredicate>newArrayList();
private final List<EnchantmentPredicate> field_200312_a = Lists.newArrayList();
@Nullable
62 changes: 29 additions & 33 deletions patches/minecraft/net/minecraft/block/Block.java.patch
Original file line number Diff line number Diff line change
@@ -1,23 +1,19 @@
--- a/net/minecraft/block/Block.java
+++ b/net/minecraft/block/Block.java
@@ -74,11 +74,13 @@
@@ -75,9 +75,10 @@
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

-public class Block implements IItemProvider {
+public class Block extends net.minecraftforge.registries.ForgeRegistryEntry<Block> implements IItemProvider, net.minecraftforge.common.extensions.IForgeBlock {
protected static final Logger field_196273_d = LogManager.getLogger();
private static final ResourceLocation field_176230_a = new ResourceLocation("air");
- public static final RegistryNamespacedDefaultedByKey<ResourceLocation, Block> field_149771_c = new RegistryNamespacedDefaultedByKey<ResourceLocation, Block>(field_176230_a);
- public static final ObjectIntIdentityMap<IBlockState> field_176229_d = new ObjectIntIdentityMap<IBlockState>();
+ @Deprecated //Forge: Do not use, use ForgeRegistries
+ public static final RegistryNamespacedDefaultedByKey<ResourceLocation, Block> field_149771_c = net.minecraftforge.registries.GameData.getWrapperDefaulted(Block.class);
- public static final ObjectIntIdentityMap<IBlockState> field_176229_d = new ObjectIntIdentityMap<>();
+ @Deprecated //Forge: Do not use, use GameRegistry
+ public static final ObjectIntIdentityMap<IBlockState> field_176229_d = net.minecraftforge.registries.GameData.getBlockStateIDMap();
private static final EnumFacing[] field_212556_a = new EnumFacing[]{EnumFacing.WEST, EnumFacing.EAST, EnumFacing.NORTH, EnumFacing.SOUTH, EnumFacing.DOWN, EnumFacing.UP};
protected final int field_149784_t;
protected final float field_149782_v;
protected final float field_149781_w;
@@ -316,7 +318,7 @@
@@ -298,7 +299,7 @@

@Deprecated
public boolean func_196253_a(IBlockState p_196253_1_, BlockItemUseContext p_196253_2_) {
Expand All @@ -26,7 +22,7 @@
}

@Deprecated
@@ -328,8 +330,9 @@
@@ -310,8 +311,9 @@
return this.field_149789_z;
}

Expand All @@ -37,7 +33,7 @@
}

@Deprecated
@@ -340,11 +343,11 @@
@@ -322,11 +324,11 @@
@Deprecated
@OnlyIn(Dist.CLIENT)
public int func_185484_c(IBlockState p_185484_1_, IWorldReader p_185484_2_, BlockPos p_185484_3_) {
Expand All @@ -51,7 +47,7 @@
} else {
return i;
}
@@ -486,8 +489,12 @@
@@ -468,8 +470,12 @@

@Deprecated
public void func_196243_a(IBlockState p_196243_1_, World p_196243_2_, BlockPos p_196243_3_, IBlockState p_196243_4_, boolean p_196243_5_) {
Expand All @@ -64,7 +60,7 @@
public int func_196264_a(IBlockState p_196264_1_, Random p_196264_2_) {
return 1;
}
@@ -502,30 +509,30 @@
@@ -484,30 +490,30 @@
if (f == -1.0F) {
return 0.0F;
} else {
Expand Down Expand Up @@ -109,15 +105,15 @@
float f = 0.5F;
double d0 = (double)(p_180635_0_.field_73012_v.nextFloat() * 0.5F) + 0.25D;
double d1 = (double)(p_180635_0_.field_73012_v.nextFloat() * 0.5F) + 0.25D;
@@ -547,6 +554,7 @@
@@ -529,6 +535,7 @@

}

+ @Deprecated //Forge: State sensitive version
public float func_149638_a() {
return this.field_149781_w;
}
@@ -561,7 +569,7 @@
@@ -543,7 +550,7 @@
}
}

Expand All @@ -126,7 +122,7 @@
}

public void func_180652_a(World p_180652_1_, BlockPos p_180652_2_, Explosion p_180652_3_) {
@@ -615,16 +623,22 @@
@@ -597,16 +604,22 @@
public void func_180657_a(World p_180657_1_, EntityPlayer p_180657_2_, BlockPos p_180657_3_, IBlockState p_180657_4_, @Nullable TileEntity p_180657_5_, ItemStack p_180657_6_) {
p_180657_2_.func_71029_a(StatList.field_188065_ae.func_199076_b(this));
p_180657_2_.func_71020_j(0.005F);
Expand All @@ -151,23 +147,23 @@
protected boolean func_149700_E() {
return this.func_176223_P().func_185917_h() && !this.func_149716_u();
}
@@ -681,6 +695,7 @@
@@ -663,6 +676,7 @@
p_176216_2_.field_70181_x = 0.0D;
}

+ @Deprecated // Forge: Use more sensitive version below: getPickBlock
public ItemStack func_185473_a(IBlockReader p_185473_1_, BlockPos p_185473_2_, IBlockState p_185473_3_) {
return new ItemStack(this);
}
@@ -755,6 +770,7 @@
@@ -737,6 +751,7 @@
}
}

+ @Deprecated //Forge: Use more sensitive version {@link IForgeBlockState#getSoundType(IWorldReader, BlockPos, Entity) }
public SoundType func_185467_w() {
return this.field_149762_H;
}
@@ -776,11 +792,11 @@
@@ -758,11 +773,11 @@
}

public static boolean func_196252_e(Block p_196252_0_) {
Expand All @@ -181,24 +177,24 @@
}

public static void func_149671_p() {
@@ -1147,7 +1163,7 @@
func_196254_a("chiseled_quartz_block", new Block(Block.Builder.func_200949_a(Material.field_151576_e, MapColor.field_151677_p).func_200943_b(0.8F)));
func_196254_a("quartz_pillar", new BlockRotatedPillar(Block.Builder.func_200949_a(Material.field_151576_e, MapColor.field_151677_p).func_200943_b(0.8F)));
func_196254_a("quartz_stairs", new BlockStairs(block42.func_176223_P(), Block.Builder.func_200950_a(block42)));
- func_196254_a("activator_rail", new BlockRailPowered(Block.Builder.func_200945_a(Material.field_151594_q).func_200942_a().func_200943_b(0.7F).func_200947_a(SoundType.field_185852_e)));
+ func_196254_a("activator_rail", new BlockRailPowered(Block.Builder.func_200945_a(Material.field_151594_q).func_200942_a().func_200943_b(0.7F).func_200947_a(SoundType.field_185852_e), true));
func_196254_a("dropper", new BlockDropper(Block.Builder.func_200945_a(Material.field_151576_e).func_200943_b(3.5F)));
func_196254_a("white_terracotta", new Block(Block.Builder.func_200949_a(Material.field_151576_e, MapColor.field_193561_M).func_200948_a(1.25F, 4.2F)));
func_196254_a("orange_terracotta", new Block(Block.Builder.func_200949_a(Material.field_151576_e, MapColor.field_193562_N).func_200948_a(1.25F, 4.2F)));
@@ -1464,6 +1480,7 @@
func_196254_a("structure_block", new BlockStructure(Block.Builder.func_200949_a(Material.field_151573_f, MapColor.field_197656_x).func_200948_a(-1.0F, 3600000.0F)));
field_149771_c.func_177776_a();
@@ -1129,7 +1144,7 @@
func_196254_a("chiseled_quartz_block", new Block(Block.Properties.func_200949_a(Material.field_151576_e, MaterialColor.field_151677_p).func_200943_b(0.8F)));
func_196254_a("quartz_pillar", new BlockRotatedPillar(Block.Properties.func_200949_a(Material.field_151576_e, MaterialColor.field_151677_p).func_200943_b(0.8F)));
func_196254_a("quartz_stairs", new BlockStairs(block42.func_176223_P(), Block.Properties.func_200950_a(block42)));
- func_196254_a("activator_rail", new BlockRailPowered(Block.Properties.func_200945_a(Material.field_151594_q).func_200942_a().func_200943_b(0.7F).func_200947_a(SoundType.field_185852_e)));
+ func_196254_a("activator_rail", new BlockRailPowered(Block.Properties.func_200945_a(Material.field_151594_q).func_200942_a().func_200943_b(0.7F).func_200947_a(SoundType.field_185852_e), true));
func_196254_a("dropper", new BlockDropper(Block.Properties.func_200945_a(Material.field_151576_e).func_200943_b(3.5F)));
func_196254_a("white_terracotta", new Block(Block.Properties.func_200949_a(Material.field_151576_e, MaterialColor.field_193561_M).func_200948_a(1.25F, 4.2F)));
func_196254_a("orange_terracotta", new Block(Block.Properties.func_200949_a(Material.field_151576_e, MaterialColor.field_193562_N).func_200948_a(1.25F, 4.2F)));
@@ -1455,6 +1470,7 @@
func_196254_a("bubble_column", new BlockBubbleColumn(Block.Properties.func_200945_a(Material.field_203244_i).func_200942_a()));
func_196254_a("structure_block", new BlockStructure(Block.Properties.func_200949_a(Material.field_151573_f, MaterialColor.field_197656_x).func_200948_a(-1.0F, 3600000.0F)));

+ if(false) // Processed in GameData.BlockCallbacks#onBake
for(Block block80 : field_149771_c) {
for(IBlockState iblockstate : block80.func_176194_O().func_177619_a()) {
for(Block block85 : IRegistry.field_212618_g) {
for(IBlockState iblockstate : block85.func_176194_O().func_177619_a()) {
field_176229_d.func_195867_b(iblockstate);
@@ -1604,4 +1621,83 @@
@@ -1594,4 +1610,83 @@
return Objects.hash(this.field_212164_a, this.field_212165_b, this.field_212166_c);
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/net/minecraft/block/BlockAbstractBanner.java
+++ b/net/minecraft/block/BlockAbstractBanner.java
@@ -50,7 +50,7 @@
@@ -51,7 +51,7 @@
}

public void func_196255_a(IBlockState p_196255_1_, World p_196255_2_, BlockPos p_196255_3_, float p_196255_4_, int p_196255_5_) {
Expand All @@ -9,7 +9,7 @@
}

public void func_180657_a(World p_180657_1_, EntityPlayer p_180657_2_, BlockPos p_180657_3_, IBlockState p_180657_4_, @Nullable TileEntity p_180657_5_, ItemStack p_180657_6_) {
@@ -73,4 +73,10 @@
@@ -75,4 +75,10 @@
public EnumDyeColor func_196285_M_() {
return this.field_196286_a;
}
Expand Down
2 changes: 1 addition & 1 deletion patches/minecraft/net/minecraft/block/BlockBed.java.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/net/minecraft/block/BlockBed.java
+++ b/net/minecraft/block/BlockBed.java
@@ -66,7 +66,9 @@
@@ -67,7 +67,9 @@
}
}

Expand Down
2 changes: 1 addition & 1 deletion patches/minecraft/net/minecraft/block/BlockBush.java.patch
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

-public class BlockBush extends Block {
+public class BlockBush extends Block implements net.minecraftforge.common.IPlantable {
protected BlockBush(Block.Builder p_i48437_1_) {
protected BlockBush(Block.Properties p_i48437_1_) {
super(p_i48437_1_);
}
@@ -26,6 +26,8 @@
Expand Down
4 changes: 2 additions & 2 deletions patches/minecraft/net/minecraft/block/BlockCactus.java.patch
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
+ if(net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_196267_2_, blockpos, p_196267_1_, true)) {
if (j == 15) {
p_196267_2_.func_175656_a(blockpos, this.func_176223_P());
IBlockState iblockstate = (IBlockState)p_196267_1_.func_206870_a(field_176587_a, Integer.valueOf(0));
IBlockState iblockstate = p_196267_1_.func_206870_a(field_176587_a, Integer.valueOf(0));
@@ -52,7 +54,8 @@
} else {
p_196267_2_.func_180501_a(p_196267_3_, (IBlockState)p_196267_1_.func_206870_a(field_176587_a, Integer.valueOf(j + 1)), 4);
p_196267_2_.func_180501_a(p_196267_3_, p_196267_1_.func_206870_a(field_176587_a, Integer.valueOf(j + 1)), 4);
}
-
+ net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_196267_2_, p_196267_3_, p_196267_1_);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
int i = p_196267_1_.func_177229_b(field_176501_a);
- if (i < 2) {
+ if (i < 2 && net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_196267_2_, p_196267_3_, p_196267_1_, p_196267_2_.field_73012_v.nextInt(5) == 0)) {
p_196267_2_.func_180501_a(p_196267_3_, (IBlockState)p_196267_1_.func_206870_a(field_176501_a, Integer.valueOf(i + 1)), 2);
p_196267_2_.func_180501_a(p_196267_3_, p_196267_1_.func_206870_a(field_176501_a, Integer.valueOf(i + 1)), 2);
+ net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_196267_2_, p_196267_3_, p_196267_1_);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
+public class BlockDeadBush extends BlockBush implements net.minecraftforge.common.IShearable {
protected static final VoxelShape field_196397_a = Block.func_208617_a(2.0D, 0.0D, 2.0D, 14.0D, 13.0D, 14.0D);

protected BlockDeadBush(Block.Builder p_i48418_1_) {
protected BlockDeadBush(Block.Properties p_i48418_1_) {
@@ -46,4 +46,10 @@

super.func_180657_a(p_180657_1_, p_180657_2_, p_180657_3_, flag ? Blocks.field_150350_a.func_176223_P() : p_180657_4_, p_180657_5_, p_180657_6_);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
ItemStack itemstack = tileentitydispenser.func_70301_a(i);
- if (!itemstack.func_190926_b()) {
+ if (!itemstack.func_190926_b() && net.minecraftforge.items.VanillaInventoryCodeHooks.dropperInsertHook(p_176439_1_, p_176439_2_, tileentitydispenser, i, itemstack)) {
EnumFacing enumfacing = (EnumFacing)p_176439_1_.func_180495_p(p_176439_2_).func_177229_b(field_176441_a);
EnumFacing enumfacing = p_176439_1_.func_180495_p(p_176439_2_).func_177229_b(field_176441_a);
IInventory iinventory = TileEntityHopper.func_195484_a(p_176439_1_, p_176439_2_.func_177972_a(enumfacing));
ItemStack itemstack1;
Loading

0 comments on commit ca72710

Please sign in to comment.