Skip to content

Commit ca72710

Browse files
committed
Initial 1.13.2 update. Major thing to note is that Dimensions have been 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.
1 parent 9a16885 commit ca72710

File tree

361 files changed

+3150
-3531
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

361 files changed

+3150
-3531
lines changed

build.gradle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
buildscript {
22
repositories {
3-
//mavenLocal()
3+
mavenLocal()
44
maven { url = 'https://files.minecraftforge.net/maven' }
55
jcenter()
66
mavenCentral()
@@ -45,8 +45,8 @@ ext {
4545
}
4646
MAPPING_CHANNEL = 'snapshot'
4747
MAPPING_VERSION = '20180921-1.13'
48-
MC_VERSION = '1.13'
49-
MCP_VERSION = '2018.09.12.04.11.00'
48+
MC_VERSION = '1.13.2'
49+
MCP_VERSION = '20190213.203750'
5050
}
5151

5252
project(':mcp') {
@@ -75,7 +75,7 @@ project(':clean') {
7575
mkdir 'runclient'
7676
}
7777
classpath sourceSets.main.runtimeClasspath
78-
args = ['--accessToken', '0', '--version', '1.13']
78+
args = ['--accessToken', '0', '--version', MC_VERSION]
7979
main 'net.minecraft.client.main.Main'
8080
workingDir 'runclient'
8181
}
@@ -140,7 +140,7 @@ project(':forge') {
140140
}
141141

142142
ext {
143-
SPEC_VERSION = '24.0' // This is overwritten by git tag, but here so dev time doesnt explode
143+
SPEC_VERSION = '25.0' // This is overwritten by git tag, but here so dev time doesnt explode
144144
// The new versioning sceme is <MCVersion>-<ForgeMC>.<RB>.<CommitsSinceRB>
145145
// ForgeMC is a unique identifier for every MC version we have supported.
146146
// Essentially, the same as the old, except dropping the first number, and the builds are no longer unique.

patches/minecraft/net/minecraft/advancements/PlayerAdvancements.java.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
boolean flag1 = advancementprogress.func_192105_a();
1212
@@ -186,6 +188,7 @@
1313
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")) {
14-
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()}));
14+
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()));
1515
}
1616
+ net.minecraftforge.common.ForgeHooks.onAdvancement(this.field_192762_j, p_192750_1_);
1717
}

patches/minecraft/net/minecraft/advancements/criterion/ItemPredicate.java.patch

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
--- a/net/minecraft/advancements/criterion/ItemPredicate.java
22
+++ b/net/minecraft/advancements/criterion/ItemPredicate.java
3-
@@ -23,6 +23,8 @@
4-
import net.minecraft.util.ResourceLocation;
3+
@@ -24,6 +24,8 @@
4+
import net.minecraft.util.registry.IRegistry;
55

66
public class ItemPredicate {
77
+ private static final Map<ResourceLocation, java.util.function.Function<JsonObject, ItemPredicate>> custom_predicates = new java.util.HashMap<>();
88
+ private static final Map<ResourceLocation, java.util.function.Function<JsonObject, ItemPredicate>> unmod_predicates = java.util.Collections.unmodifiableMap(custom_predicates);
99
public static final ItemPredicate field_192495_a = new ItemPredicate();
1010
@Nullable
1111
private final Tag<Item> field_200018_b;
12-
@@ -89,6 +91,11 @@
12+
@@ -90,6 +92,11 @@
1313
public static ItemPredicate func_192492_a(@Nullable JsonElement p_192492_0_) {
1414
if (p_192492_0_ != null && !p_192492_0_.isJsonNull()) {
1515
JsonObject jsonobject = JsonUtils.func_151210_l(p_192492_0_, "item");
@@ -21,7 +21,7 @@
2121
MinMaxBounds.IntBound minmaxbounds$intbound = MinMaxBounds.IntBound.func_211344_a(jsonobject.get("count"));
2222
MinMaxBounds.IntBound minmaxbounds$intbound1 = MinMaxBounds.IntBound.func_211344_a(jsonobject.get("durability"));
2323
if (jsonobject.has("data")) {
24-
@@ -180,6 +187,14 @@
24+
@@ -181,6 +188,14 @@
2525
}
2626
}
2727

@@ -34,5 +34,5 @@
3434
+ }
3535
+
3636
public static class Builder {
37-
private final List<EnchantmentPredicate> field_200312_a = Lists.<EnchantmentPredicate>newArrayList();
37+
private final List<EnchantmentPredicate> field_200312_a = Lists.newArrayList();
3838
@Nullable

patches/minecraft/net/minecraft/block/Block.java.patch

Lines changed: 29 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,19 @@
11
--- a/net/minecraft/block/Block.java
22
+++ b/net/minecraft/block/Block.java
3-
@@ -74,11 +74,13 @@
3+
@@ -75,9 +75,10 @@
44
import org.apache.logging.log4j.LogManager;
55
import org.apache.logging.log4j.Logger;
66

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

2218
@Deprecated
2319
public boolean func_196253_a(IBlockState p_196253_1_, BlockItemUseContext p_196253_2_) {
@@ -26,7 +22,7 @@
2622
}
2723

2824
@Deprecated
29-
@@ -328,8 +330,9 @@
25+
@@ -310,8 +311,9 @@
3026
return this.field_149789_z;
3127
}
3228

@@ -37,7 +33,7 @@
3733
}
3834

