diff --git a/patches/minecraft/net/minecraft/block/AbstractBlock.java.patch b/patches/minecraft/net/minecraft/block/AbstractBlock.java.patch index 5f66136d01d..d283ddc480f 100644 --- a/patches/minecraft/net/minecraft/block/AbstractBlock.java.patch +++ b/patches/minecraft/net/minecraft/block/AbstractBlock.java.patch @@ -10,7 +10,15 @@ protected static final Direction[] field_212556_a = new Direction[]{Direction.WEST, Direction.EAST, Direction.NORTH, Direction.SOUTH, Direction.DOWN, Direction.UP}; protected final Material field_149764_J; protected final boolean field_235688_at_; -@@ -86,6 +87,8 @@ +@@ -71,6 +72,7 @@ + protected final float field_226887_g_; + protected final boolean field_208621_p; + protected final AbstractBlock.Properties field_235684_aB_; ++ + @Nullable + protected ResourceLocation field_220085_g; + +@@ -86,6 +88,8 @@ this.field_226887_g_ = p_i241196_1_.field_226894_k_; this.field_208621_p = p_i241196_1_.field_208772_j; this.field_235684_aB_ = p_i241196_1_; @@ -19,7 +27,7 @@ } @Deprecated -@@ -128,7 +131,7 @@ +@@ -128,7 +132,7 @@ @Deprecated public void func_196243_a(BlockState p_196243_1_, World p_196243_2_, BlockPos p_196243_3_, BlockState p_196243_4_, boolean p_196243_5_) { @@ -28,7 +36,7 @@ p_196243_2_.func_175713_t(p_196243_3_); } -@@ -190,7 +193,7 @@ +@@ -190,7 +194,7 @@ @Deprecated public boolean func_196253_a(BlockState p_196253_1_, BlockItemUseContext p_196253_2_) { @@ -37,18 +45,16 @@ } @Deprecated -@@ -293,8 +296,8 @@ +@@ -293,7 +297,7 @@ if (f == -1.0F) { return 0.0F; } else { - int i = p_180647_2_.func_234569_d_(p_180647_1_) ? 30 : 100; -- return p_180647_2_.func_184813_a(p_180647_1_) / f / (float)i; + int i = net.minecraftforge.common.ForgeHooks.canHarvestBlock(p_180647_1_, p_180647_2_, p_180647_3_, p_180647_4_) ? 30 : 100; -+ return p_180647_2_.getDigSpeed(p_180647_1_, p_180647_4_) / f / (float)i; + return p_180647_2_.func_184813_a(p_180647_1_) / f / (float)i; } } - -@@ -320,14 +323,14 @@ +@@ -320,14 +324,14 @@ return 0; } @@ -65,7 +71,7 @@ } return this.field_220085_g; -@@ -345,6 +348,10 @@ +@@ -345,6 +349,10 @@ return this.field_235684_aB_.field_235800_b_.apply(this.func_230328_p_().func_176223_P()); } @@ -76,7 +82,7 @@ public abstract static class AbstractBlockState extends StateHolder { private final int field_215708_d; private final boolean field_215709_e; -@@ -427,6 +434,8 @@ +@@ -427,6 +435,8 @@ return this.field_215708_d; } @@ -85,7 +91,7 @@ public boolean func_196958_f() { return this.field_235702_f_; } -@@ -435,6 +444,8 @@ +@@ -435,6 +445,8 @@ return this.field_235704_h_; } @@ -94,7 +100,7 @@ public BlockState func_185907_a(Rotation p_185907_1_) { return this.func_177230_c().func_185499_a(this.func_230340_p_(), p_185907_1_); } -@@ -786,6 +797,9 @@ +@@ -786,6 +798,9 @@ private ResourceLocation field_222381_j; private boolean field_226895_m_ = true; private boolean field_235813_o_; @@ -104,7 +110,7 @@ private AbstractBlock.IExtendedPositionPredicate> field_235814_p_ = (p_235832_0_, p_235832_1_, p_235832_2_, p_235832_3_) -> { return p_235832_0_.func_224755_d(p_235832_1_, p_235832_2_, Direction.UP) && p_235832_0_.func_185906_d() < 14; }; -@@ -847,6 +861,8 @@ +@@ -847,6 +862,8 @@ abstractblock$properties.field_226895_m_ = p_200950_0_.field_235684_aB_.field_226895_m_; abstractblock$properties.field_235813_o_ = p_200950_0_.field_235684_aB_.field_235813_o_; abstractblock$properties.field_235806_h_ = p_200950_0_.field_235684_aB_.field_235806_h_; @@ -113,7 +119,7 @@ return abstractblock$properties; } -@@ -861,6 +877,16 @@ +@@ -861,6 +878,16 @@ return this; } @@ -130,7 +136,7 @@ public AbstractBlock.Properties func_200941_a(float p_200941_1_) { this.field_200961_i = p_200941_1_; return this; -@@ -917,7 +943,7 @@ +@@ -917,7 +944,7 @@ } public AbstractBlock.Properties func_222379_b(Block p_222379_1_) { diff --git a/patches/minecraft/net/minecraft/client/gui/ResourceLoadProgressGui.java.patch b/patches/minecraft/net/minecraft/client/gui/ResourceLoadProgressGui.java.patch index 57e6c839e7a..b0d94682f17 100644 --- a/patches/minecraft/net/minecraft/client/gui/ResourceLoadProgressGui.java.patch +++ b/patches/minecraft/net/minecraft/client/gui/ResourceLoadProgressGui.java.patch @@ -1,6 +1,14 @@ --- a/net/minecraft/client/gui/ResourceLoadProgressGui.java +++ b/net/minecraft/client/gui/ResourceLoadProgressGui.java -@@ -97,6 +97,7 @@ +@@ -20,6 +20,7 @@ + import net.minecraft.util.math.MathHelper; + import net.minecraftforge.api.distmarker.Dist; + import net.minecraftforge.api.distmarker.OnlyIn; ++import net.minecraftforge.client.CloudRenderHandler; + + @OnlyIn(Dist.CLIENT) + public class ResourceLoadProgressGui extends LoadingGui { +@@ -97,6 +98,7 @@ int l1 = (int)((double)this.field_212974_b.func_228018_at_().func_198087_p() * 0.8325D); float f3 = this.field_212975_c.func_219555_b(); this.field_212978_f = MathHelper.func_76131_a(this.field_212978_f * 0.95F + f3 * 0.050000012F, 0.0F, 1.0F); @@ -8,7 +16,7 @@ if (f < 1.0F) { this.func_238629_a_(p_230430_1_, i / 2 - k1, l1 - 5, i / 2 + k1, l1 + 5, 1.0F - MathHelper.func_76131_a(f, 0.0F, 1.0F)); } -@@ -106,6 +107,7 @@ +@@ -106,6 +108,7 @@ } if (this.field_212979_g == -1L && this.field_212975_c.func_219554_d() && (!this.field_212977_e || f1 >= 2.0F)) { @@ -16,7 +24,7 @@ try { this.field_212975_c.func_219556_e(); this.field_212976_d.accept(Optional.empty()); -@@ -113,7 +115,6 @@ +@@ -113,7 +116,6 @@ this.field_212976_d.accept(Optional.of(throwable)); } diff --git a/patches/minecraft/net/minecraft/client/gui/screen/Screen.java.patch b/patches/minecraft/net/minecraft/client/gui/screen/Screen.java.patch index b408f720d54..5ddf305f89d 100644 --- a/patches/minecraft/net/minecraft/client/gui/screen/Screen.java.patch +++ b/patches/minecraft/net/minecraft/client/gui/screen/Screen.java.patch @@ -60,19 +60,20 @@ public void func_238651_a_(MatrixStack p_238651_1_, int p_238651_2_) { if (this.field_230706_i_.field_71441_e != null) { this.func_238468_a_(p_238651_1_, 0, 0, this.field_230708_k_, this.field_230709_l_, -1072689136, -804253680); -+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.GuiScreenEvent.BackgroundDrawnEvent(this, p_238651_1_)); ++ //net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.GuiScreenEvent.BackgroundDrawnEvent(this, p_238651_1_)); } else { this.func_231165_f_(p_238651_2_); } -@@ -342,6 +360,7 @@ +@@ -342,6 +360,8 @@ bufferbuilder.func_225582_a_((double)this.field_230708_k_, 0.0D, 0.0D).func_225583_a_((float)this.field_230708_k_ / 32.0F, (float)p_231165_1_).func_225586_a_(64, 64, 64, 255).func_181675_d(); bufferbuilder.func_225582_a_(0.0D, 0.0D, 0.0D).func_225583_a_(0.0F, (float)p_231165_1_).func_225586_a_(64, 64, 64, 255).func_181675_d(); tessellator.func_78381_a(); -+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.GuiScreenEvent.BackgroundDrawnEvent(this, new MatrixStack())); ++ ++ //net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.GuiScreenEvent.BackgroundDrawnEvent(this)); } public boolean func_231177_au__() { -@@ -428,4 +447,8 @@ +@@ -428,4 +448,8 @@ public void func_230476_a_(List p_230476_1_) { } diff --git a/patches/minecraft/net/minecraft/client/renderer/BufferBuilder.java.patch b/patches/minecraft/net/minecraft/client/renderer/BufferBuilder.java.patch index 5531efe1e41..07cf76c2318 100644 --- a/patches/minecraft/net/minecraft/client/renderer/BufferBuilder.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/BufferBuilder.java.patch @@ -1,6 +1,14 @@ --- a/net/minecraft/client/renderer/BufferBuilder.java +++ b/net/minecraft/client/renderer/BufferBuilder.java -@@ -297,6 +297,7 @@ +@@ -121,7 +121,6 @@ + + bitset.set(l); + } +- + } + + private void func_227829_a_(FloatBuffer p_227829_1_, int p_227829_2_) { +@@ -297,6 +296,7 @@ } ByteBuffer bytebuffer = this.field_179001_a.slice(); @@ -8,7 +16,7 @@ ((Buffer)this.field_179001_a).clear(); return Pair.of(bufferbuilder$drawstate, bytebuffer); } -@@ -364,4 +365,15 @@ +@@ -364,4 +364,15 @@ this.field_179018_e = p_i225907_2_; } } diff --git a/patches/minecraft/net/minecraft/client/renderer/FirstPersonRenderer.java.patch b/patches/minecraft/net/minecraft/client/renderer/FirstPersonRenderer.java.patch index 10ee295163a..298538ff9a1 100644 --- a/patches/minecraft/net/minecraft/client/renderer/FirstPersonRenderer.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/FirstPersonRenderer.java.patch @@ -81,3 +81,10 @@ } if (this.field_187469_f < 0.1F) { +@@ -430,6 +440,5 @@ + } else { + this.field_187471_h = 0.0F; + } +- + } + } diff --git a/patches/minecraft/net/minecraft/client/renderer/FogRenderer.java.patch b/patches/minecraft/net/minecraft/client/renderer/FogRenderer.java.patch index 1b5fc50990e..73db7dc3d86 100644 --- a/patches/minecraft/net/minecraft/client/renderer/FogRenderer.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/FogRenderer.java.patch @@ -49,11 +49,13 @@ if (fluidstate.func_206884_a(FluidTags.field_206959_a)) { float f = 1.0F; f = 0.05F; -@@ -231,6 +250,7 @@ +@@ -231,8 +250,8 @@ RenderSystem.fogEnd(f3); RenderSystem.fogMode(GlStateManager.FogMode.LINEAR); RenderSystem.setupNvFogDistance(); + net.minecraftforge.client.ForgeHooksClient.onFogRender(p_228372_1_, p_228372_0_, partialTicks, f3); } - +- } + + public static void func_228373_b_() { diff --git a/patches/minecraft/net/minecraft/client/renderer/entity/EntityRendererManager.java.patch b/patches/minecraft/net/minecraft/client/renderer/entity/EntityRendererManager.java.patch index a316bf42bc4..81f0fdcfa02 100644 --- a/patches/minecraft/net/minecraft/client/renderer/entity/EntityRendererManager.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/entity/EntityRendererManager.java.patch @@ -1,6 +1,6 @@ --- a/net/minecraft/client/renderer/entity/EntityRendererManager.java +++ b/net/minecraft/client/renderer/entity/EntityRendererManager.java -@@ -187,7 +187,10 @@ +@@ -187,13 +187,15 @@ this.field_178637_m = new PlayerRenderer(this); this.field_178636_l.put("default", this.field_178637_m); this.field_178636_l.put("slim", new PlayerRenderer(this, true)); @@ -11,7 +11,13 @@ for(EntityType entitytype : Registry.field_212629_r) { if (entitytype != EntityType.field_200729_aH && !this.field_78729_o.containsKey(entitytype)) { throw new IllegalStateException("No renderer registered for " + Registry.field_212629_r.func_177774_c(entitytype)); -@@ -449,4 +452,8 @@ + } + } +- + } + + public EntityRenderer func_78713_a(T p_78713_1_) { +@@ -449,4 +451,8 @@ public FontRenderer func_78716_a() { return this.field_78736_p; } diff --git a/patches/minecraft/net/minecraft/entity/LivingEntity.java.patch b/patches/minecraft/net/minecraft/entity/LivingEntity.java.patch index 2e932a8ac74..594e78674d0 100644 --- a/patches/minecraft/net/minecraft/entity/LivingEntity.java.patch +++ b/patches/minecraft/net/minecraft/entity/LivingEntity.java.patch @@ -310,7 +310,7 @@ } protected float func_189749_co() { -@@ -1868,11 +1896,15 @@ +@@ -1868,16 +1896,20 @@ public void func_213352_e(Vector3d p_213352_1_) { if (this.func_70613_aW() || this.func_184186_bw()) { double d0 = 0.08D; @@ -327,6 +327,12 @@ FluidState fluidstate = this.field_70170_p.func_204610_c(this.func_233580_cy_()); if (this.func_70090_H() && this.func_241208_cS_() && !this.func_230285_a_(fluidstate.func_206886_c())) { + double d8 = this.func_226278_cu_(); +- float f5 = this.func_70051_ag() ? 0.9F : this.func_189749_co(); ++ float f5 = this.field_70170_p.func_180495_p(this.func_226270_aj_()).getSlipperiness(field_70170_p, this.func_226270_aj_(), this); + float f6 = 0.02F; + float f7 = (float)EnchantmentHelper.func_185294_d(this); + if (f7 > 3.0F) { @@ -1897,6 +1929,7 @@ f5 = 0.96F; } @@ -335,15 +341,6 @@ this.func_213309_a(f6, p_213352_1_); this.func_213315_a(MoverType.SELF, this.func_213322_ci()); Vector3d vector3d6 = this.func_213322_ci(); -@@ -1975,7 +2008,7 @@ - } - } else { - BlockPos blockpos = this.func_226270_aj_(); -- float f3 = this.field_70170_p.func_180495_p(blockpos).func_177230_c().func_208618_m(); -+ float f3 = this.field_70170_p.func_180495_p(this.func_226270_aj_()).getSlipperiness(field_70170_p, this.func_226270_aj_(), this); - float f4 = this.field_70122_E ? f3 * 0.91F : 0.91F; - Vector3d vector3d5 = this.func_233633_a_(p_213352_1_, f3); - double d2 = vector3d5.field_72448_b; @@ -2075,6 +2108,7 @@ } diff --git a/patches/minecraft/net/minecraft/entity/monster/ShulkerEntity.java.patch b/patches/minecraft/net/minecraft/entity/monster/ShulkerEntity.java.patch index 69253abc90f..1071e36f999 100644 --- a/patches/minecraft/net/minecraft/entity/monster/ShulkerEntity.java.patch +++ b/patches/minecraft/net/minecraft/entity/monster/ShulkerEntity.java.patch @@ -25,9 +25,11 @@ Optional optional1 = Optional.of(new BlockPos(p_70107_1_, p_70107_3_, p_70107_5_)); if (!optional1.equals(optional)) { this.field_70180_af.func_187227_b(field_184701_b, optional1); -@@ -283,6 +285,12 @@ +@@ -282,7 +284,14 @@ + BlockPos blockpos1 = blockpos.func_177982_a(8 - this.field_70146_Z.nextInt(17), 8 - this.field_70146_Z.nextInt(17), 8 - this.field_70146_Z.nextInt(17)); if (blockpos1.func_177956_o() > 0 && this.field_70170_p.func_175623_d(blockpos1) && this.field_70170_p.func_175723_af().func_177746_a(blockpos1) && this.field_70170_p.func_226665_a__(this, new AxisAlignedBB(blockpos1))) { Direction direction = this.func_234299_g_(blockpos1); ++ if (direction != null) { + net.minecraftforge.event.entity.living.EnderTeleportEvent event = new net.minecraftforge.event.entity.living.EnderTeleportEvent(this, blockpos1.func_177958_n(), blockpos1.func_177956_o(), blockpos1.func_177952_p(), 0); + if (net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(event)) direction = null; @@ -38,3 +40,11 @@ this.field_70180_af.func_187227_b(field_184700_a, direction); this.func_184185_a(SoundEvents.field_187791_eX, 1.0F, 1.0F); this.field_70180_af.func_187227_b(field_184701_b, Optional.of(blockpos1)); +@@ -306,7 +315,6 @@ + this.field_70760_ar = 0.0F; + this.field_70761_aq = 0.0F; + } +- + } + + public void func_184206_a(DataParameter p_184206_1_) { diff --git a/patches/minecraft/net/minecraft/entity/player/ServerPlayerEntity.java.patch b/patches/minecraft/net/minecraft/entity/player/ServerPlayerEntity.java.patch index c167c96a300..cbd1812a4b2 100644 --- a/patches/minecraft/net/minecraft/entity/player/ServerPlayerEntity.java.patch +++ b/patches/minecraft/net/minecraft/entity/player/ServerPlayerEntity.java.patch @@ -1,6 +1,21 @@ --- a/net/minecraft/entity/player/ServerPlayerEntity.java +++ b/net/minecraft/entity/player/ServerPlayerEntity.java -@@ -464,6 +464,7 @@ +@@ -3,12 +3,8 @@ + import com.google.common.collect.Lists; + import com.mojang.authlib.GameProfile; + import com.mojang.datafixers.util.Either; +-import java.util.Collection; +-import java.util.Iterator; +-import java.util.List; +-import java.util.OptionalInt; +-import java.util.Random; +-import java.util.UUID; ++ ++import java.util.*; + import javax.annotation.Nullable; + import net.minecraft.advancements.CriteriaTriggers; + import net.minecraft.advancements.PlayerAdvancements; +@@ -464,6 +460,7 @@ } public void func_70645_a(DamageSource p_70645_1_) { @@ -8,7 +23,7 @@ boolean flag = this.field_70170_p.func_82736_K().func_223586_b(GameRules.field_223609_l); if (flag) { ITextComponent itextcomponent = this.func_110142_aN().func_151521_b(); -@@ -597,12 +598,13 @@ +@@ -597,12 +594,13 @@ @Nullable public Entity func_241206_a_(ServerWorld p_241206_1_) { @@ -23,7 +38,7 @@ if (!this.field_71136_j) { this.field_71136_j = true; this.field_71135_a.func_147359_a(new SChangeGameStatePacket(SChangeGameStatePacket.field_241768_e_, this.field_192040_cp ? 0.0F : 1.0F)); -@@ -616,8 +618,8 @@ +@@ -616,8 +614,8 @@ this.field_71135_a.func_147359_a(new SServerDifficultyPacket(iworldinfo.func_176130_y(), iworldinfo.func_176123_z())); PlayerList playerlist = this.field_71133_b.func_184103_al(); playerlist.func_187243_f(this); @@ -34,7 +49,7 @@ double d0 = this.func_226277_ct_(); double d1 = this.func_226278_cu_(); double d2 = this.func_226281_cx_(); -@@ -689,6 +691,7 @@ +@@ -689,6 +687,7 @@ this.field_71144_ck = -1; this.field_71149_ch = -1.0F; this.field_71146_ci = -1; @@ -42,17 +57,17 @@ return this; } } -@@ -731,6 +734,9 @@ +@@ -731,6 +730,9 @@ } public Either func_213819_a(BlockPos p_213819_1_) { -+ java.util.Optional optAt = java.util.Optional.of(p_213819_1_); ++ Optional optAt = Optional.of(p_213819_1_); + PlayerEntity.SleepResult ret = net.minecraftforge.event.ForgeEventFactory.onPlayerSleepInBed(this, optAt); + if (ret != null) return Either.left(ret); Direction direction = this.field_70170_p.func_180495_p(p_213819_1_).func_177229_b(HorizontalBlock.field_185512_D); if (!this.func_70608_bn() && this.func_70089_S()) { if (!this.field_70170_p.func_230315_m_().func_236043_f_()) { -@@ -775,6 +781,7 @@ +@@ -775,6 +777,7 @@ } private boolean func_241147_a_(BlockPos p_241147_1_, Direction p_241147_2_) { @@ -60,7 +75,7 @@ return this.func_241158_g_(p_241147_1_) || this.func_241158_g_(p_241147_1_.func_177972_a(p_241147_2_.func_176734_d())); } -@@ -874,6 +881,7 @@ +@@ -874,6 +877,7 @@ this.field_71135_a.func_147359_a(new SOpenWindowPacket(container.field_75152_c, container.func_216957_a(), p_213829_1_.func_145748_c_())); container.func_75132_a(this); this.field_71070_bA = container; @@ -68,7 +83,7 @@ return OptionalInt.of(this.field_71139_cq); } } -@@ -892,6 +900,7 @@ +@@ -892,6 +896,7 @@ this.field_71135_a.func_147359_a(new SOpenHorseWindowPacket(this.field_71139_cq, p_184826_2_.func_70302_i_(), p_184826_1_.func_145782_y())); this.field_71070_bA = new HorseInventoryContainer(this.field_71139_cq, this.field_71071_by, p_184826_2_, p_184826_1_); this.field_71070_bA.func_75132_a(this); @@ -76,7 +91,7 @@ } public void func_184814_a(ItemStack p_184814_1_, Hand p_184814_2_) { -@@ -949,6 +958,7 @@ +@@ -949,6 +954,7 @@ public void func_71128_l() { this.field_71070_bA.func_75134_a(this); @@ -84,7 +99,7 @@ this.field_71070_bA = this.field_71069_bz; } -@@ -1075,6 +1085,13 @@ +@@ -1075,6 +1081,13 @@ this.field_193110_cw = p_193104_1_.field_193110_cw; this.func_192029_h(p_193104_1_.func_192023_dk()); this.func_192031_i(p_193104_1_.func_192025_dl()); @@ -98,15 +113,7 @@ } protected void func_70670_a(EffectInstance p_70670_1_) { -@@ -1181,6 +1198,7 @@ - this.field_71140_co = p_147100_1_.func_149520_f(); - this.func_184212_Q().func_187227_b(field_184827_bp, (byte)p_147100_1_.func_149521_d()); - this.func_184212_Q().func_187227_b(field_184828_bq, (byte)(p_147100_1_.func_186991_f() == HandSide.LEFT ? 0 : 1)); -+ this.language = p_147100_1_.getLanguage(); - } - - public ChatVisibility func_147096_v() { -@@ -1291,14 +1309,14 @@ +@@ -1291,14 +1304,14 @@ this.func_184210_p(); if (p_200619_1_ == this.field_70170_p) { this.field_71135_a.func_147364_a(p_200619_2_, p_200619_4_, p_200619_6_, p_200619_8_, p_200619_9_); @@ -124,7 +131,7 @@ this.func_70012_b(p_200619_2_, p_200619_4_, p_200619_6_, p_200619_8_, p_200619_9_); this.func_70029_a(p_200619_1_); p_200619_1_.func_217446_a(this); -@@ -1307,6 +1325,7 @@ +@@ -1307,6 +1320,7 @@ this.field_71134_c.func_73080_a(p_200619_1_); this.field_71133_b.func_184103_al().func_72354_b(this, p_200619_1_); this.field_71133_b.func_184103_al().func_72385_f(this); @@ -132,7 +139,7 @@ } } -@@ -1375,6 +1394,8 @@ +@@ -1375,6 +1389,8 @@ if (itementity == null) { return null; } else { @@ -141,17 +148,3 @@ this.field_70170_p.func_217376_c(itementity); ItemStack itemstack = itementity.func_92059_d(); if (p_146097_3_) { -@@ -1388,4 +1409,13 @@ - return itementity; - } - } -+ -+ private String language = "en_us"; -+ /** -+ * Returns the language last reported by the player as their local language. -+ * Defaults to en_us if the value is unknown. -+ */ -+ public String getLanguage() { -+ return this.language; -+ } - } diff --git a/patches/minecraft/net/minecraft/item/Food.java.patch b/patches/minecraft/net/minecraft/item/Food.java.patch index 98562b88eb5..6d257bb5e26 100644 --- a/patches/minecraft/net/minecraft/item/Food.java.patch +++ b/patches/minecraft/net/minecraft/item/Food.java.patch @@ -6,16 +6,16 @@ private final boolean field_221474_e; - private final List> field_221475_f; + private final List, Float>> field_221475_f; - ++ + private Food(Food.Builder builder) { -+ this.field_221470_a = builder.field_221458_a; -+ this.field_221471_b = builder.field_221459_b; -+ this.field_221472_c = builder.field_221460_c; -+ this.field_221473_d = builder.field_221461_d; -+ this.field_221474_e = builder.field_221462_e; -+ this.field_221475_f = builder.field_221463_f; ++ this.field_221470_a = builder.field_221458_a; ++ this.field_221471_b = builder.field_221459_b; ++ this.field_221472_c = builder.field_221460_c; ++ this.field_221473_d = builder.field_221461_d; ++ this.field_221474_e = builder.field_221462_e; ++ this.field_221475_f = builder.field_221463_f; + } -+ + + // Forge: Use builder method instead + @Deprecated private Food(int p_i50106_1_, float p_i50106_2_, boolean p_i50106_3_, boolean p_i50106_4_, boolean p_i50106_5_, List> p_i50106_6_) { @@ -47,15 +47,16 @@ public Food.Builder func_221456_a(int p_221456_1_) { this.field_221458_a = p_221456_1_; -@@ -79,13 +90,20 @@ +@@ -78,14 +89,21 @@ + this.field_221462_e = true; return this; } - ++ + public Food.Builder effect(java.util.function.Supplier effectIn, float probability) { + this.field_221463_f.add(Pair.of(effectIn, probability)); + return this; + } -+ + + // Forge: Use supplier method instead + @Deprecated public Food.Builder func_221452_a(EffectInstance p_221452_1_, float p_221452_2_) { diff --git a/patches/minecraft/net/minecraft/item/Item.java.patch b/patches/minecraft/net/minecraft/item/Item.java.patch index ad9c9067130..0df3fa5dff8 100644 --- a/patches/minecraft/net/minecraft/item/Item.java.patch +++ b/patches/minecraft/net/minecraft/item/Item.java.patch @@ -131,7 +131,15 @@ public Item.Properties func_221540_a(Food p_221540_1_) { this.field_221541_f = p_221540_1_; -@@ -377,5 +423,20 @@ +@@ -368,6 +414,7 @@ + return this; + } + ++ + public Item.Properties func_208103_a(Rarity p_208103_1_) { + this.field_208104_e = p_208103_1_; + return this; +@@ -377,5 +424,20 @@ this.field_234688_g_ = true; return this; } diff --git a/patches/minecraft/net/minecraft/network/play/client/CClientSettingsPacket.java.patch b/patches/minecraft/net/minecraft/network/play/client/CClientSettingsPacket.java.patch deleted file mode 100644 index 2a2ad07b6b8..00000000000 --- a/patches/minecraft/net/minecraft/network/play/client/CClientSettingsPacket.java.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/net/minecraft/network/play/client/CClientSettingsPacket.java -+++ b/net/minecraft/network/play/client/CClientSettingsPacket.java -@@ -67,4 +67,8 @@ - public HandSide func_186991_f() { - return this.field_186992_f; - } -+ -+ public String getLanguage() { -+ return this.field_149530_a; -+ } - } diff --git a/patches/minecraft/net/minecraft/network/play/server/SJoinGamePacket.java.patch b/patches/minecraft/net/minecraft/network/play/server/SJoinGamePacket.java.patch new file mode 100644 index 00000000000..d3a8aa9669e --- /dev/null +++ b/patches/minecraft/net/minecraft/network/play/server/SJoinGamePacket.java.patch @@ -0,0 +1,10 @@ +--- a/net/minecraft/network/play/server/SJoinGamePacket.java ++++ b/net/minecraft/network/play/server/SJoinGamePacket.java +@@ -21,6 +21,7 @@ + private boolean field_149204_b; + private GameType field_149205_c; + private GameType field_241785_e_; ++ private int dimensionInt; + private Set> field_240811_e_; + private IDynamicRegistries.Impl field_240812_f_; + private RegistryKey field_240813_g_; diff --git a/patches/minecraft/net/minecraft/network/play/server/SRespawnPacket.java.patch b/patches/minecraft/net/minecraft/network/play/server/SRespawnPacket.java.patch new file mode 100644 index 00000000000..770416d5f19 --- /dev/null +++ b/patches/minecraft/net/minecraft/network/play/server/SRespawnPacket.java.patch @@ -0,0 +1,10 @@ +--- a/net/minecraft/network/play/server/SRespawnPacket.java ++++ b/net/minecraft/network/play/server/SRespawnPacket.java +@@ -15,6 +15,7 @@ + public class SRespawnPacket implements IPacket { + private RegistryKey field_240822_a_; + private RegistryKey field_149088_a; ++ private int dimensionInt; + private long field_229746_b_; + private GameType field_149087_c; + private GameType field_241787_e_; diff --git a/patches/minecraft/net/minecraft/server/dedicated/DedicatedServer.java.patch b/patches/minecraft/net/minecraft/server/dedicated/DedicatedServer.java.patch index 488113e5f2c..74db27ad76e 100644 --- a/patches/minecraft/net/minecraft/server/dedicated/DedicatedServer.java.patch +++ b/patches/minecraft/net/minecraft/server/dedicated/DedicatedServer.java.patch @@ -1,6 +1,18 @@ --- a/net/minecraft/server/dedicated/DedicatedServer.java +++ b/net/minecraft/server/dedicated/DedicatedServer.java -@@ -77,6 +77,7 @@ +@@ -12,10 +12,7 @@ + import java.net.InetAddress; + import java.net.Proxy; + import java.nio.charset.StandardCharsets; +-import java.util.Collections; +-import java.util.List; +-import java.util.Locale; +-import java.util.Optional; ++import java.util.*; + import java.util.function.BooleanSupplier; + import java.util.regex.Pattern; + import javax.annotation.Nullable; +@@ -77,6 +74,7 @@ public boolean func_71197_b() throws IOException { Thread thread = new Thread("Server console handler") { public void run() { @@ -8,7 +20,7 @@ BufferedReader bufferedreader = new BufferedReader(new InputStreamReader(System.in, StandardCharsets.UTF_8)); String s1; -@@ -98,7 +99,9 @@ +@@ -98,7 +96,9 @@ field_155771_h.warn("To start the server with more ram, launch it as \"java -Xmx1024M -Xms1024M -jar minecraft_server.jar\""); } @@ -18,7 +30,7 @@ ServerProperties serverproperties = this.field_71340_o.func_219034_a(); if (this.func_71264_H()) { this.func_71189_e("127.0.0.1"); -@@ -153,17 +156,20 @@ +@@ -153,17 +153,20 @@ if (!PreYggdrasilConverter.func_219587_e(this)) { return false; } else { @@ -39,7 +51,7 @@ if (serverproperties.field_219027_u != null) { this.func_200252_aR().func_223585_a(GameRules.field_223620_w).func_223570_a(serverproperties.field_219027_u, this); } -@@ -175,6 +181,7 @@ +@@ -175,6 +178,7 @@ } if (serverproperties.field_219030_x) { @@ -47,7 +59,7 @@ field_155771_h.info("Starting remote control listener"); this.field_71339_n = new MainThread(this); this.field_71339_n.func_72602_a(); -@@ -193,7 +200,8 @@ +@@ -193,7 +197,8 @@ ServerInfoMBean.func_233490_a_(this); } @@ -57,12 +69,12 @@ } } -@@ -506,6 +514,11 @@ +@@ -506,6 +511,11 @@ return false; } + @Override //Forge: Enable formated text for colors in console. -+ public void func_145747_a(net.minecraft.util.text.ITextComponent message, java.util.UUID p_145747_2_) { ++ public void func_145747_a(net.minecraft.util.text.ITextComponent message, UUID p_145747_2_) { + field_155771_h.info(message.getString()); + } + diff --git a/patches/minecraft/net/minecraft/tags/BlockTags.java.patch b/patches/minecraft/net/minecraft/tags/BlockTags.java.patch new file mode 100644 index 00000000000..9ac42e146b0 --- /dev/null +++ b/patches/minecraft/net/minecraft/tags/BlockTags.java.patch @@ -0,0 +1,10 @@ +--- a/net/minecraft/tags/BlockTags.java ++++ b/net/minecraft/tags/BlockTags.java +@@ -76,6 +76,7 @@ + public static final ITag.INamedTag field_232873_an_ = func_199894_a("nylium"); + public static final ITag.INamedTag field_232874_ao_ = func_199894_a("wart_blocks"); + public static final ITag.INamedTag field_232875_ap_ = func_199894_a("beacon_base_blocks"); ++ + public static final ITag.INamedTag field_232876_aq_ = func_199894_a("soul_speed_blocks"); + public static final ITag.INamedTag field_232877_ar_ = func_199894_a("wall_post_override"); + public static final ITag.INamedTag field_232878_as_ = func_199894_a("climbable"); diff --git a/patches/minecraft/net/minecraft/tags/EntityTypeTags.java.patch b/patches/minecraft/net/minecraft/tags/EntityTypeTags.java.patch new file mode 100644 index 00000000000..f26b4a8a5ea --- /dev/null +++ b/patches/minecraft/net/minecraft/tags/EntityTypeTags.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/tags/EntityTypeTags.java ++++ b/net/minecraft/tags/EntityTypeTags.java +@@ -14,7 +14,7 @@ + public static final ITag.INamedTag> field_226156_d_ = func_232896_a_("arrows"); + public static final ITag.INamedTag> field_232893_e_ = func_232896_a_("impact_projectiles"); + +- public static ITag.INamedTag> func_232896_a_(String p_232896_0_) { ++ private static ITag.INamedTag> func_232896_a_(String p_232896_0_) { + return field_219766_c.func_232937_a_(p_232896_0_); + } + diff --git a/patches/minecraft/net/minecraft/tags/FluidTags.java.patch b/patches/minecraft/net/minecraft/tags/FluidTags.java.patch new file mode 100644 index 00000000000..cc0f8ef2177 --- /dev/null +++ b/patches/minecraft/net/minecraft/tags/FluidTags.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/tags/FluidTags.java ++++ b/net/minecraft/tags/FluidTags.java +@@ -12,7 +12,7 @@ + public static final ITag.INamedTag field_206959_a = func_206956_a("water"); + public static final ITag.INamedTag field_206960_b = func_206956_a("lava"); + +- public static ITag.INamedTag func_206956_a(String p_206956_0_) { ++ private static ITag.INamedTag func_206956_a(String p_206956_0_) { + return field_206961_c.func_232937_a_(p_206956_0_); + } + diff --git a/patches/minecraft/net/minecraft/tags/Tag.java.patch b/patches/minecraft/net/minecraft/tags/Tag.java.patch new file mode 100644 index 00000000000..8d9fc88be70 --- /dev/null +++ b/patches/minecraft/net/minecraft/tags/Tag.java.patch @@ -0,0 +1,15 @@ +--- a/net/minecraft/tags/Tag.java ++++ b/net/minecraft/tags/Tag.java +@@ -18,10 +18,12 @@ + this.field_241282_b_ = ImmutableList.copyOf(p_i241226_1_); + } + ++ //TODO: empty + public static Tag func_241284_a_() { + return new Tag<>(ImmutableSet.of(), Void.class); + } + ++ //TODO OF + public static Tag func_241286_a_(Set p_241286_0_) { + return new Tag<>(p_241286_0_, func_241287_c_(p_241286_0_)); + } diff --git a/patches/minecraft/net/minecraft/world/gen/IWorldGenerationBaseReader.java.patch b/patches/minecraft/net/minecraft/world/gen/IWorldGenerationBaseReader.java.patch new file mode 100644 index 00000000000..1be61e104a5 --- /dev/null +++ b/patches/minecraft/net/minecraft/world/gen/IWorldGenerationBaseReader.java.patch @@ -0,0 +1,8 @@ +--- a/net/minecraft/world/gen/IWorldGenerationBaseReader.java ++++ b/net/minecraft/world/gen/IWorldGenerationBaseReader.java +@@ -8,4 +8,5 @@ + boolean func_217375_a(BlockPos p_217375_1_, Predicate p_217375_2_); + + BlockPos func_205770_a(Heightmap.Type p_205770_1_, BlockPos p_205770_2_); ++ + } diff --git a/patches/minecraft/net/minecraft/world/gen/feature/structure/Structure.java.patch b/patches/minecraft/net/minecraft/world/gen/feature/structure/Structure.java.patch index 251ec740e03..71d3ddf7e48 100644 --- a/patches/minecraft/net/minecraft/world/gen/feature/structure/Structure.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/feature/structure/Structure.java.patch @@ -1,11 +1,15 @@ --- a/net/minecraft/world/gen/feature/structure/Structure.java +++ b/net/minecraft/world/gen/feature/structure/Structure.java -@@ -35,7 +35,7 @@ +@@ -32,10 +32,11 @@ + import net.minecraft.world.gen.feature.StructureFeature; + import net.minecraft.world.gen.feature.template.TemplateManager; + import net.minecraft.world.gen.settings.StructureSeparationSettings; ++import net.minecraftforge.registries.ForgeRegistryEntry; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -public abstract class Structure { -+public abstract class Structure extends net.minecraftforge.registries.ForgeRegistryEntry> { ++public abstract class Structure extends ForgeRegistryEntry> { public static final BiMap> field_236365_a_ = HashBiMap.create(); private static final Map, GenerationStage.Decoration> field_236385_u_ = Maps.newHashMap(); private static final Logger field_208204_b = LogManager.getLogger(); diff --git a/patches/minecraft/net/minecraft/world/gen/feature/template/StructureProcessor.java.patch b/patches/minecraft/net/minecraft/world/gen/feature/template/StructureProcessor.java.patch index 398d94f1626..548130a675b 100644 --- a/patches/minecraft/net/minecraft/world/gen/feature/template/StructureProcessor.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/feature/template/StructureProcessor.java.patch @@ -7,7 +7,7 @@ - public abstract Template.BlockInfo func_230386_a_(IWorldReader p_230386_1_, BlockPos p_230386_2_, BlockPos p_230386_3_, Template.BlockInfo p_230386_4_, Template.BlockInfo p_230386_5_, PlacementSettings p_230386_6_); + @Deprecated //Forge: Use process below, with the Template context + public Template.BlockInfo func_230386_a_(IWorldReader p_230386_1_, BlockPos p_230386_2_, BlockPos p_230386_3_, Template.BlockInfo p_230386_4_, Template.BlockInfo p_230386_5_, PlacementSettings p_230386_6_) { -+ return p_230386_5_; ++ return p_230386_5_; + } protected abstract IStructureProcessorType func_215192_a(); diff --git a/patches/minecraft/net/minecraft/world/gen/feature/template/Template.java.patch b/patches/minecraft/net/minecraft/world/gen/feature/template/Template.java.patch index 6e4e4233cc7..becf516cf3e 100644 --- a/patches/minecraft/net/minecraft/world/gen/feature/template/Template.java.patch +++ b/patches/minecraft/net/minecraft/world/gen/feature/template/Template.java.patch @@ -35,7 +35,7 @@ + @Deprecated //Use Forge version public static List func_237145_a_(IWorld p_237145_0_, BlockPos p_237145_1_, BlockPos p_237145_2_, PlacementSettings p_237145_3_, List p_237145_4_) { -+ return processBlockInfos(p_237145_0_, p_237145_1_, p_237145_2_, p_237145_3_, p_237145_4_, null); ++ return processBlockInfos(p_237145_0_, p_237145_1_, p_237145_2_, p_237145_3_, p_237145_4_, null); + } + + public static List processBlockInfos(IWorld p_237145_0_, BlockPos p_237145_1_, BlockPos p_237145_2_, PlacementSettings p_237145_3_, List p_237145_4_, @Nullable Template template) {