diff --git a/patches/minecraft/net/minecraft/client/Minecraft.java.patch b/patches/minecraft/net/minecraft/client/Minecraft.java.patch index 3685d324b5..0760f988ae 100644 --- a/patches/minecraft/net/minecraft/client/Minecraft.java.patch +++ b/patches/minecraft/net/minecraft/client/Minecraft.java.patch @@ -16,7 +16,7 @@ this.field_71459_aj = p_i45547_1_.field_178741_d.field_178756_a; this.field_238175_ae_ = !p_i45547_1_.field_178741_d.field_239099_d_; this.field_238176_af_ = !p_i45547_1_.field_178741_d.field_239100_e_; -@@ -415,14 +415,15 @@ +@@ -415,13 +415,13 @@ this.field_195558_d.func_216526_a(this.field_71474_y.field_74350_i); this.field_71417_B = new MouseHelper(this); @@ -31,8 +31,7 @@ this.field_110448_aq.func_198983_a(); this.field_71474_y.func_198017_a(this.field_110448_aq); this.field_135017_as = new LanguageManager(this.field_71474_y.field_74363_ab); - this.field_110451_am.func_219534_a(this.field_135017_as); -@@ -462,6 +463,7 @@ +@@ -462,6 +462,7 @@ this.func_193986_ar(); this.field_110451_am.func_219534_a(this.field_193995_ae); this.field_71452_i = new ParticleManager(this.field_71441_e, this.field_71446_o); @@ -40,7 +39,7 @@ this.field_110451_am.func_219534_a(this.field_71452_i); this.field_213272_aL = new PaintingSpriteUploader(this.field_71446_o); this.field_110451_am.func_219534_a(this.field_213272_aL); -@@ -469,7 +471,8 @@ +@@ -469,7 +470,8 @@ this.field_110451_am.func_219534_a(this.field_213273_aM); this.field_241557_ar_ = new GPUWarning(); this.field_110451_am.func_219534_a(this.field_241557_ar_); @@ -50,7 +49,7 @@ this.field_184132_p = new DebugRenderer(this); RenderSystem.setErrorCallback(this::func_195545_a); if (this.field_71474_y.field_74353_u && !this.field_195558_d.func_198113_j()) { -@@ -481,11 +484,6 @@ +@@ -481,11 +483,6 @@ this.field_195558_d.func_224798_d(this.field_71474_y.field_225307_E); this.field_195558_d.func_227801_c_(); this.func_213226_a(); @@ -62,7 +61,7 @@ ResourceLoadProgressGui.func_212970_a(this); List list = this.field_110448_aq.func_232623_f_(); -@@ -494,7 +492,14 @@ +@@ -494,7 +491,14 @@ if (SharedConstants.field_206244_b) { this.func_213256_aB(); } @@ -78,7 +77,7 @@ }); }, false)); } -@@ -533,7 +538,7 @@ +@@ -533,7 +537,7 @@ } private void func_229988_a_(Throwable p_229988_1_) { @@ -87,7 +86,7 @@ ITextComponent itextcomponent; if (p_229988_1_ instanceof SimpleReloadableResourceManager.FailedPackException) { itextcomponent = new StringTextComponent(((SimpleReloadableResourceManager.FailedPackException)p_229988_1_).func_241203_a().func_195762_a()); -@@ -621,7 +626,7 @@ +@@ -621,7 +625,7 @@ return Stream.of(Registry.field_212630_s.func_177774_c(p_213251_0_.func_77973_b())); }); SearchTreeReloadable searchtreereloadable = new SearchTreeReloadable<>((p_213235_0_) -> { @@ -96,7 +95,7 @@ }); NonNullList nonnulllist = NonNullList.func_191196_a(); -@@ -691,13 +696,13 @@ +@@ -691,13 +695,13 @@ Bootstrap.func_179870_a(p_71377_0_.func_71502_e()); if (p_71377_0_.func_71497_f() != null) { Bootstrap.func_179870_a("#@!@# Game crashed! Crash report saved to: #@!@# " + p_71377_0_.func_71497_f()); @@ -113,7 +112,7 @@ } } -@@ -706,6 +711,7 @@ +@@ -706,6 +710,7 @@ return this.field_71474_y.field_211842_aO; } @@ -121,7 +120,7 @@ public CompletableFuture func_213237_g() { if (this.field_213276_aV != null) { return this.field_213276_aV; -@@ -794,10 +800,6 @@ +@@ -794,10 +799,6 @@ } public void func_147108_a(@Nullable Screen p_147108_1_) { @@ -132,7 +131,7 @@ if (p_147108_1_ == null && this.field_71441_e == null) { p_147108_1_ = new MainMenuScreen(); } else if (p_147108_1_ == null && this.field_71439_g.func_233643_dh_()) { -@@ -808,6 +810,14 @@ +@@ -808,6 +809,14 @@ } } @@ -147,7 +146,7 @@ if (p_147108_1_ instanceof MainMenuScreen || p_147108_1_ instanceof MultiplayerScreen) { this.field_71474_y.field_74330_P = false; this.field_71456_v.func_146158_b().func_146231_a(true); -@@ -939,11 +949,13 @@ +@@ -939,11 +948,13 @@ RenderSystem.enableCull(); this.field_71424_I.func_76319_b(); if (!this.field_71454_w) { @@ -161,7 +160,7 @@ } if (this.field_238174_aV_ != null) { -@@ -1042,6 +1054,7 @@ +@@ -1042,6 +1053,7 @@ Framebuffer framebuffer = this.func_147110_a(); framebuffer.func_216491_a(this.field_195558_d.func_198109_k(), this.field_195558_d.func_198091_l(), field_142025_a); @@ -169,7 +168,7 @@ this.field_71460_t.func_147704_a(this.field_195558_d.func_198109_k(), this.field_195558_d.func_198091_l()); this.field_71417_B.func_198021_g(); } -@@ -1230,11 +1243,21 @@ +@@ -1230,11 +1242,21 @@ if (p_147115_1_ && this.field_71476_x != null && this.field_71476_x.func_216346_c() == RayTraceResult.Type.BLOCK) { BlockRayTraceResult blockraytraceresult = (BlockRayTraceResult)this.field_71476_x; BlockPos blockpos = blockraytraceresult.func_216350_a(); @@ -193,7 +192,7 @@ } } -@@ -1253,6 +1276,8 @@ +@@ -1253,6 +1275,8 @@ } } else if (!this.field_71439_g.func_184838_M()) { @@ -202,7 +201,7 @@ switch(this.field_71476_x.func_216346_c()) { case ENTITY: this.field_71442_b.func_78764_a(this.field_71439_g, ((EntityRayTraceResult)this.field_71476_x).func_216348_a()); -@@ -1260,7 +1285,7 @@ +@@ -1260,7 +1284,7 @@ case BLOCK: BlockRayTraceResult blockraytraceresult = (BlockRayTraceResult)this.field_71476_x; BlockPos blockpos = blockraytraceresult.func_216350_a(); @@ -211,7 +210,7 @@ this.field_71442_b.func_180511_b(blockpos, blockraytraceresult.func_216354_b()); break; } -@@ -1270,8 +1295,10 @@ +@@ -1270,8 +1294,10 @@ } this.field_71439_g.func_184821_cY(); @@ -222,7 +221,7 @@ this.field_71439_g.func_184609_a(Hand.MAIN_HAND); } } -@@ -1286,6 +1313,11 @@ +@@ -1286,6 +1312,11 @@ } for(Hand hand : Hand.values()) { @@ -234,7 +233,7 @@ ItemStack itemstack = this.field_71439_g.func_184586_b(hand); if (this.field_71476_x != null) { switch(this.field_71476_x.func_216346_c()) { -@@ -1299,6 +1331,7 @@ +@@ -1299,6 +1330,7 @@ if (actionresulttype.func_226246_a_()) { if (actionresulttype.func_226247_b_()) { @@ -242,7 +241,7 @@ this.field_71439_g.func_184609_a(hand); } -@@ -1311,6 +1344,7 @@ +@@ -1311,6 +1343,7 @@ ActionResultType actionresulttype1 = this.field_71442_b.func_217292_a(this.field_71439_g, this.field_71441_e, hand, blockraytraceresult); if (actionresulttype1.func_226246_a_()) { if (actionresulttype1.func_226247_b_()) { @@ -250,7 +249,7 @@ this.field_71439_g.func_184609_a(hand); if (!itemstack.func_190926_b() && (itemstack.func_190916_E() != i || this.field_71442_b.func_78758_h())) { this.field_71460_t.field_78516_c.func_187460_a(hand); -@@ -1326,6 +1360,9 @@ +@@ -1326,6 +1359,9 @@ } } @@ -260,7 +259,7 @@ if (!itemstack.func_190926_b()) { ActionResultType actionresulttype2 = this.field_71442_b.func_187101_a(this.field_71439_g, this.field_71441_e, hand); if (actionresulttype2.func_226246_a_()) { -@@ -1352,6 +1389,8 @@ +@@ -1352,6 +1388,8 @@ --this.field_71467_ac; } @@ -269,7 +268,7 @@ this.field_71424_I.func_76320_a("gui"); if (!this.field_71445_n) { this.field_71456_v.func_73831_a(); -@@ -1468,6 +1507,8 @@ +@@ -1468,6 +1506,8 @@ this.field_71424_I.func_219895_b("keyboard"); this.field_195559_v.func_204870_b(); this.field_71424_I.func_76319_b(); @@ -278,7 +277,7 @@ } private void func_184117_aA() { -@@ -1697,7 +1738,12 @@ +@@ -1697,7 +1737,12 @@ networkmanager.func_150719_a(new ClientLoginNetHandler(networkmanager, this, (Screen)null, (p_229998_0_) -> { })); networkmanager.func_179290_a(new CHandshakePacket(socketaddress.toString(), 0, ProtocolType.LOGIN)); @@ -292,7 +291,7 @@ this.field_71453_ak = networkmanager; } else { this.func_241559_a_(p_238195_6_, p_238195_1_, flag, () -> { -@@ -1771,6 +1817,7 @@ +@@ -1771,6 +1816,7 @@ } public void func_71403_a(ClientWorld p_71403_1_) { @@ -300,7 +299,7 @@ WorkingScreen workingscreen = new WorkingScreen(); workingscreen.func_200210_a(new TranslationTextComponent("connect.joining")); this.func_213241_c(workingscreen); -@@ -1802,10 +1849,12 @@ +@@ -1802,10 +1848,12 @@ IntegratedServer integratedserver = this.field_71437_Z; this.field_71437_Z = null; this.field_71460_t.func_190564_k(); @@ -313,7 +312,7 @@ if (integratedserver != null) { this.field_71424_I.func_76320_a("waitForServer"); -@@ -1820,6 +1869,7 @@ +@@ -1820,6 +1868,7 @@ this.field_71456_v.func_181029_i(); this.field_71422_O = null; this.field_71455_al = false; @@ -321,7 +320,7 @@ this.field_213274_aO.func_216815_b(); } -@@ -1850,6 +1900,7 @@ +@@ -1850,6 +1899,7 @@ this.field_71452_i.func_78870_a(p_213257_1_); TileEntityRendererDispatcher.field_147556_a.func_147543_a(p_213257_1_); this.func_230150_b_(); @@ -329,7 +328,7 @@ } public boolean func_238216_r_() { -@@ -1895,112 +1946,9 @@ +@@ -1895,112 +1945,9 @@ private void func_147112_ai() { if (this.field_71476_x != null && this.field_71476_x.func_216346_c() != RayTraceResult.Type.MISS) { @@ -445,7 +444,7 @@ } } -@@ -2090,6 +2038,7 @@ +@@ -2090,6 +2037,7 @@ return field_71432_P; } @@ -453,7 +452,7 @@ public CompletableFuture func_213245_w() { return this.func_213169_a(this::func_213237_g).thenCompose((p_229993_0_) -> { return p_229993_0_; -@@ -2397,7 +2346,7 @@ +@@ -2397,7 +2345,7 @@ supplier = func_228022_c_(supplier); } @@ -462,7 +461,7 @@ } private static Supplier func_228021_b_(Supplier p_228021_0_) { -@@ -2416,6 +2365,14 @@ +@@ -2416,6 +2364,14 @@ this.field_175617_aL.func_229355_a_(p_228020_1_); } diff --git a/patches/minecraft/net/minecraft/item/crafting/Ingredient.java.patch b/patches/minecraft/net/minecraft/item/crafting/Ingredient.java.patch index bb06a59ac9..1001c91d6c 100644 --- a/patches/minecraft/net/minecraft/item/crafting/Ingredient.java.patch +++ b/patches/minecraft/net/minecraft/item/crafting/Ingredient.java.patch @@ -20,7 +20,7 @@ this.field_199807_b = p_i49381_1_.toArray((p_209360_0_) -> { return new Ingredient.IItemList[p_209360_0_]; }); -+ this.isSimple = !net.minecraftforge.fml.DatagenModLoader.isDataGenRunning() && !Arrays.stream(field_199807_b).anyMatch(list -> list.func_199799_a().stream().anyMatch(stack -> stack.func_77973_b().isDamageable(stack))); ++ this.isSimple = !net.minecraftforge.fml.DatagenModLoader.isRunningDataGen() && !Arrays.stream(field_199807_b).anyMatch(list -> list.func_199799_a().stream().anyMatch(stack -> stack.func_77973_b().isDamageable(stack))); + Ingredient.INSTANCES.add(this); } diff --git a/src/main/java/net/minecraftforge/registries/GameData.java b/src/main/java/net/minecraftforge/registries/GameData.java index f54db22f43..f32beb42e7 100644 --- a/src/main/java/net/minecraftforge/registries/GameData.java +++ b/src/main/java/net/minecraftforge/registries/GameData.java @@ -53,6 +53,7 @@ import net.minecraft.util.RegistryKey; import net.minecraft.util.ResourceLocation; import net.minecraft.util.SoundEvent; import net.minecraft.util.registry.DefaultedRegistry; +import net.minecraft.util.registry.Registry; import net.minecraft.util.registry.SimpleRegistry; import net.minecraft.village.PointOfInterestType; import net.minecraft.world.biome.Biome; @@ -331,11 +332,11 @@ public class GameData keys.sort((o1, o2) -> String.valueOf(o1).compareToIgnoreCase(String.valueOf(o2))); //Move Blocks to first, and Items to second. - keys.remove(BLOCKS); - keys.remove(ITEMS); + keys.remove(BLOCKS.func_240901_a_()); + keys.remove(ITEMS.func_240901_a_()); - keys.add(0, BLOCKS); - keys.add(1, ITEMS); + keys.add(0, BLOCKS.func_240901_a_()); + keys.add(1, ITEMS.func_240901_a_()); return keys.stream().map(rl -> mc -> RegistryManager.ACTIVE.getRegistry(rl).getRegisterEvent(rl)); }