3935
@Deprecated
40-
@@ -340,11 +343,11 @@
36+
@@ -322,11 +324,11 @@
4137
@Deprecated
4238
@OnlyIn(Dist.CLIENT)
4339
public int func_185484_c(IBlockState p_185484_1_, IWorldReader p_185484_2_, BlockPos p_185484_3_) {
@@ -51,7 +47,7 @@
5147
} else {
5248
return i;
5349
}
54-
@@ -486,8 +489,12 @@
50+
@@ -468,8 +470,12 @@
5551

5652
@Deprecated
5753
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_) {
@@ -64,7 +60,7 @@
6460
public int func_196264_a(IBlockState p_196264_1_, Random p_196264_2_) {
6561
return 1;
6662
}
67-
@@ -502,30 +509,30 @@
63+
@@ -484,30 +490,30 @@
6864
if (f == -1.0F) {
6965
return 0.0F;
7066
} else {
@@ -109,15 +105,15 @@
109105
float f = 0.5F;
110106
double d0 = (double)(p_180635_0_.field_73012_v.nextFloat() * 0.5F) + 0.25D;
111107
double d1 = (double)(p_180635_0_.field_73012_v.nextFloat() * 0.5F) + 0.25D;
112-
@@ -547,6 +554,7 @@
108+
@@ -529,6 +535,7 @@
113109

114110
}
115111

116112
+ @Deprecated //Forge: State sensitive version
117113
public float func_149638_a() {
118114
return this.field_149781_w;
119115
}
120-
@@ -561,7 +569,7 @@
116+
@@ -543,7 +550,7 @@
121117
}
122118
}
123119

@@ -126,7 +122,7 @@
126122
}
127123

128124
public void func_180652_a(World p_180652_1_, BlockPos p_180652_2_, Explosion p_180652_3_) {
129-
@@ -615,16 +623,22 @@
125+
@@ -597,16 +604,22 @@
130126
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_) {
131127
p_180657_2_.func_71029_a(StatList.field_188065_ae.func_199076_b(this));
132128
p_180657_2_.func_71020_j(0.005F);
@@ -151,23 +147,23 @@
151147
protected boolean func_149700_E() {
152148
return this.func_176223_P().func_185917_h() && !this.func_149716_u();
153149
}
154-
@@ -681,6 +695,7 @@
150+
@@ -663,6 +676,7 @@
155151
p_176216_2_.field_70181_x = 0.0D;
156152
}
157153

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

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

173169
public static boolean func_196252_e(Block p_196252_0_) {
@@ -181,24 +177,24 @@
181177
}
182178

183179
public static void func_149671_p() {
184-
@@ -1147,7 +1163,7 @@
185-
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)));
186-
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)));
187-
func_196254_a("quartz_stairs", new BlockStairs(block42.func_176223_P(), Block.Builder.func_200950_a(block42)));
188-
- 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)));
189-
+ 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));
190-
func_196254_a("dropper", new BlockDropper(Block.Builder.func_200945_a(Material.field_151576_e).func_200943_b(3.5F)));
191-
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)));
192-
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)));
193-
@@ -1464,6 +1480,7 @@
194-
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)));
195-
field_149771_c.func_177776_a();
180+
@@ -1129,7 +1144,7 @@
181+
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)));
182+
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)));
183+
func_196254_a("quartz_stairs", new BlockStairs(block42.func_176223_P(), Block.Properties.func_200950_a(block42)));
184+
- 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)));
185+
+ 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));
186+
func_196254_a("dropper", new BlockDropper(Block.Properties.func_200945_a(Material.field_151576_e).func_200943_b(3.5F)));
187+
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)));
188+
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)));
189+
@@ -1455,6 +1470,7 @@
190+
func_196254_a("bubble_column", new BlockBubbleColumn(Block.Properties.func_200945_a(Material.field_203244_i).func_200942_a()));
191+
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)));
196192

197193
+ if(false) // Processed in GameData.BlockCallbacks#onBake
198-
for(Block block80 : field_149771_c) {
199-
for(IBlockState iblockstate : block80.func_176194_O().func_177619_a()) {
194+
for(Block block85 : IRegistry.field_212618_g) {
195+
for(IBlockState iblockstate : block85.func_176194_O().func_177619_a()) {
200196
field_176229_d.func_195867_b(iblockstate);
201-
@@ -1604,4 +1621,83 @@
197+
@@ -1594,4 +1610,83 @@
202198
return Objects.hash(this.field_212164_a, this.field_212165_b, this.field_212166_c);
203199
}
204200
}

patches/minecraft/net/minecraft/block/BlockAbstractBanner.java.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
--- a/net/minecraft/block/BlockAbstractBanner.java
22
+++ b/net/minecraft/block/BlockAbstractBanner.java
3-
@@ -50,7 +50,7 @@
3+
@@ -51,7 +51,7 @@
44
}
55

66
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_) {
@@ -9,7 +9,7 @@
99
}
1010

1111
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_) {
12-
@@ -73,4 +73,10 @@
12+
@@ -75,4 +75,10 @@
1313
public EnumDyeColor func_196285_M_() {
1414
return this.field_196286_a;
1515
}

patches/minecraft/net/minecraft/block/BlockBed.java.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
--- a/net/minecraft/block/BlockBed.java
22
+++ b/net/minecraft/block/BlockBed.java
3-
@@ -66,7 +66,9 @@
3+
@@ -67,7 +67,9 @@
44
}
55
}
66

patches/minecraft/net/minecraft/block/BlockBush.java.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
-public class BlockBush extends Block {
88
+public class BlockBush extends Block implements net.minecraftforge.common.IPlantable {
9-
protected BlockBush(Block.Builder p_i48437_1_) {
9+
protected BlockBush(Block.Properties p_i48437_1_) {
1010
super(p_i48437_1_);
1111
}
1212
@@ -26,6 +26,8 @@

patches/minecraft/net/minecraft/block/BlockCactus.java.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@
2424
+ if(net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_196267_2_, blockpos, p_196267_1_, true)) {
2525
if (j == 15) {
2626
p_196267_2_.func_175656_a(blockpos, this.func_176223_P());
27-
IBlockState iblockstate = (IBlockState)p_196267_1_.func_206870_a(field_176587_a, Integer.valueOf(0));
27+
IBlockState iblockstate = p_196267_1_.func_206870_a(field_176587_a, Integer.valueOf(0));
2828
@@ -52,7 +54,8 @@
2929
} else {
30-
p_196267_2_.func_180501_a(p_196267_3_, (IBlockState)p_196267_1_.func_206870_a(field_176587_a, Integer.valueOf(j + 1)), 4);
30+
p_196267_2_.func_180501_a(p_196267_3_, p_196267_1_.func_206870_a(field_176587_a, Integer.valueOf(j + 1)), 4);
3131
}
3232
-
3333
+ net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_196267_2_, p_196267_3_, p_196267_1_);

patches/minecraft/net/minecraft/block/BlockCocoa.java.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
int i = p_196267_1_.func_177229_b(field_176501_a);
1010
- if (i < 2) {
1111
+ 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)) {
12-
p_196267_2_.func_180501_a(p_196267_3_, (IBlockState)p_196267_1_.func_206870_a(field_176501_a, Integer.valueOf(i + 1)), 2);
12+
p_196267_2_.func_180501_a(p_196267_3_, p_196267_1_.func_206870_a(field_176501_a, Integer.valueOf(i + 1)), 2);
1313
+ net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_196267_2_, p_196267_3_, p_196267_1_);
1414
}
1515
}

patches/minecraft/net/minecraft/block/BlockDeadBush.java.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
+public class BlockDeadBush extends BlockBush implements net.minecraftforge.common.IShearable {
99
protected static final VoxelShape field_196397_a = Block.func_208617_a(2.0D, 0.0D, 2.0D, 14.0D, 13.0D, 14.0D);
1010

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

1414
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_);

0 commit comments

Comments
 (0)