diff --git a/buildSrc/src/main/groovy/net/minecraftforge/mcpconfig/tasks/Utils.groovy b/buildSrc/src/main/groovy/net/minecraftforge/mcpconfig/tasks/Utils.groovy index b2d99809..a049f46c 100644 --- a/buildSrc/src/main/groovy/net/minecraftforge/mcpconfig/tasks/Utils.groovy +++ b/buildSrc/src/main/groovy/net/minecraftforge/mcpconfig/tasks/Utils.groovy @@ -26,7 +26,7 @@ class Utils { } File.metaClass.getSha1 = { !delegate.exists() ? null : MessageDigest.getInstance('SHA-1').digest(delegate.bytes).encodeHex().toString() } - File.metaClass.getJson = { return delegate.exists() ? new JsonSlurper().parse(delegate) : [:] } + File.metaClass.getJson = { return delegate.exists() ? new JsonSlurper().parseText(delegate.text) : [:] } File.metaClass.setJson = { json -> delegate.text = new JsonBuilder(json).toPrettyString() } } diff --git a/versions/snapshot/1.20/23w44a/config.json b/versions/snapshot/1.20/23w44a/config.json index 7bb4713a..54b9ee9e 100644 --- a/versions/snapshot/1.20/23w44a/config.json +++ b/versions/snapshot/1.20/23w44a/config.json @@ -7,7 +7,7 @@ "fernflower": { "version": "org.vineflower:vineflower:1.9.3", "java_version": 17, - "args": ["-din=1", "-rbr=1", "-dgs=1", "-asc=1", "-rsy=1", "-iec=1", "-jvn=1", "-iib=1", "-bsm=1", "-dcl=1", "-nls=1", "-log=TRACE", "-cfg", "{libraries}", "{input}", "{output}"], + "args": ["-din=1", "-rbr=1", "-dgs=1", "-asc=1", "-rsy=1", "-iec=1", "-jvn=1", "-iib=1", "-bsm=1", "-dcl=1", "-nls=1", "-ind= ", "-log=TRACE", "-cfg", "{libraries}", "{input}", "{output}"], "jvmargs": ["-Xmx4G"] }, "merge": { diff --git a/versions/snapshot/1.20/23w44a/patches/client/com/mojang/blaze3d/platform/MacosUtil.java.patch b/versions/snapshot/1.20/23w44a/patches/client/com/mojang/blaze3d/platform/MacosUtil.java.patch index dbc2e417..b7d3648b 100644 --- a/versions/snapshot/1.20/23w44a/patches/client/com/mojang/blaze3d/platform/MacosUtil.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/client/com/mojang/blaze3d/platform/MacosUtil.java.patch @@ -1,11 +1,11 @@ --- a/com/mojang/blaze3d/platform/MacosUtil.java +++ b/com/mojang/blaze3d/platform/MacosUtil.java @@ -35,7 +35,7 @@ - } + } - private static long getStyleMask(NSObject p_304421_) { -- return p_304421_.sendRaw("styleMask", new Object[0]); -+ return (long)p_304421_.sendRaw("styleMask", new Object[0]); - } + private static long getStyleMask(NSObject p_304421_) { +- return p_304421_.sendRaw("styleMask", new Object[0]); ++ return (long)p_304421_.sendRaw("styleMask", new Object[0]); + } - private static void toggleNativeFullscreen(NSObject p_182524_) { + private static void toggleNativeFullscreen(NSObject p_182524_) { diff --git a/versions/snapshot/1.20/23w44a/patches/client/com/mojang/realmsclient/RealmsMainScreen.java.patch b/versions/snapshot/1.20/23w44a/patches/client/com/mojang/realmsclient/RealmsMainScreen.java.patch index a9a70366..3c9bf389 100644 --- a/versions/snapshot/1.20/23w44a/patches/client/com/mojang/realmsclient/RealmsMainScreen.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/client/com/mojang/realmsclient/RealmsMainScreen.java.patch @@ -2,11 +2,11 @@ +++ b/com/mojang/realmsclient/RealmsMainScreen.java @@ -549,8 +549,7 @@ - @Nullable - private RealmsServer getSelectedServer() { -- AbstractSelectionList.Entry abstractselectionlist$entry = this.realmSelectionList.getSelected(); -- return abstractselectionlist$entry instanceof RealmsMainScreen.ServerEntry realmsmainscreen$serverentry ? realmsmainscreen$serverentry.getServer() : null; -+ return this.realmSelectionList.getSelected() instanceof RealmsMainScreen.ServerEntry realmsmainscreen$serverentry ? realmsmainscreen$serverentry.getServer() : null; - } - - private void leaveServer(boolean p_193494_, final RealmsServer p_193495_) { + @Nullable + private RealmsServer getSelectedServer() { +- AbstractSelectionList.Entry abstractselectionlist$entry = this.realmSelectionList.getSelected(); +- return abstractselectionlist$entry instanceof RealmsMainScreen.ServerEntry realmsmainscreen$serverentry ++ return this.realmSelectionList.getSelected() instanceof RealmsMainScreen.ServerEntry realmsmainscreen$serverentry + ? realmsmainscreen$serverentry.getServer() + : null; + } diff --git a/versions/snapshot/1.20/23w44a/patches/client/com/mojang/realmsclient/gui/screens/RealmsBackupInfoScreen.java.patch b/versions/snapshot/1.20/23w44a/patches/client/com/mojang/realmsclient/gui/screens/RealmsBackupInfoScreen.java.patch index 55d3f331..ab5551d1 100644 --- a/versions/snapshot/1.20/23w44a/patches/client/com/mojang/realmsclient/gui/screens/RealmsBackupInfoScreen.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/client/com/mojang/realmsclient/gui/screens/RealmsBackupInfoScreen.java.patch @@ -1,12 +1,12 @@ --- a/com/mojang/realmsclient/gui/screens/RealmsBackupInfoScreen.java +++ b/com/mojang/realmsclient/gui/screens/RealmsBackupInfoScreen.java @@ -35,8 +35,7 @@ - this.addRenderableWidget(this.backupInfoList); - this.layout.addToFooter(Button.builder(CommonComponents.GUI_BACK, p_299754_ -> this.onClose()).build()); - this.layout.arrangeElements(); -- this.layout.visitWidgets(p_299756_ -> { -- }); -+ this.layout.visitWidgets(this::addRenderableWidget); - } + this.addRenderableWidget(this.backupInfoList); + this.layout.addToFooter(Button.builder(CommonComponents.GUI_BACK, p_299754_ -> this.onClose()).build()); + this.layout.arrangeElements(); +- this.layout.visitWidgets(p_299756_ -> { +- }); ++ this.layout.visitWidgets(this::addRenderableWidget); + } - @Override + @Override diff --git a/versions/snapshot/1.20/23w44a/patches/client/com/mojang/realmsclient/gui/screens/RealmsCreateRealmScreen.java.patch b/versions/snapshot/1.20/23w44a/patches/client/com/mojang/realmsclient/gui/screens/RealmsCreateRealmScreen.java.patch index 2e43c140..9cef8564 100644 --- a/versions/snapshot/1.20/23w44a/patches/client/com/mojang/realmsclient/gui/screens/RealmsCreateRealmScreen.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/client/com/mojang/realmsclient/gui/screens/RealmsCreateRealmScreen.java.patch @@ -1,12 +1,12 @@ --- a/com/mojang/realmsclient/gui/screens/RealmsCreateRealmScreen.java +++ b/com/mojang/realmsclient/gui/screens/RealmsCreateRealmScreen.java @@ -56,8 +56,7 @@ - LinearLayout linearlayout1 = this.layout.addToFooter(LinearLayout.horizontal().spacing(10)); - linearlayout1.addChild(button); - linearlayout1.addChild(Button.builder(CommonComponents.GUI_BACK, p_293570_ -> this.onClose()).build()); -- this.layout.visitWidgets(p_293566_ -> { -- }); -+ this.layout.visitWidgets(this::addRenderableWidget); - this.repositionElements(); - this.setInitialFocus(this.nameBox); - } + LinearLayout linearlayout1 = this.layout.addToFooter(LinearLayout.horizontal().spacing(10)); + linearlayout1.addChild(button); + linearlayout1.addChild(Button.builder(CommonComponents.GUI_BACK, p_293570_ -> this.onClose()).build()); +- this.layout.visitWidgets(p_293566_ -> { +- }); ++ this.layout.visitWidgets(this::addRenderableWidget); + this.repositionElements(); + this.setInitialFocus(this.nameBox); + } diff --git a/versions/snapshot/1.20/23w44a/patches/client/com/mojang/realmsclient/gui/screens/RealmsLongRunningMcoTaskScreen.java.patch b/versions/snapshot/1.20/23w44a/patches/client/com/mojang/realmsclient/gui/screens/RealmsLongRunningMcoTaskScreen.java.patch index c1810da0..d183e5da 100644 --- a/versions/snapshot/1.20/23w44a/patches/client/com/mojang/realmsclient/gui/screens/RealmsLongRunningMcoTaskScreen.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/client/com/mojang/realmsclient/gui/screens/RealmsLongRunningMcoTaskScreen.java.patch @@ -1,12 +1,12 @@ --- a/com/mojang/realmsclient/gui/screens/RealmsLongRunningMcoTaskScreen.java +++ b/com/mojang/realmsclient/gui/screens/RealmsLongRunningMcoTaskScreen.java @@ -78,8 +78,7 @@ - this.loadingDotsWidget = new LoadingDotsWidget(this.font, this.title); - this.layout.addChild(this.loadingDotsWidget, p_300631_ -> p_300631_.paddingBottom(30)); - this.layout.addChild(Button.builder(CommonComponents.GUI_CANCEL, p_300632_ -> this.cancel()).build()); -- this.layout.visitWidgets(p_300634_ -> { -- }); -+ this.layout.visitWidgets(this::addRenderableWidget); - this.repositionElements(); - } + this.loadingDotsWidget = new LoadingDotsWidget(this.font, this.title); + this.layout.addChild(this.loadingDotsWidget, p_300631_ -> p_300631_.paddingBottom(30)); + this.layout.addChild(Button.builder(CommonComponents.GUI_CANCEL, p_300632_ -> this.cancel()).build()); +- this.layout.visitWidgets(p_300634_ -> { +- }); ++ this.layout.visitWidgets(this::addRenderableWidget); + this.repositionElements(); + } diff --git a/versions/snapshot/1.20/23w44a/patches/client/com/mojang/realmsclient/gui/screens/RealmsParentalConsentScreen.java.patch b/versions/snapshot/1.20/23w44a/patches/client/com/mojang/realmsclient/gui/screens/RealmsParentalConsentScreen.java.patch index cd51dd0a..eda32144 100644 --- a/versions/snapshot/1.20/23w44a/patches/client/com/mojang/realmsclient/gui/screens/RealmsParentalConsentScreen.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/client/com/mojang/realmsclient/gui/screens/RealmsParentalConsentScreen.java.patch @@ -1,12 +1,12 @@ --- a/com/mojang/realmsclient/gui/screens/RealmsParentalConsentScreen.java +++ b/com/mojang/realmsclient/gui/screens/RealmsParentalConsentScreen.java @@ -35,8 +35,7 @@ - Component component = Component.translatable("mco.account.privacy.info.button"); - linearlayout.addChild(Button.builder(component, ConfirmLinkScreen.confirmLink(this, "https://aka.ms/MinecraftGDPR")).build()); - linearlayout.addChild(Button.builder(CommonComponents.GUI_BACK, p_307025_ -> this.onClose()).build()); -- this.layout.visitWidgets(p_307027_ -> { -- }); -+ this.layout.visitWidgets(this::addRenderableWidget); - this.repositionElements(); - } + Component component = Component.translatable("mco.account.privacy.info.button"); + linearlayout.addChild(Button.builder(component, ConfirmLinkScreen.confirmLink(this, "https://aka.ms/MinecraftGDPR")).build()); + linearlayout.addChild(Button.builder(CommonComponents.GUI_BACK, p_307025_ -> this.onClose()).build()); +- this.layout.visitWidgets(p_307027_ -> { +- }); ++ this.layout.visitWidgets(this::addRenderableWidget); + this.repositionElements(); + } diff --git a/versions/snapshot/1.20/23w44a/patches/client/com/mojang/realmsclient/gui/screens/RealmsResetNormalWorldScreen.java.patch b/versions/snapshot/1.20/23w44a/patches/client/com/mojang/realmsclient/gui/screens/RealmsResetNormalWorldScreen.java.patch index f3336abb..5e5f59e1 100644 --- a/versions/snapshot/1.20/23w44a/patches/client/com/mojang/realmsclient/gui/screens/RealmsResetNormalWorldScreen.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/client/com/mojang/realmsclient/gui/screens/RealmsResetNormalWorldScreen.java.patch @@ -1,12 +1,12 @@ --- a/com/mojang/realmsclient/gui/screens/RealmsResetNormalWorldScreen.java +++ b/com/mojang/realmsclient/gui/screens/RealmsResetNormalWorldScreen.java @@ -63,8 +63,7 @@ - LinearLayout linearlayout1 = this.layout.addToFooter(LinearLayout.horizontal().spacing(10)); - linearlayout1.addChild(Button.builder(this.buttonTitle, p_293585_ -> this.callback.accept(this.createWorldGenerationInfo())).build()); - linearlayout1.addChild(Button.builder(CommonComponents.GUI_BACK, p_89288_ -> this.onClose()).build()); -- this.layout.visitWidgets(p_293583_ -> { -- }); -+ this.layout.visitWidgets(this::addRenderableWidget); - this.repositionElements(); - } + LinearLayout linearlayout1 = this.layout.addToFooter(LinearLayout.horizontal().spacing(10)); + linearlayout1.addChild(Button.builder(this.buttonTitle, p_293585_ -> this.callback.accept(this.createWorldGenerationInfo())).build()); + linearlayout1.addChild(Button.builder(CommonComponents.GUI_BACK, p_89288_ -> this.onClose()).build()); +- this.layout.visitWidgets(p_293583_ -> { +- }); ++ this.layout.visitWidgets(this::addRenderableWidget); + this.repositionElements(); + } diff --git a/versions/snapshot/1.20/23w44a/patches/client/com/mojang/realmsclient/gui/screens/RealmsResetWorldScreen.java.patch b/versions/snapshot/1.20/23w44a/patches/client/com/mojang/realmsclient/gui/screens/RealmsResetWorldScreen.java.patch index d6a59480..1cd38d5c 100644 --- a/versions/snapshot/1.20/23w44a/patches/client/com/mojang/realmsclient/gui/screens/RealmsResetWorldScreen.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/client/com/mojang/realmsclient/gui/screens/RealmsResetWorldScreen.java.patch @@ -1,12 +1,12 @@ --- a/com/mojang/realmsclient/gui/screens/RealmsResetWorldScreen.java +++ b/com/mojang/realmsclient/gui/screens/RealmsResetWorldScreen.java -@@ -213,8 +213,7 @@ - ) - ); - this.layout.addToFooter(Button.builder(CommonComponents.GUI_BACK, p_300644_ -> this.onClose()).build()); -- this.layout.visitWidgets(p_300642_ -> { -- }); -+ this.layout.visitWidgets(this::addRenderableWidget); - this.layout.arrangeElements(); - } +@@ -223,8 +223,7 @@ + ) + ); + this.layout.addToFooter(Button.builder(CommonComponents.GUI_BACK, p_300644_ -> this.onClose()).build()); +- this.layout.visitWidgets(p_300642_ -> { +- }); ++ this.layout.visitWidgets(this::addRenderableWidget); + this.layout.arrangeElements(); + } diff --git a/versions/snapshot/1.20/23w44a/patches/client/com/mojang/realmsclient/gui/screens/RealmsSelectWorldTemplateScreen.java.patch b/versions/snapshot/1.20/23w44a/patches/client/com/mojang/realmsclient/gui/screens/RealmsSelectWorldTemplateScreen.java.patch index 7a671657..a28a28bb 100644 --- a/versions/snapshot/1.20/23w44a/patches/client/com/mojang/realmsclient/gui/screens/RealmsSelectWorldTemplateScreen.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/client/com/mojang/realmsclient/gui/screens/RealmsSelectWorldTemplateScreen.java.patch @@ -1,26 +1,26 @@ --- a/com/mojang/realmsclient/gui/screens/RealmsSelectWorldTemplateScreen.java +++ b/com/mojang/realmsclient/gui/screens/RealmsSelectWorldTemplateScreen.java -@@ -154,9 +154,9 @@ - public void run() { - WorldTemplatePaginatedList worldtemplatepaginatedlist = p_89654_; - -- Either either; -- for(RealmsClient realmsclient = RealmsClient.create(); -- worldtemplatepaginatedlist != null; -+ RealmsClient realmsclient = RealmsClient.create(); -+ while(worldtemplatepaginatedlist != null) { -+ Either either = RealmsSelectWorldTemplateScreen.this.fetchTemplates(worldtemplatepaginatedlist, realmsclient); - worldtemplatepaginatedlist = RealmsSelectWorldTemplateScreen.this.minecraft - .submit( - () -> { -@@ -190,9 +190,7 @@ - } - } - ) -- .join() -- ) { -- either = RealmsSelectWorldTemplateScreen.this.fetchTemplates(worldtemplatepaginatedlist, realmsclient); -+ .join(); - } - } - }) +@@ -156,9 +156,9 @@ + public void run() { + WorldTemplatePaginatedList worldtemplatepaginatedlist = p_89654_; + +- Either either; +- for(RealmsClient realmsclient = RealmsClient.create(); +- worldtemplatepaginatedlist != null; ++ RealmsClient realmsclient = RealmsClient.create(); ++ while(worldtemplatepaginatedlist != null) { ++ Either either = RealmsSelectWorldTemplateScreen.this.fetchTemplates(worldtemplatepaginatedlist, realmsclient); + worldtemplatepaginatedlist = RealmsSelectWorldTemplateScreen.this.minecraft + .submit( + () -> { +@@ -196,9 +196,7 @@ + } + } + ) +- .join() +- ) { +- either = RealmsSelectWorldTemplateScreen.this.fetchTemplates(worldtemplatepaginatedlist, realmsclient); ++ .join(); + } + } + }) diff --git a/versions/snapshot/1.20/23w44a/patches/client/com/mojang/realmsclient/gui/screens/RealmsUploadScreen.java.patch b/versions/snapshot/1.20/23w44a/patches/client/com/mojang/realmsclient/gui/screens/RealmsUploadScreen.java.patch index 4d8ffbae..9e7fc530 100644 --- a/versions/snapshot/1.20/23w44a/patches/client/com/mojang/realmsclient/gui/screens/RealmsUploadScreen.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/client/com/mojang/realmsclient/gui/screens/RealmsUploadScreen.java.patch @@ -1,27 +1,27 @@ --- a/com/mojang/realmsclient/gui/screens/RealmsUploadScreen.java +++ b/com/mojang/realmsclient/gui/screens/RealmsUploadScreen.java @@ -261,8 +261,8 @@ - } else if (this.cancelled) { - this.uploadCancelled(); - } else { -- j = (int)(new File(this.minecraft.gameDirectory.getAbsolutePath(), "saves")); -- file1 = this.tarGzipArchive(new File(j, this.selectedLevel.getLevelId())); -+ File file = (new File(this.minecraft.gameDirectory.getAbsolutePath(), "saves")); -+ file1 = this.tarGzipArchive(new File(file, this.selectedLevel.getLevelId())); - if (this.cancelled) { - this.uploadCancelled(); - } else if (this.verify(file1)) { + } else if (this.cancelled) { + this.uploadCancelled(); + } else { +- j = (int)(new File(this.minecraft.gameDirectory.getAbsolutePath(), "saves")); +- file1 = this.tarGzipArchive(new File(j, this.selectedLevel.getLevelId())); ++ File file = (new File(this.minecraft.gameDirectory.getAbsolutePath(), "saves")); ++ file1 = this.tarGzipArchive(new File(file, this.selectedLevel.getLevelId())); + if (this.cancelled) { + this.uploadCancelled(); + } else if (this.verify(file1)) { @@ -327,13 +327,10 @@ + } + } + } catch (IOException ioexception) { +- uploadinfo = ioexception; + this.setErrorMessage(Component.translatable("mco.upload.failed", ioexception.getMessage())); + } catch (RealmsServiceException realmsserviceexception) { +- uploadinfo = realmsserviceexception; + this.setErrorMessage(Component.translatable("mco.upload.failed", realmsserviceexception.realmsError.errorMessage())); + } catch (InterruptedException interruptedexception1) { +- uploadinfo = interruptedexception1; + LOGGER.error("Could not acquire upload lock"); } - } - } catch (IOException ioexception) { -- uploadinfo = ioexception; - this.setErrorMessage(Component.translatable("mco.upload.failed", ioexception.getMessage())); - } catch (RealmsServiceException realmsserviceexception) { -- uploadinfo = realmsserviceexception; - this.setErrorMessage(Component.translatable("mco.upload.failed", realmsserviceexception.realmsError.errorMessage())); - } catch (InterruptedException interruptedexception1) { -- uploadinfo = interruptedexception1; - LOGGER.error("Could not acquire upload lock"); - } - } finally { + } finally { diff --git a/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/Minecraft.java.patch b/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/Minecraft.java.patch index 96a52ddc..b31023da 100644 --- a/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/Minecraft.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/Minecraft.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/client/Minecraft.java +++ b/net/minecraft/client/Minecraft.java -@@ -2475,7 +2475,7 @@ - } +@@ -2483,7 +2483,7 @@ + } - public CompletableFuture delayTextureReload() { -- return this.>submit(this::reloadResourcePacks).thenCompose(p_231391_ -> p_231391_); -+ return this.>submit((Supplier>)this::reloadResourcePacks).thenCompose(p_231391_ -> p_231391_); - } + public CompletableFuture delayTextureReload() { +- return this.>submit(this::reloadResourcePacks).thenCompose(p_231391_ -> p_231391_); ++ return this.>submit((Supplier>)this::reloadResourcePacks).thenCompose(p_231391_ -> p_231391_); + } - public void updateReportEnvironment(ReportEnvironment p_239477_) { + public void updateReportEnvironment(ReportEnvironment p_239477_) { diff --git a/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/OptionInstance.java.patch b/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/OptionInstance.java.patch index e51ce735..ffbbeb5f 100644 --- a/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/OptionInstance.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/OptionInstance.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/client/OptionInstance.java +++ b/net/minecraft/client/OptionInstance.java @@ -278,7 +278,7 @@ - return new OptionInstance.SliderableValueSet() { - @Override - public Optional validateValue(R p_231674_) { -- return IntRangeBase.this.validateValue((T)Integer.valueOf(p_231659_.applyAsInt(p_231674_))).map(p_231658_::apply); -+ return IntRangeBase.this.validateValue(Integer.valueOf(p_231659_.applyAsInt(p_231674_))).map(p_231658_::apply); - } + return new OptionInstance.SliderableValueSet() { + @Override + public Optional validateValue(R p_231674_) { +- return IntRangeBase.this.validateValue((T)Integer.valueOf(p_231659_.applyAsInt(p_231674_))).map(p_231658_::apply); ++ return IntRangeBase.this.validateValue(Integer.valueOf(p_231659_.applyAsInt(p_231674_))).map(p_231658_::apply); + } - @Override + @Override diff --git a/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/gui/Gui.java.patch b/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/gui/Gui.java.patch index 2ee8f7de..0aa81751 100644 --- a/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/gui/Gui.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/gui/Gui.java.patch @@ -1,14 +1,14 @@ --- a/net/minecraft/client/gui/Gui.java +++ b/net/minecraft/client/gui/Gui.java @@ -482,9 +482,10 @@ - TextureAtlasSprite textureatlassprite = mobeffecttexturemanager.get(mobeffect); - int i1 = j; - float f1 = f; -+ int i_f = i; - list.add(() -> { - p_282812_.setColor(1.0F, 1.0F, 1.0F, f1); -- p_282812_.blit(i + 3, i1 + 3, 0, 18, 18, textureatlassprite); -+ p_282812_.blit(i_f + 3, i1 + 3, 0, 18, 18, textureatlassprite); - p_282812_.setColor(1.0F, 1.0F, 1.0F, 1.0F); - }); - } + TextureAtlasSprite textureatlassprite = mobeffecttexturemanager.get(mobeffect); + int i1 = j; + float f1 = f; ++ int i_f = i; + list.add(() -> { + p_282812_.setColor(1.0F, 1.0F, 1.0F, f1); +- p_282812_.blit(i + 3, i1 + 3, 0, 18, 18, textureatlassprite); ++ p_282812_.blit(i_f + 3, i1 + 3, 0, 18, 18, textureatlassprite); + p_282812_.setColor(1.0F, 1.0F, 1.0F, 1.0F); + }); + } diff --git a/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/gui/components/CycleButton.java.patch b/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/gui/components/CycleButton.java.patch index e87a73c4..f250e941 100644 --- a/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/gui/components/CycleButton.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/gui/components/CycleButton.java.patch @@ -1,16 +1,16 @@ --- a/net/minecraft/client/gui/components/CycleButton.java +++ b/net/minecraft/client/gui/components/CycleButton.java @@ -151,11 +151,11 @@ - } + } - public static CycleButton.Builder booleanBuilder(Component p_168897_, Component p_168898_) { -- return new CycleButton.Builder<>(p_168902_ -> p_168902_ ? p_168897_ : p_168898_).withValues(BOOLEAN_OPTIONS); -+ return new CycleButton.Builder(p_168902_ -> p_168902_ ? p_168897_ : p_168898_).withValues(BOOLEAN_OPTIONS); - } + public static CycleButton.Builder booleanBuilder(Component p_168897_, Component p_168898_) { +- return new CycleButton.Builder<>(p_168902_ -> p_168902_ ? p_168897_ : p_168898_).withValues(BOOLEAN_OPTIONS); ++ return new CycleButton.Builder(p_168902_ -> p_168902_ ? p_168897_ : p_168898_).withValues(BOOLEAN_OPTIONS); + } - public static CycleButton.Builder onOffBuilder() { -- return new CycleButton.Builder<>(p_168891_ -> p_168891_ ? CommonComponents.OPTION_ON : CommonComponents.OPTION_OFF).withValues(BOOLEAN_OPTIONS); -+ return new CycleButton.Builder(p_168891_ -> p_168891_ ? CommonComponents.OPTION_ON : CommonComponents.OPTION_OFF).withValues(BOOLEAN_OPTIONS); - } + public static CycleButton.Builder onOffBuilder() { +- return new CycleButton.Builder<>(p_168891_ -> p_168891_ ? CommonComponents.OPTION_ON : CommonComponents.OPTION_OFF).withValues(BOOLEAN_OPTIONS); ++ return new CycleButton.Builder(p_168891_ -> p_168891_ ? CommonComponents.OPTION_ON : CommonComponents.OPTION_OFF).withValues(BOOLEAN_OPTIONS); + } - public static CycleButton.Builder onOffBuilder(boolean p_168917_) { + public static CycleButton.Builder onOffBuilder(boolean p_168917_) { diff --git a/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/gui/components/PopupScreen.java.patch b/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/gui/components/PopupScreen.java.patch index 6e4a31ac..9051eccb 100644 --- a/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/gui/components/PopupScreen.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/gui/components/PopupScreen.java.patch @@ -2,11 +2,11 @@ +++ b/net/minecraft/client/gui/components/PopupScreen.java @@ -63,8 +63,7 @@ - this.layout.addChild(new MultiLineTextWidget(this.message, this.font).setMaxWidth(this.contentWidth).setCentered(true)); - this.layout.addChild(this.buildButtonRow()); -- this.layout.visitWidgets(p_304694_ -> { -- }); -+ this.layout.visitWidgets(this::addRenderableWidget); - this.repositionElements(); - } + this.layout.addChild(new MultiLineTextWidget(this.message, this.font).setMaxWidth(this.contentWidth).setCentered(true)); + this.layout.addChild(this.buildButtonRow()); +- this.layout.visitWidgets(p_304694_ -> { +- }); ++ this.layout.visitWidgets(this::addRenderableWidget); + this.repositionElements(); + } diff --git a/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/gui/screens/PresetFlatWorldScreen.java.patch b/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/gui/screens/PresetFlatWorldScreen.java.patch index 1014e3d0..b974de53 100644 --- a/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/gui/screens/PresetFlatWorldScreen.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/gui/screens/PresetFlatWorldScreen.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/client/gui/screens/PresetFlatWorldScreen.java +++ b/net/minecraft/client/gui/screens/PresetFlatWorldScreen.java @@ -303,7 +303,7 @@ - public Entry(Holder p_232758_) { - this.preset = p_232758_.value(); - this.name = p_232758_.unwrapKey() -- .map(p_232760_ -> Component.translatable(p_232760_.location().toLanguageKey("flat_world_preset"))) -+ .map(p_232760_ -> (Component)Component.translatable(p_232760_.location().toLanguageKey("flat_world_preset"))) - .orElse(PresetFlatWorldScreen.UNKNOWN_PRESET); - } + public Entry(Holder p_232758_) { + this.preset = p_232758_.value(); + this.name = p_232758_.unwrapKey() +- .map(p_232760_ -> Component.translatable(p_232760_.location().toLanguageKey("flat_world_preset"))) ++ .map(p_232760_ -> (Component)Component.translatable(p_232760_.location().toLanguageKey("flat_world_preset"))) + .orElse(PresetFlatWorldScreen.UNKNOWN_PRESET); + } diff --git a/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/gui/screens/achievement/StatsScreen.java.patch b/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/gui/screens/achievement/StatsScreen.java.patch index 91d4b720..1874585d 100644 --- a/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/gui/screens/achievement/StatsScreen.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/gui/screens/achievement/StatsScreen.java.patch @@ -1,16 +1,16 @@ --- a/net/minecraft/client/gui/screens/achievement/StatsScreen.java +++ b/net/minecraft/client/gui/screens/achievement/StatsScreen.java @@ -477,11 +477,11 @@ - i = 0; - j = 0; - } else if (ItemStatisticsList.this.blockColumns.contains(ItemStatisticsList.this.sortColumn)) { -- StatType stattype = ItemStatisticsList.this.sortColumn; -+ StatType stattype = (StatType)ItemStatisticsList.this.sortColumn; - i = item instanceof BlockItem ? StatsScreen.this.stats.getValue(stattype, ((BlockItem)item).getBlock()) : -1; - j = item1 instanceof BlockItem ? StatsScreen.this.stats.getValue(stattype, ((BlockItem)item1).getBlock()) : -1; - } else { -- StatType stattype1 = ItemStatisticsList.this.sortColumn; -+ StatType stattype1 = (StatType)ItemStatisticsList.this.sortColumn; - i = StatsScreen.this.stats.getValue(stattype1, item); - j = StatsScreen.this.stats.getValue(stattype1, item1); - } + i = 0; + j = 0; + } else if (ItemStatisticsList.this.blockColumns.contains(ItemStatisticsList.this.sortColumn)) { +- StatType stattype = ItemStatisticsList.this.sortColumn; ++ StatType stattype = (StatType)ItemStatisticsList.this.sortColumn; + i = item instanceof BlockItem ? StatsScreen.this.stats.getValue(stattype, ((BlockItem)item).getBlock()) : -1; + j = item1 instanceof BlockItem ? StatsScreen.this.stats.getValue(stattype, ((BlockItem)item1).getBlock()) : -1; + } else { +- StatType stattype1 = ItemStatisticsList.this.sortColumn; ++ StatType stattype1 = (StatType)ItemStatisticsList.this.sortColumn; + i = StatsScreen.this.stats.getValue(stattype1, item); + j = StatsScreen.this.stats.getValue(stattype1, item1); + } diff --git a/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/gui/screens/multiplayer/ServerReconfigScreen.java.patch b/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/gui/screens/multiplayer/ServerReconfigScreen.java.patch index 755d097f..2094bb26 100644 --- a/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/gui/screens/multiplayer/ServerReconfigScreen.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/gui/screens/multiplayer/ServerReconfigScreen.java.patch @@ -1,12 +1,12 @@ --- a/net/minecraft/client/gui/screens/multiplayer/ServerReconfigScreen.java +++ b/net/minecraft/client/gui/screens/multiplayer/ServerReconfigScreen.java @@ -36,8 +36,7 @@ - .addChild(Button.builder(CommonComponents.GUI_DISCONNECT, p_295623_ -> this.connection.disconnect(ConnectScreen.ABORT_CONNECTION)).build()); - this.disconnectButton.active = false; - this.layout.arrangeElements(); -- this.layout.visitWidgets(p_295135_ -> { -- }); -+ this.layout.visitWidgets(this::addRenderableWidget); - this.repositionElements(); - } + .addChild(Button.builder(CommonComponents.GUI_DISCONNECT, p_295623_ -> this.connection.disconnect(ConnectScreen.ABORT_CONNECTION)).build()); + this.disconnectButton.active = false; + this.layout.arrangeElements(); +- this.layout.visitWidgets(p_295135_ -> { +- }); ++ this.layout.visitWidgets(this::addRenderableWidget); + this.repositionElements(); + } diff --git a/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/gui/screens/reporting/ChatReportScreen.java.patch b/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/gui/screens/reporting/ChatReportScreen.java.patch index cebbada8..a610918c 100644 --- a/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/gui/screens/reporting/ChatReportScreen.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/gui/screens/reporting/ChatReportScreen.java.patch @@ -1,12 +1,12 @@ --- a/net/minecraft/client/gui/screens/reporting/ChatReportScreen.java +++ b/net/minecraft/client/gui/screens/reporting/ChatReportScreen.java @@ -74,8 +74,7 @@ - LinearLayout linearlayout = this.layout.addChild(LinearLayout.horizontal().spacing(8)); - linearlayout.addChild(Button.builder(CommonComponents.GUI_BACK, p_309407_ -> this.onClose()).width(120).build()); - this.sendButton = linearlayout.addChild(Button.builder(SEND_REPORT, p_299795_ -> this.sendReport()).width(120).build()); -- this.layout.visitWidgets(p_299794_ -> { -- }); -+ this.layout.visitWidgets(this::addRenderableWidget); - this.repositionElements(); - this.onReportChanged(); - } + LinearLayout linearlayout = this.layout.addChild(LinearLayout.horizontal().spacing(8)); + linearlayout.addChild(Button.builder(CommonComponents.GUI_BACK, p_309407_ -> this.onClose()).width(120).build()); + this.sendButton = linearlayout.addChild(Button.builder(SEND_REPORT, p_299795_ -> this.sendReport()).width(120).build()); +- this.layout.visitWidgets(p_299794_ -> { +- }); ++ this.layout.visitWidgets(this::addRenderableWidget); + this.repositionElements(); + this.onReportChanged(); + } diff --git a/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/gui/screens/reporting/NameReportScreen.java.patch b/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/gui/screens/reporting/NameReportScreen.java.patch index 1d91b6d9..0e6885d0 100644 --- a/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/gui/screens/reporting/NameReportScreen.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/gui/screens/reporting/NameReportScreen.java.patch @@ -1,12 +1,12 @@ --- a/net/minecraft/client/gui/screens/reporting/NameReportScreen.java +++ b/net/minecraft/client/gui/screens/reporting/NameReportScreen.java @@ -56,8 +56,7 @@ - linearlayout.addChild(Button.builder(CommonComponents.GUI_BACK, p_309408_ -> this.onClose()).width(120).build()); - this.sendButton = linearlayout.addChild(Button.builder(SEND_REPORT, p_299852_ -> this.sendReport()).width(120).build()); - this.onReportChanged(); -- this.layout.visitWidgets(p_300038_ -> { -- }); -+ this.layout.visitWidgets(this::addRenderableWidget); - this.repositionElements(); - } + linearlayout.addChild(Button.builder(CommonComponents.GUI_BACK, p_309408_ -> this.onClose()).width(120).build()); + this.sendButton = linearlayout.addChild(Button.builder(SEND_REPORT, p_299852_ -> this.sendReport()).width(120).build()); + this.onReportChanged(); +- this.layout.visitWidgets(p_300038_ -> { +- }); ++ this.layout.visitWidgets(this::addRenderableWidget); + this.repositionElements(); + } diff --git a/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/gui/screens/reporting/ReportPlayerScreen.java.patch b/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/gui/screens/reporting/ReportPlayerScreen.java.patch index 6ef2d636..2bdc04fe 100644 --- a/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/gui/screens/reporting/ReportPlayerScreen.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/gui/screens/reporting/ReportPlayerScreen.java.patch @@ -1,12 +1,12 @@ --- a/net/minecraft/client/gui/screens/reporting/ReportPlayerScreen.java +++ b/net/minecraft/client/gui/screens/reporting/ReportPlayerScreen.java -@@ -76,8 +76,7 @@ - ); - this.layout.addChild(SpacerElement.height(20)); - this.layout.addChild(Button.builder(CommonComponents.GUI_CANCEL, p_299992_ -> this.onClose()).build()); -- this.layout.visitWidgets(p_299910_ -> { -- }); -+ this.layout.visitWidgets(this::addRenderableWidget); - this.repositionElements(); - } +@@ -78,8 +78,7 @@ + ); + this.layout.addChild(SpacerElement.height(20)); + this.layout.addChild(Button.builder(CommonComponents.GUI_CANCEL, p_299992_ -> this.onClose()).build()); +- this.layout.visitWidgets(p_299910_ -> { +- }); ++ this.layout.visitWidgets(this::addRenderableWidget); + this.repositionElements(); + } diff --git a/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/gui/screens/reporting/SkinReportScreen.java.patch b/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/gui/screens/reporting/SkinReportScreen.java.patch index e2d23688..c7cb5308 100644 --- a/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/gui/screens/reporting/SkinReportScreen.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/gui/screens/reporting/SkinReportScreen.java.patch @@ -1,12 +1,12 @@ --- a/net/minecraft/client/gui/screens/reporting/SkinReportScreen.java +++ b/net/minecraft/client/gui/screens/reporting/SkinReportScreen.java @@ -68,8 +68,7 @@ - LinearLayout linearlayout2 = this.layout.addChild(LinearLayout.horizontal().spacing(8)); - linearlayout2.addChild(Button.builder(CommonComponents.GUI_BACK, p_309409_ -> this.onClose()).width(120).build()); - this.sendButton = linearlayout2.addChild(Button.builder(SEND_REPORT, p_299925_ -> this.sendReport()).width(120).build()); -- this.layout.visitWidgets(p_299974_ -> { -- }); -+ this.layout.visitWidgets(this::addRenderableWidget); - this.repositionElements(); - this.onReportChanged(); - } + LinearLayout linearlayout2 = this.layout.addChild(LinearLayout.horizontal().spacing(8)); + linearlayout2.addChild(Button.builder(CommonComponents.GUI_BACK, p_309409_ -> this.onClose()).width(120).build()); + this.sendButton = linearlayout2.addChild(Button.builder(SEND_REPORT, p_299925_ -> this.sendReport()).width(120).build()); +- this.layout.visitWidgets(p_299974_ -> { +- }); ++ this.layout.visitWidgets(this::addRenderableWidget); + this.repositionElements(); + this.onReportChanged(); + } diff --git a/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/gui/screens/telemetry/TelemetryInfoScreen.java.patch b/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/gui/screens/telemetry/TelemetryInfoScreen.java.patch index c7cb394f..7554027c 100644 --- a/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/gui/screens/telemetry/TelemetryInfoScreen.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/gui/screens/telemetry/TelemetryInfoScreen.java.patch @@ -1,12 +1,12 @@ --- a/net/minecraft/client/gui/screens/telemetry/TelemetryInfoScreen.java +++ b/net/minecraft/client/gui/screens/telemetry/TelemetryInfoScreen.java -@@ -74,8 +74,7 @@ - linearlayout.addChild(layout); - framelayout.arrangeElements(); - FrameLayout.alignInRectangle(framelayout, 0, 0, this.width, this.height, 0.5F, 0.0F); -- framelayout.visitWidgets(p_264696_ -> { -- }); -+ framelayout.visitWidgets(this::addRenderableWidget); - } +@@ -75,8 +75,7 @@ + linearlayout.addChild(layout); + framelayout.arrangeElements(); + FrameLayout.alignInRectangle(framelayout, 0, 0, this.width, this.height, 0.5F, 0.0F); +- framelayout.visitWidgets(p_264696_ -> { +- }); ++ framelayout.visitWidgets(this::addRenderableWidget); + } - private Layout createLowerSection() { + private Layout createLowerSection() { diff --git a/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/gui/screens/worldselection/ConfirmExperimentalFeaturesScreen.java.patch b/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/gui/screens/worldselection/ConfirmExperimentalFeaturesScreen.java.patch index f0477bee..22eab715 100644 --- a/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/gui/screens/worldselection/ConfirmExperimentalFeaturesScreen.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/gui/screens/worldselection/ConfirmExperimentalFeaturesScreen.java.patch @@ -1,12 +1,12 @@ --- a/net/minecraft/client/gui/screens/worldselection/ConfirmExperimentalFeaturesScreen.java +++ b/net/minecraft/client/gui/screens/worldselection/ConfirmExperimentalFeaturesScreen.java -@@ -57,8 +57,7 @@ - ); - gridlayout$rowhelper.addChild(Button.builder(CommonComponents.GUI_PROCEED, p_252248_ -> this.callback.accept(true)).build()); - gridlayout$rowhelper.addChild(Button.builder(CommonComponents.GUI_BACK, p_250397_ -> this.callback.accept(false)).build()); -- this.layout.visitWidgets(p_269625_ -> { -- }); -+ this.layout.visitWidgets(this::addRenderableWidget); - this.layout.arrangeElements(); - this.repositionElements(); - } +@@ -59,8 +59,7 @@ + ); + gridlayout$rowhelper.addChild(Button.builder(CommonComponents.GUI_PROCEED, p_252248_ -> this.callback.accept(true)).build()); + gridlayout$rowhelper.addChild(Button.builder(CommonComponents.GUI_BACK, p_250397_ -> this.callback.accept(false)).build()); +- this.layout.visitWidgets(p_269625_ -> { +- }); ++ this.layout.visitWidgets(this::addRenderableWidget); + this.layout.arrangeElements(); + this.repositionElements(); + } diff --git a/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/gui/screens/worldselection/EditGameRulesScreen.java.patch b/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/gui/screens/worldselection/EditGameRulesScreen.java.patch index 562c8b01..29005f01 100644 --- a/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/gui/screens/worldselection/EditGameRulesScreen.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/gui/screens/worldselection/EditGameRulesScreen.java.patch @@ -1,12 +1,12 @@ --- a/net/minecraft/client/gui/screens/worldselection/EditGameRulesScreen.java +++ b/net/minecraft/client/gui/screens/worldselection/EditGameRulesScreen.java @@ -55,8 +55,7 @@ - Button.builder(CommonComponents.GUI_DONE, p_101059_ -> this.exitCallback.accept(Optional.of(this.gameRules))).build() - ); - gridlayout$rowhelper.addChild(Button.builder(CommonComponents.GUI_CANCEL, p_101073_ -> this.exitCallback.accept(Optional.empty())).build()); -- gridlayout$rowhelper.getGrid().visitWidgets(p_267855_ -> { -- }); -+ gridlayout$rowhelper.getGrid().visitWidgets(this::addRenderableWidget); - gridlayout$rowhelper.getGrid().setPosition(this.width / 2 - 155, this.height - 28); - gridlayout$rowhelper.getGrid().arrangeElements(); - } + Button.builder(CommonComponents.GUI_DONE, p_101059_ -> this.exitCallback.accept(Optional.of(this.gameRules))).build() + ); + gridlayout$rowhelper.addChild(Button.builder(CommonComponents.GUI_CANCEL, p_101073_ -> this.exitCallback.accept(Optional.empty())).build()); +- gridlayout$rowhelper.getGrid().visitWidgets(p_267855_ -> { +- }); ++ gridlayout$rowhelper.getGrid().visitWidgets(this::addRenderableWidget); + gridlayout$rowhelper.getGrid().setPosition(this.width / 2 - 155, this.height - 28); + gridlayout$rowhelper.getGrid().arrangeElements(); + } diff --git a/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/gui/screens/worldselection/EditWorldScreen.java.patch b/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/gui/screens/worldselection/EditWorldScreen.java.patch index 92f23447..69a0cc78 100644 --- a/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/gui/screens/worldselection/EditWorldScreen.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/gui/screens/worldselection/EditWorldScreen.java.patch @@ -1,12 +1,12 @@ --- a/net/minecraft/client/gui/screens/worldselection/EditWorldScreen.java +++ b/net/minecraft/client/gui/screens/worldselection/EditWorldScreen.java @@ -109,8 +109,7 @@ - this.layout.addChild(new SpacerElement(200, 20)); - this.layout.addChild(linearlayout); - this.setInitialFocus(editbox); -- this.layout.visitWidgets(p_307064_ -> { -- }); -+ this.layout.visitWidgets(this::addRenderableWidget); - } + this.layout.addChild(new SpacerElement(200, 20)); + this.layout.addChild(linearlayout); + this.setInitialFocus(editbox); +- this.layout.visitWidgets(p_307064_ -> { +- }); ++ this.layout.visitWidgets(this::addRenderableWidget); + } - @Override + @Override diff --git a/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/gui/screens/worldselection/ExperimentsScreen.java.patch b/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/gui/screens/worldselection/ExperimentsScreen.java.patch index 8eeb604e..ae42ce11 100644 --- a/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/gui/screens/worldselection/ExperimentsScreen.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/gui/screens/worldselection/ExperimentsScreen.java.patch @@ -1,12 +1,12 @@ --- a/net/minecraft/client/gui/screens/worldselection/ExperimentsScreen.java +++ b/net/minecraft/client/gui/screens/worldselection/ExperimentsScreen.java -@@ -65,8 +65,7 @@ - GridLayout.RowHelper gridlayout$rowhelper = this.layout.addToFooter(new GridLayout().columnSpacing(10)).createRowHelper(2); - gridlayout$rowhelper.addChild(Button.builder(CommonComponents.GUI_DONE, p_270336_ -> this.onDone()).build()); - gridlayout$rowhelper.addChild(Button.builder(CommonComponents.GUI_CANCEL, p_274702_ -> this.onClose()).build()); -- this.layout.visitWidgets(p_270313_ -> { -- }); -+ this.layout.visitWidgets(this::addRenderableWidget); - this.repositionElements(); - } +@@ -67,8 +67,7 @@ + GridLayout.RowHelper gridlayout$rowhelper = this.layout.addToFooter(new GridLayout().columnSpacing(10)).createRowHelper(2); + gridlayout$rowhelper.addChild(Button.builder(CommonComponents.GUI_DONE, p_270336_ -> this.onDone()).build()); + gridlayout$rowhelper.addChild(Button.builder(CommonComponents.GUI_CANCEL, p_274702_ -> this.onClose()).build()); +- this.layout.visitWidgets(p_270313_ -> { +- }); ++ this.layout.visitWidgets(this::addRenderableWidget); + this.repositionElements(); + } diff --git a/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/gui/screens/worldselection/WorldCreationUiState.java.patch b/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/gui/screens/worldselection/WorldCreationUiState.java.patch index a793e44e..9ee83761 100644 --- a/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/gui/screens/worldselection/WorldCreationUiState.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/gui/screens/worldselection/WorldCreationUiState.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/client/gui/screens/worldselection/WorldCreationUiState.java +++ b/net/minecraft/client/gui/screens/worldselection/WorldCreationUiState.java -@@ -294,7 +294,7 @@ - public Component describePreset() { - return Optional.ofNullable(this.preset) - .flatMap(Holder::unwrapKey) -- .map(p_268048_ -> Component.translatable(p_268048_.location().toLanguageKey("generator"))) -+ .map(p_268048_ -> (Component) Component.translatable(p_268048_.location().toLanguageKey("generator"))) - .orElse(CUSTOM_WORLD_DESCRIPTION); - } +@@ -298,7 +298,7 @@ + public Component describePreset() { + return Optional.ofNullable(this.preset) + .flatMap(Holder::unwrapKey) +- .map(p_268048_ -> Component.translatable(p_268048_.location().toLanguageKey("generator"))) ++ .map(p_268048_ -> (Component) Component.translatable(p_268048_.location().toLanguageKey("generator"))) + .orElse(CUSTOM_WORLD_DESCRIPTION); + } diff --git a/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/gui/screens/worldselection/WorldOpenFlows.java.patch b/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/gui/screens/worldselection/WorldOpenFlows.java.patch index 0346cf62..3c413c46 100644 --- a/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/gui/screens/worldselection/WorldOpenFlows.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/gui/screens/worldselection/WorldOpenFlows.java.patch @@ -1,24 +1,24 @@ --- a/net/minecraft/client/gui/screens/worldselection/WorldOpenFlows.java +++ b/net/minecraft/client/gui/screens/worldselection/WorldOpenFlows.java -@@ -143,7 +143,9 @@ - PackRepository packrepository = ServerPacksSource.createPackRepository(p_249540_); - Dynamic dynamic = p_249540_.getDataTag(); - WorldLoader.PackConfig worldloader$packconfig = LevelStorageSource.getPackConfig(dynamic, packrepository, false); -- return this.loadWorldDataBlocking( -+ record Data(LevelSettings levelSettings, WorldOptions options, Registry existingDimensions) { -+ } -+ return this.>loadWorldDataBlocking( - worldloader$packconfig, - p_307097_ -> { - Registry registry = new MappedRegistry<>(Registries.LEVEL_STEM, Lifecycle.stable()).freeze(); -@@ -170,10 +172,7 @@ - } - ); +@@ -146,7 +146,9 @@ + PackRepository packrepository = ServerPacksSource.createPackRepository(p_249540_); + Dynamic dynamic = p_249540_.getDataTag(); + WorldLoader.PackConfig worldloader$packconfig = LevelStorageSource.getPackConfig(dynamic, packrepository, false); +- return this.loadWorldDataBlocking( ++ record Data(LevelSettings levelSettings, WorldOptions options, Registry existingDimensions) { ++ } ++ return this.>loadWorldDataBlocking( + worldloader$packconfig, + p_307097_ -> { + Registry registry = new MappedRegistry<>(Registries.LEVEL_STEM, Lifecycle.stable()).freeze(); +@@ -177,10 +179,7 @@ + } + ); -- record Data(LevelSettings levelSettings, WorldOptions options, Registry existingDimensions) { - } +- record Data(LevelSettings levelSettings, WorldOptions options, Registry existingDimensions) { + } - -- } +- } - private R loadWorldDataBlocking( - WorldLoader.PackConfig p_250997_, WorldLoader.WorldDataSupplier p_251759_, WorldLoader.ResultFactory p_249635_ + private R loadWorldDataBlocking( + WorldLoader.PackConfig p_250997_, WorldLoader.WorldDataSupplier p_251759_, WorldLoader.ResultFactory p_249635_ diff --git a/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/gui/spectator/categories/TeleportToPlayerMenuCategory.java.patch b/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/gui/spectator/categories/TeleportToPlayerMenuCategory.java.patch index 5e6f2ee7..00c2be10 100644 --- a/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/gui/spectator/categories/TeleportToPlayerMenuCategory.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/gui/spectator/categories/TeleportToPlayerMenuCategory.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/client/gui/spectator/categories/TeleportToPlayerMenuCategory.java +++ b/net/minecraft/client/gui/spectator/categories/TeleportToPlayerMenuCategory.java @@ -29,7 +29,7 @@ - this.items = p_101861_.stream() - .filter(p_253336_ -> p_253336_.getGameMode() != GameType.SPECTATOR) - .sorted(PROFILE_ORDER) -- .map(p_253334_ -> new PlayerMenuItem(p_253334_.getProfile())) -+ .map(p_253334_ -> (SpectatorMenuItem)new PlayerMenuItem(p_253334_.getProfile())) - .toList(); - } + this.items = p_101861_.stream() + .filter(p_253336_ -> p_253336_.getGameMode() != GameType.SPECTATOR) + .sorted(PROFILE_ORDER) +- .map(p_253334_ -> new PlayerMenuItem(p_253334_.getProfile())) ++ .map(p_253334_ -> (SpectatorMenuItem)new PlayerMenuItem(p_253334_.getProfile())) + .toList(); + } diff --git a/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/main/Main.java.patch b/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/main/Main.java.patch index 4ae1e866..e18772b1 100644 --- a/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/main/Main.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/main/Main.java.patch @@ -1,20 +1,20 @@ --- a/net/minecraft/client/main/Main.java +++ b/net/minecraft/client/main/Main.java @@ -194,7 +194,7 @@ - }; - thread.setUncaughtExceptionHandler(new DefaultUncaughtExceptionHandler(LOGGER)); - Runtime.getRuntime().addShutdownHook(thread); -- final Minecraft minecraft = null; -+ Minecraft minecraft = null; + }; + thread.setUncaughtExceptionHandler(new DefaultUncaughtExceptionHandler(LOGGER)); + Runtime.getRuntime().addShutdownHook(thread); +- final Minecraft minecraft = null; ++ Minecraft minecraft = null; - try { - Thread.currentThread().setName("Render thread"); + try { + Thread.currentThread().setName("Render thread"); @@ -223,7 +223,7 @@ - public void run() { - try { - RenderSystem.initGameThread(true); -- minecraft.run(); -+ minecraft1.run(); - } catch (Throwable throwable3) { - Main.LOGGER.error("Exception in client thread", throwable3); - } + public void run() { + try { + RenderSystem.initGameThread(true); +- minecraft.run(); ++ minecraft1.run(); + } catch (Throwable throwable3) { + Main.LOGGER.error("Exception in client thread", throwable3); + } diff --git a/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/multiplayer/ClientCommonPacketListenerImpl.java.patch b/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/multiplayer/ClientCommonPacketListenerImpl.java.patch index 398655b7..9a274761 100644 --- a/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/multiplayer/ClientCommonPacketListenerImpl.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/multiplayer/ClientCommonPacketListenerImpl.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/client/multiplayer/ClientCommonPacketListenerImpl.java +++ b/net/minecraft/client/multiplayer/ClientCommonPacketListenerImpl.java @@ -199,7 +199,7 @@ - if (!p_294666_.isEmpty()) { - Registry registry = this.registryAccess().registry(p_294128_).orElseThrow(() -> new IllegalStateException("Unknown registry " + p_294128_)); - Map, List>> map = new HashMap<>(); -- TagNetworkSerialization.deserializeTagsFromNetwork(p_294128_, registry, p_294666_, map::put); -+ TagNetworkSerialization.deserializeTagsFromNetwork((ResourceKey>)p_294128_, registry, p_294666_, map::put); - registry.bindTags(map); - } - } + if (!p_294666_.isEmpty()) { + Registry registry = this.registryAccess().registry(p_294128_).orElseThrow(() -> new IllegalStateException("Unknown registry " + p_294128_)); + Map, List>> map = new HashMap<>(); +- TagNetworkSerialization.deserializeTagsFromNetwork(p_294128_, registry, p_294666_, map::put); ++ TagNetworkSerialization.deserializeTagsFromNetwork((ResourceKey>)p_294128_, registry, p_294666_, map::put); + registry.bindTags(map); + } + } diff --git a/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/renderer/entity/EntityRenderDispatcher.java.patch b/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/renderer/entity/EntityRenderDispatcher.java.patch index ab4283ee..29fec9ba 100644 --- a/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/renderer/entity/EntityRenderDispatcher.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/renderer/entity/EntityRenderDispatcher.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/client/renderer/entity/EntityRenderDispatcher.java +++ b/net/minecraft/client/renderer/entity/EntityRenderDispatcher.java @@ -98,7 +98,7 @@ - if (p_114383_ instanceof AbstractClientPlayer abstractclientplayer) { - PlayerSkin.Model playerskin$model = abstractclientplayer.getSkin().model(); - EntityRenderer entityrenderer = this.playerRenderers.get(playerskin$model); -- return entityrenderer != null ? entityrenderer : this.playerRenderers.get(PlayerSkin.Model.WIDE); -+ return (EntityRenderer)(entityrenderer != null ? entityrenderer : this.playerRenderers.get(PlayerSkin.Model.WIDE)); - } else { - return (EntityRenderer)this.renderers.get(p_114383_.getType()); - } + if (p_114383_ instanceof AbstractClientPlayer abstractclientplayer) { + PlayerSkin.Model playerskin$model = abstractclientplayer.getSkin().model(); + EntityRenderer entityrenderer = this.playerRenderers.get(playerskin$model); +- return entityrenderer != null ? entityrenderer : this.playerRenderers.get(PlayerSkin.Model.WIDE); ++ return (EntityRenderer)(entityrenderer != null ? entityrenderer : this.playerRenderers.get(PlayerSkin.Model.WIDE)); + } else { + return (EntityRenderer)this.renderers.get(p_114383_.getType()); + } diff --git a/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/searchtree/SearchRegistry.java.patch b/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/searchtree/SearchRegistry.java.patch index 1514fed1..dd16e46e 100644 --- a/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/searchtree/SearchRegistry.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/searchtree/SearchRegistry.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/client/searchtree/SearchRegistry.java +++ b/net/minecraft/client/searchtree/SearchRegistry.java @@ -58,7 +58,7 @@ - } + } - void populate(List p_235246_) { -- this.tree = this.factory.apply((T)p_235246_); -+ this.tree = this.factory.apply(p_235246_); - this.tree.refresh(); - } + void populate(List p_235246_) { +- this.tree = this.factory.apply((T)p_235246_); ++ this.tree = this.factory.apply(p_235246_); + this.tree.refresh(); + } diff --git a/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/telemetry/TelemetryPropertyMap.java.patch b/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/telemetry/TelemetryPropertyMap.java.patch index 5d7935ca..ba520510 100644 --- a/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/telemetry/TelemetryPropertyMap.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/client/net/minecraft/client/telemetry/TelemetryPropertyMap.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/client/telemetry/TelemetryPropertyMap.java +++ b/net/minecraft/client/telemetry/TelemetryPropertyMap.java @@ -58,7 +58,7 @@ - T t = p_261668_.get(p_261627_.id()); - if (t != null) { - DataResult dataresult = p_261627_.codec().parse(p_261859_, t); -- return p_261892_.apply2stable((p_262028_, p_261796_) -> p_262028_.put(p_261627_, (T)p_261796_), dataresult); -+ return p_261892_.apply2stable((p_262028_, p_261796_) -> p_262028_.put((TelemetryProperty)p_261627_, (T)p_261796_), dataresult); - } else { - return p_261892_; - } + T t = p_261668_.get(p_261627_.id()); + if (t != null) { + DataResult dataresult = p_261627_.codec().parse(p_261859_, t); +- return p_261892_.apply2stable((p_262028_, p_261796_) -> p_262028_.put(p_261627_, (T)p_261796_), dataresult); ++ return p_261892_.apply2stable((p_262028_, p_261796_) -> p_262028_.put((TelemetryProperty)p_261627_, (T)p_261796_), dataresult); + } else { + return p_261892_; + } diff --git a/versions/snapshot/1.20/23w44a/patches/joined/com/mojang/blaze3d/platform/MacosUtil.java.patch b/versions/snapshot/1.20/23w44a/patches/joined/com/mojang/blaze3d/platform/MacosUtil.java.patch index c614d3cb..2e787ea0 100644 --- a/versions/snapshot/1.20/23w44a/patches/joined/com/mojang/blaze3d/platform/MacosUtil.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/joined/com/mojang/blaze3d/platform/MacosUtil.java.patch @@ -1,11 +1,11 @@ --- a/com/mojang/blaze3d/platform/MacosUtil.java +++ b/com/mojang/blaze3d/platform/MacosUtil.java @@ -38,7 +38,7 @@ - } + } - private static long getStyleMask(NSObject p_304421_) { -- return p_304421_.sendRaw("styleMask", new Object[0]); -+ return (long)p_304421_.sendRaw("styleMask", new Object[0]); - } + private static long getStyleMask(NSObject p_304421_) { +- return p_304421_.sendRaw("styleMask", new Object[0]); ++ return (long)p_304421_.sendRaw("styleMask", new Object[0]); + } - private static void toggleNativeFullscreen(NSObject p_182524_) { + private static void toggleNativeFullscreen(NSObject p_182524_) { diff --git a/versions/snapshot/1.20/23w44a/patches/joined/com/mojang/realmsclient/RealmsMainScreen.java.patch b/versions/snapshot/1.20/23w44a/patches/joined/com/mojang/realmsclient/RealmsMainScreen.java.patch index 75cea952..c821a5f2 100644 --- a/versions/snapshot/1.20/23w44a/patches/joined/com/mojang/realmsclient/RealmsMainScreen.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/joined/com/mojang/realmsclient/RealmsMainScreen.java.patch @@ -2,11 +2,11 @@ +++ b/com/mojang/realmsclient/RealmsMainScreen.java @@ -552,8 +552,7 @@ - @Nullable - private RealmsServer getSelectedServer() { -- AbstractSelectionList.Entry abstractselectionlist$entry = this.realmSelectionList.getSelected(); -- return abstractselectionlist$entry instanceof RealmsMainScreen.ServerEntry realmsmainscreen$serverentry ? realmsmainscreen$serverentry.getServer() : null; -+ return this.realmSelectionList.getSelected() instanceof RealmsMainScreen.ServerEntry realmsmainscreen$serverentry ? realmsmainscreen$serverentry.getServer() : null; - } - - private void leaveServer(boolean p_193494_, final RealmsServer p_193495_) { + @Nullable + private RealmsServer getSelectedServer() { +- AbstractSelectionList.Entry abstractselectionlist$entry = this.realmSelectionList.getSelected(); +- return abstractselectionlist$entry instanceof RealmsMainScreen.ServerEntry realmsmainscreen$serverentry ++ return this.realmSelectionList.getSelected() instanceof RealmsMainScreen.ServerEntry realmsmainscreen$serverentry + ? realmsmainscreen$serverentry.getServer() + : null; + } diff --git a/versions/snapshot/1.20/23w44a/patches/joined/com/mojang/realmsclient/gui/screens/RealmsBackupInfoScreen.java.patch b/versions/snapshot/1.20/23w44a/patches/joined/com/mojang/realmsclient/gui/screens/RealmsBackupInfoScreen.java.patch index a0c2cefb..116c30c3 100644 --- a/versions/snapshot/1.20/23w44a/patches/joined/com/mojang/realmsclient/gui/screens/RealmsBackupInfoScreen.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/joined/com/mojang/realmsclient/gui/screens/RealmsBackupInfoScreen.java.patch @@ -1,12 +1,12 @@ --- a/com/mojang/realmsclient/gui/screens/RealmsBackupInfoScreen.java +++ b/com/mojang/realmsclient/gui/screens/RealmsBackupInfoScreen.java @@ -38,8 +38,7 @@ - this.addRenderableWidget(this.backupInfoList); - this.layout.addToFooter(Button.builder(CommonComponents.GUI_BACK, p_299754_ -> this.onClose()).build()); - this.layout.arrangeElements(); -- this.layout.visitWidgets(p_299756_ -> { -- }); -+ this.layout.visitWidgets(this::addRenderableWidget); - } + this.addRenderableWidget(this.backupInfoList); + this.layout.addToFooter(Button.builder(CommonComponents.GUI_BACK, p_299754_ -> this.onClose()).build()); + this.layout.arrangeElements(); +- this.layout.visitWidgets(p_299756_ -> { +- }); ++ this.layout.visitWidgets(this::addRenderableWidget); + } - @Override + @Override diff --git a/versions/snapshot/1.20/23w44a/patches/joined/com/mojang/realmsclient/gui/screens/RealmsCreateRealmScreen.java.patch b/versions/snapshot/1.20/23w44a/patches/joined/com/mojang/realmsclient/gui/screens/RealmsCreateRealmScreen.java.patch index 6bc47525..eaf5eb23 100644 --- a/versions/snapshot/1.20/23w44a/patches/joined/com/mojang/realmsclient/gui/screens/RealmsCreateRealmScreen.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/joined/com/mojang/realmsclient/gui/screens/RealmsCreateRealmScreen.java.patch @@ -1,12 +1,12 @@ --- a/com/mojang/realmsclient/gui/screens/RealmsCreateRealmScreen.java +++ b/com/mojang/realmsclient/gui/screens/RealmsCreateRealmScreen.java @@ -59,8 +59,7 @@ - LinearLayout linearlayout1 = this.layout.addToFooter(LinearLayout.horizontal().spacing(10)); - linearlayout1.addChild(button); - linearlayout1.addChild(Button.builder(CommonComponents.GUI_BACK, p_293570_ -> this.onClose()).build()); -- this.layout.visitWidgets(p_293566_ -> { -- }); -+ this.layout.visitWidgets(this::addRenderableWidget); - this.repositionElements(); - this.setInitialFocus(this.nameBox); - } + LinearLayout linearlayout1 = this.layout.addToFooter(LinearLayout.horizontal().spacing(10)); + linearlayout1.addChild(button); + linearlayout1.addChild(Button.builder(CommonComponents.GUI_BACK, p_293570_ -> this.onClose()).build()); +- this.layout.visitWidgets(p_293566_ -> { +- }); ++ this.layout.visitWidgets(this::addRenderableWidget); + this.repositionElements(); + this.setInitialFocus(this.nameBox); + } diff --git a/versions/snapshot/1.20/23w44a/patches/joined/com/mojang/realmsclient/gui/screens/RealmsLongRunningMcoTaskScreen.java.patch b/versions/snapshot/1.20/23w44a/patches/joined/com/mojang/realmsclient/gui/screens/RealmsLongRunningMcoTaskScreen.java.patch index a8aa9353..5f827dcb 100644 --- a/versions/snapshot/1.20/23w44a/patches/joined/com/mojang/realmsclient/gui/screens/RealmsLongRunningMcoTaskScreen.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/joined/com/mojang/realmsclient/gui/screens/RealmsLongRunningMcoTaskScreen.java.patch @@ -1,12 +1,12 @@ --- a/com/mojang/realmsclient/gui/screens/RealmsLongRunningMcoTaskScreen.java +++ b/com/mojang/realmsclient/gui/screens/RealmsLongRunningMcoTaskScreen.java @@ -81,8 +81,7 @@ - this.loadingDotsWidget = new LoadingDotsWidget(this.font, this.title); - this.layout.addChild(this.loadingDotsWidget, p_300631_ -> p_300631_.paddingBottom(30)); - this.layout.addChild(Button.builder(CommonComponents.GUI_CANCEL, p_300632_ -> this.cancel()).build()); -- this.layout.visitWidgets(p_300634_ -> { -- }); -+ this.layout.visitWidgets(this::addRenderableWidget); - this.repositionElements(); - } + this.loadingDotsWidget = new LoadingDotsWidget(this.font, this.title); + this.layout.addChild(this.loadingDotsWidget, p_300631_ -> p_300631_.paddingBottom(30)); + this.layout.addChild(Button.builder(CommonComponents.GUI_CANCEL, p_300632_ -> this.cancel()).build()); +- this.layout.visitWidgets(p_300634_ -> { +- }); ++ this.layout.visitWidgets(this::addRenderableWidget); + this.repositionElements(); + } diff --git a/versions/snapshot/1.20/23w44a/patches/joined/com/mojang/realmsclient/gui/screens/RealmsParentalConsentScreen.java.patch b/versions/snapshot/1.20/23w44a/patches/joined/com/mojang/realmsclient/gui/screens/RealmsParentalConsentScreen.java.patch index 2bdd4713..b23286fd 100644 --- a/versions/snapshot/1.20/23w44a/patches/joined/com/mojang/realmsclient/gui/screens/RealmsParentalConsentScreen.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/joined/com/mojang/realmsclient/gui/screens/RealmsParentalConsentScreen.java.patch @@ -1,12 +1,12 @@ --- a/com/mojang/realmsclient/gui/screens/RealmsParentalConsentScreen.java +++ b/com/mojang/realmsclient/gui/screens/RealmsParentalConsentScreen.java @@ -38,8 +38,7 @@ - Component component = Component.translatable("mco.account.privacy.info.button"); - linearlayout.addChild(Button.builder(component, ConfirmLinkScreen.confirmLink(this, "https://aka.ms/MinecraftGDPR")).build()); - linearlayout.addChild(Button.builder(CommonComponents.GUI_BACK, p_307025_ -> this.onClose()).build()); -- this.layout.visitWidgets(p_307027_ -> { -- }); -+ this.layout.visitWidgets(this::addRenderableWidget); - this.repositionElements(); - } + Component component = Component.translatable("mco.account.privacy.info.button"); + linearlayout.addChild(Button.builder(component, ConfirmLinkScreen.confirmLink(this, "https://aka.ms/MinecraftGDPR")).build()); + linearlayout.addChild(Button.builder(CommonComponents.GUI_BACK, p_307025_ -> this.onClose()).build()); +- this.layout.visitWidgets(p_307027_ -> { +- }); ++ this.layout.visitWidgets(this::addRenderableWidget); + this.repositionElements(); + } diff --git a/versions/snapshot/1.20/23w44a/patches/joined/com/mojang/realmsclient/gui/screens/RealmsResetNormalWorldScreen.java.patch b/versions/snapshot/1.20/23w44a/patches/joined/com/mojang/realmsclient/gui/screens/RealmsResetNormalWorldScreen.java.patch index 3d0c8aed..ce81d44c 100644 --- a/versions/snapshot/1.20/23w44a/patches/joined/com/mojang/realmsclient/gui/screens/RealmsResetNormalWorldScreen.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/joined/com/mojang/realmsclient/gui/screens/RealmsResetNormalWorldScreen.java.patch @@ -1,12 +1,12 @@ --- a/com/mojang/realmsclient/gui/screens/RealmsResetNormalWorldScreen.java +++ b/com/mojang/realmsclient/gui/screens/RealmsResetNormalWorldScreen.java @@ -66,8 +66,7 @@ - LinearLayout linearlayout1 = this.layout.addToFooter(LinearLayout.horizontal().spacing(10)); - linearlayout1.addChild(Button.builder(this.buttonTitle, p_293585_ -> this.callback.accept(this.createWorldGenerationInfo())).build()); - linearlayout1.addChild(Button.builder(CommonComponents.GUI_BACK, p_89288_ -> this.onClose()).build()); -- this.layout.visitWidgets(p_293583_ -> { -- }); -+ this.layout.visitWidgets(this::addRenderableWidget); - this.repositionElements(); - } + LinearLayout linearlayout1 = this.layout.addToFooter(LinearLayout.horizontal().spacing(10)); + linearlayout1.addChild(Button.builder(this.buttonTitle, p_293585_ -> this.callback.accept(this.createWorldGenerationInfo())).build()); + linearlayout1.addChild(Button.builder(CommonComponents.GUI_BACK, p_89288_ -> this.onClose()).build()); +- this.layout.visitWidgets(p_293583_ -> { +- }); ++ this.layout.visitWidgets(this::addRenderableWidget); + this.repositionElements(); + } diff --git a/versions/snapshot/1.20/23w44a/patches/joined/com/mojang/realmsclient/gui/screens/RealmsResetWorldScreen.java.patch b/versions/snapshot/1.20/23w44a/patches/joined/com/mojang/realmsclient/gui/screens/RealmsResetWorldScreen.java.patch index 85f3f739..dd178b62 100644 --- a/versions/snapshot/1.20/23w44a/patches/joined/com/mojang/realmsclient/gui/screens/RealmsResetWorldScreen.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/joined/com/mojang/realmsclient/gui/screens/RealmsResetWorldScreen.java.patch @@ -1,12 +1,12 @@ --- a/com/mojang/realmsclient/gui/screens/RealmsResetWorldScreen.java +++ b/com/mojang/realmsclient/gui/screens/RealmsResetWorldScreen.java -@@ -216,8 +216,7 @@ - ) - ); - this.layout.addToFooter(Button.builder(CommonComponents.GUI_BACK, p_300644_ -> this.onClose()).build()); -- this.layout.visitWidgets(p_300642_ -> { -- }); -+ this.layout.visitWidgets(this::addRenderableWidget); - this.layout.arrangeElements(); - } +@@ -226,8 +226,7 @@ + ) + ); + this.layout.addToFooter(Button.builder(CommonComponents.GUI_BACK, p_300644_ -> this.onClose()).build()); +- this.layout.visitWidgets(p_300642_ -> { +- }); ++ this.layout.visitWidgets(this::addRenderableWidget); + this.layout.arrangeElements(); + } diff --git a/versions/snapshot/1.20/23w44a/patches/joined/com/mojang/realmsclient/gui/screens/RealmsSelectWorldTemplateScreen.java.patch b/versions/snapshot/1.20/23w44a/patches/joined/com/mojang/realmsclient/gui/screens/RealmsSelectWorldTemplateScreen.java.patch index 10fa8bb3..9c4f9cc7 100644 --- a/versions/snapshot/1.20/23w44a/patches/joined/com/mojang/realmsclient/gui/screens/RealmsSelectWorldTemplateScreen.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/joined/com/mojang/realmsclient/gui/screens/RealmsSelectWorldTemplateScreen.java.patch @@ -1,26 +1,26 @@ --- a/com/mojang/realmsclient/gui/screens/RealmsSelectWorldTemplateScreen.java +++ b/com/mojang/realmsclient/gui/screens/RealmsSelectWorldTemplateScreen.java -@@ -157,9 +157,9 @@ - public void run() { - WorldTemplatePaginatedList worldtemplatepaginatedlist = p_89654_; - -- Either either; -- for(RealmsClient realmsclient = RealmsClient.create(); -- worldtemplatepaginatedlist != null; -+ RealmsClient realmsclient = RealmsClient.create(); -+ while(worldtemplatepaginatedlist != null) { -+ Either either = RealmsSelectWorldTemplateScreen.this.fetchTemplates(worldtemplatepaginatedlist, realmsclient); - worldtemplatepaginatedlist = RealmsSelectWorldTemplateScreen.this.minecraft - .submit( - () -> { -@@ -193,9 +193,7 @@ - } - } - ) -- .join() -- ) { -- either = RealmsSelectWorldTemplateScreen.this.fetchTemplates(worldtemplatepaginatedlist, realmsclient); -+ .join(); - } - } - }) +@@ -159,9 +159,9 @@ + public void run() { + WorldTemplatePaginatedList worldtemplatepaginatedlist = p_89654_; + +- Either either; +- for(RealmsClient realmsclient = RealmsClient.create(); +- worldtemplatepaginatedlist != null; ++ RealmsClient realmsclient = RealmsClient.create(); ++ while(worldtemplatepaginatedlist != null) { ++ Either either = RealmsSelectWorldTemplateScreen.this.fetchTemplates(worldtemplatepaginatedlist, realmsclient); + worldtemplatepaginatedlist = RealmsSelectWorldTemplateScreen.this.minecraft + .submit( + () -> { +@@ -199,9 +199,7 @@ + } + } + ) +- .join() +- ) { +- either = RealmsSelectWorldTemplateScreen.this.fetchTemplates(worldtemplatepaginatedlist, realmsclient); ++ .join(); + } + } + }) diff --git a/versions/snapshot/1.20/23w44a/patches/joined/com/mojang/realmsclient/gui/screens/RealmsUploadScreen.java.patch b/versions/snapshot/1.20/23w44a/patches/joined/com/mojang/realmsclient/gui/screens/RealmsUploadScreen.java.patch index 7b009647..183ea927 100644 --- a/versions/snapshot/1.20/23w44a/patches/joined/com/mojang/realmsclient/gui/screens/RealmsUploadScreen.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/joined/com/mojang/realmsclient/gui/screens/RealmsUploadScreen.java.patch @@ -1,27 +1,27 @@ --- a/com/mojang/realmsclient/gui/screens/RealmsUploadScreen.java +++ b/com/mojang/realmsclient/gui/screens/RealmsUploadScreen.java @@ -264,8 +264,8 @@ - } else if (this.cancelled) { - this.uploadCancelled(); - } else { -- j = (int)(new File(this.minecraft.gameDirectory.getAbsolutePath(), "saves")); -- file1 = this.tarGzipArchive(new File(j, this.selectedLevel.getLevelId())); -+ File file = (new File(this.minecraft.gameDirectory.getAbsolutePath(), "saves")); -+ file1 = this.tarGzipArchive(new File(file, this.selectedLevel.getLevelId())); - if (this.cancelled) { - this.uploadCancelled(); - } else if (this.verify(file1)) { + } else if (this.cancelled) { + this.uploadCancelled(); + } else { +- j = (int)(new File(this.minecraft.gameDirectory.getAbsolutePath(), "saves")); +- file1 = this.tarGzipArchive(new File(j, this.selectedLevel.getLevelId())); ++ File file = (new File(this.minecraft.gameDirectory.getAbsolutePath(), "saves")); ++ file1 = this.tarGzipArchive(new File(file, this.selectedLevel.getLevelId())); + if (this.cancelled) { + this.uploadCancelled(); + } else if (this.verify(file1)) { @@ -330,13 +330,10 @@ + } + } + } catch (IOException ioexception) { +- uploadinfo = ioexception; + this.setErrorMessage(Component.translatable("mco.upload.failed", ioexception.getMessage())); + } catch (RealmsServiceException realmsserviceexception) { +- uploadinfo = realmsserviceexception; + this.setErrorMessage(Component.translatable("mco.upload.failed", realmsserviceexception.realmsError.errorMessage())); + } catch (InterruptedException interruptedexception1) { +- uploadinfo = interruptedexception1; + LOGGER.error("Could not acquire upload lock"); } - } - } catch (IOException ioexception) { -- uploadinfo = ioexception; - this.setErrorMessage(Component.translatable("mco.upload.failed", ioexception.getMessage())); - } catch (RealmsServiceException realmsserviceexception) { -- uploadinfo = realmsserviceexception; - this.setErrorMessage(Component.translatable("mco.upload.failed", realmsserviceexception.realmsError.errorMessage())); - } catch (InterruptedException interruptedexception1) { -- uploadinfo = interruptedexception1; - LOGGER.error("Could not acquire upload lock"); - } - } finally { + } finally { diff --git a/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/Minecraft.java.patch b/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/Minecraft.java.patch index 77b4f085..b8d29f07 100644 --- a/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/Minecraft.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/Minecraft.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/client/Minecraft.java +++ b/net/minecraft/client/Minecraft.java -@@ -2478,7 +2478,7 @@ - } +@@ -2486,7 +2486,7 @@ + } - public CompletableFuture delayTextureReload() { -- return this.>submit(this::reloadResourcePacks).thenCompose(p_231391_ -> p_231391_); -+ return this.>submit((Supplier>)this::reloadResourcePacks).thenCompose(p_231391_ -> p_231391_); - } + public CompletableFuture delayTextureReload() { +- return this.>submit(this::reloadResourcePacks).thenCompose(p_231391_ -> p_231391_); ++ return this.>submit((Supplier>)this::reloadResourcePacks).thenCompose(p_231391_ -> p_231391_); + } - public void updateReportEnvironment(ReportEnvironment p_239477_) { + public void updateReportEnvironment(ReportEnvironment p_239477_) { diff --git a/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/OptionInstance.java.patch b/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/OptionInstance.java.patch index 8de1a284..80076502 100644 --- a/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/OptionInstance.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/OptionInstance.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/client/OptionInstance.java +++ b/net/minecraft/client/OptionInstance.java @@ -289,7 +289,7 @@ - return new OptionInstance.SliderableValueSet() { - @Override - public Optional validateValue(R p_231674_) { -- return IntRangeBase.this.validateValue((T)Integer.valueOf(p_231659_.applyAsInt(p_231674_))).map(p_231658_::apply); -+ return IntRangeBase.this.validateValue(Integer.valueOf(p_231659_.applyAsInt(p_231674_))).map(p_231658_::apply); - } + return new OptionInstance.SliderableValueSet() { + @Override + public Optional validateValue(R p_231674_) { +- return IntRangeBase.this.validateValue((T)Integer.valueOf(p_231659_.applyAsInt(p_231674_))).map(p_231658_::apply); ++ return IntRangeBase.this.validateValue(Integer.valueOf(p_231659_.applyAsInt(p_231674_))).map(p_231658_::apply); + } - @Override + @Override diff --git a/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/gui/Gui.java.patch b/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/gui/Gui.java.patch index fb77f5b8..a9311e52 100644 --- a/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/gui/Gui.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/gui/Gui.java.patch @@ -1,14 +1,14 @@ --- a/net/minecraft/client/gui/Gui.java +++ b/net/minecraft/client/gui/Gui.java @@ -485,9 +485,10 @@ - TextureAtlasSprite textureatlassprite = mobeffecttexturemanager.get(mobeffect); - int i1 = j; - float f1 = f; -+ int i_f = i; - list.add(() -> { - p_282812_.setColor(1.0F, 1.0F, 1.0F, f1); -- p_282812_.blit(i + 3, i1 + 3, 0, 18, 18, textureatlassprite); -+ p_282812_.blit(i_f + 3, i1 + 3, 0, 18, 18, textureatlassprite); - p_282812_.setColor(1.0F, 1.0F, 1.0F, 1.0F); - }); - } + TextureAtlasSprite textureatlassprite = mobeffecttexturemanager.get(mobeffect); + int i1 = j; + float f1 = f; ++ int i_f = i; + list.add(() -> { + p_282812_.setColor(1.0F, 1.0F, 1.0F, f1); +- p_282812_.blit(i + 3, i1 + 3, 0, 18, 18, textureatlassprite); ++ p_282812_.blit(i_f + 3, i1 + 3, 0, 18, 18, textureatlassprite); + p_282812_.setColor(1.0F, 1.0F, 1.0F, 1.0F); + }); + } diff --git a/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/gui/components/CycleButton.java.patch b/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/gui/components/CycleButton.java.patch index a46e30e2..b2c2bdcc 100644 --- a/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/gui/components/CycleButton.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/gui/components/CycleButton.java.patch @@ -1,16 +1,16 @@ --- a/net/minecraft/client/gui/components/CycleButton.java +++ b/net/minecraft/client/gui/components/CycleButton.java @@ -154,11 +154,11 @@ - } + } - public static CycleButton.Builder booleanBuilder(Component p_168897_, Component p_168898_) { -- return new CycleButton.Builder<>(p_168902_ -> p_168902_ ? p_168897_ : p_168898_).withValues(BOOLEAN_OPTIONS); -+ return new CycleButton.Builder(p_168902_ -> p_168902_ ? p_168897_ : p_168898_).withValues(BOOLEAN_OPTIONS); - } + public static CycleButton.Builder booleanBuilder(Component p_168897_, Component p_168898_) { +- return new CycleButton.Builder<>(p_168902_ -> p_168902_ ? p_168897_ : p_168898_).withValues(BOOLEAN_OPTIONS); ++ return new CycleButton.Builder(p_168902_ -> p_168902_ ? p_168897_ : p_168898_).withValues(BOOLEAN_OPTIONS); + } - public static CycleButton.Builder onOffBuilder() { -- return new CycleButton.Builder<>(p_168891_ -> p_168891_ ? CommonComponents.OPTION_ON : CommonComponents.OPTION_OFF).withValues(BOOLEAN_OPTIONS); -+ return new CycleButton.Builder(p_168891_ -> p_168891_ ? CommonComponents.OPTION_ON : CommonComponents.OPTION_OFF).withValues(BOOLEAN_OPTIONS); - } + public static CycleButton.Builder onOffBuilder() { +- return new CycleButton.Builder<>(p_168891_ -> p_168891_ ? CommonComponents.OPTION_ON : CommonComponents.OPTION_OFF).withValues(BOOLEAN_OPTIONS); ++ return new CycleButton.Builder(p_168891_ -> p_168891_ ? CommonComponents.OPTION_ON : CommonComponents.OPTION_OFF).withValues(BOOLEAN_OPTIONS); + } - public static CycleButton.Builder onOffBuilder(boolean p_168917_) { + public static CycleButton.Builder onOffBuilder(boolean p_168917_) { diff --git a/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/gui/components/PopupScreen.java.patch b/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/gui/components/PopupScreen.java.patch index 7a3ab92d..10a7055b 100644 --- a/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/gui/components/PopupScreen.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/gui/components/PopupScreen.java.patch @@ -2,11 +2,11 @@ +++ b/net/minecraft/client/gui/components/PopupScreen.java @@ -66,8 +66,7 @@ - this.layout.addChild(new MultiLineTextWidget(this.message, this.font).setMaxWidth(this.contentWidth).setCentered(true)); - this.layout.addChild(this.buildButtonRow()); -- this.layout.visitWidgets(p_304694_ -> { -- }); -+ this.layout.visitWidgets(this::addRenderableWidget); - this.repositionElements(); - } + this.layout.addChild(new MultiLineTextWidget(this.message, this.font).setMaxWidth(this.contentWidth).setCentered(true)); + this.layout.addChild(this.buildButtonRow()); +- this.layout.visitWidgets(p_304694_ -> { +- }); ++ this.layout.visitWidgets(this::addRenderableWidget); + this.repositionElements(); + } diff --git a/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/gui/screens/PresetFlatWorldScreen.java.patch b/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/gui/screens/PresetFlatWorldScreen.java.patch index c80d41a7..297504e2 100644 --- a/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/gui/screens/PresetFlatWorldScreen.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/gui/screens/PresetFlatWorldScreen.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/client/gui/screens/PresetFlatWorldScreen.java +++ b/net/minecraft/client/gui/screens/PresetFlatWorldScreen.java @@ -308,7 +308,7 @@ - public Entry(Holder p_232758_) { - this.preset = p_232758_.value(); - this.name = p_232758_.unwrapKey() -- .map(p_232760_ -> Component.translatable(p_232760_.location().toLanguageKey("flat_world_preset"))) -+ .map(p_232760_ -> (Component)Component.translatable(p_232760_.location().toLanguageKey("flat_world_preset"))) - .orElse(PresetFlatWorldScreen.UNKNOWN_PRESET); - } + public Entry(Holder p_232758_) { + this.preset = p_232758_.value(); + this.name = p_232758_.unwrapKey() +- .map(p_232760_ -> Component.translatable(p_232760_.location().toLanguageKey("flat_world_preset"))) ++ .map(p_232760_ -> (Component)Component.translatable(p_232760_.location().toLanguageKey("flat_world_preset"))) + .orElse(PresetFlatWorldScreen.UNKNOWN_PRESET); + } diff --git a/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/gui/screens/achievement/StatsScreen.java.patch b/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/gui/screens/achievement/StatsScreen.java.patch index 08f22b24..9e163eac 100644 --- a/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/gui/screens/achievement/StatsScreen.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/gui/screens/achievement/StatsScreen.java.patch @@ -1,16 +1,16 @@ --- a/net/minecraft/client/gui/screens/achievement/StatsScreen.java +++ b/net/minecraft/client/gui/screens/achievement/StatsScreen.java @@ -485,11 +485,11 @@ - i = 0; - j = 0; - } else if (ItemStatisticsList.this.blockColumns.contains(ItemStatisticsList.this.sortColumn)) { -- StatType stattype = ItemStatisticsList.this.sortColumn; -+ StatType stattype = (StatType)ItemStatisticsList.this.sortColumn; - i = item instanceof BlockItem ? StatsScreen.this.stats.getValue(stattype, ((BlockItem)item).getBlock()) : -1; - j = item1 instanceof BlockItem ? StatsScreen.this.stats.getValue(stattype, ((BlockItem)item1).getBlock()) : -1; - } else { -- StatType stattype1 = ItemStatisticsList.this.sortColumn; -+ StatType stattype1 = (StatType)ItemStatisticsList.this.sortColumn; - i = StatsScreen.this.stats.getValue(stattype1, item); - j = StatsScreen.this.stats.getValue(stattype1, item1); - } + i = 0; + j = 0; + } else if (ItemStatisticsList.this.blockColumns.contains(ItemStatisticsList.this.sortColumn)) { +- StatType stattype = ItemStatisticsList.this.sortColumn; ++ StatType stattype = (StatType)ItemStatisticsList.this.sortColumn; + i = item instanceof BlockItem ? StatsScreen.this.stats.getValue(stattype, ((BlockItem)item).getBlock()) : -1; + j = item1 instanceof BlockItem ? StatsScreen.this.stats.getValue(stattype, ((BlockItem)item1).getBlock()) : -1; + } else { +- StatType stattype1 = ItemStatisticsList.this.sortColumn; ++ StatType stattype1 = (StatType)ItemStatisticsList.this.sortColumn; + i = StatsScreen.this.stats.getValue(stattype1, item); + j = StatsScreen.this.stats.getValue(stattype1, item1); + } diff --git a/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/gui/screens/multiplayer/ServerReconfigScreen.java.patch b/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/gui/screens/multiplayer/ServerReconfigScreen.java.patch index c1b2539b..8eedd7bb 100644 --- a/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/gui/screens/multiplayer/ServerReconfigScreen.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/gui/screens/multiplayer/ServerReconfigScreen.java.patch @@ -1,12 +1,12 @@ --- a/net/minecraft/client/gui/screens/multiplayer/ServerReconfigScreen.java +++ b/net/minecraft/client/gui/screens/multiplayer/ServerReconfigScreen.java @@ -39,8 +39,7 @@ - .addChild(Button.builder(CommonComponents.GUI_DISCONNECT, p_295623_ -> this.connection.disconnect(ConnectScreen.ABORT_CONNECTION)).build()); - this.disconnectButton.active = false; - this.layout.arrangeElements(); -- this.layout.visitWidgets(p_295135_ -> { -- }); -+ this.layout.visitWidgets(this::addRenderableWidget); - this.repositionElements(); - } + .addChild(Button.builder(CommonComponents.GUI_DISCONNECT, p_295623_ -> this.connection.disconnect(ConnectScreen.ABORT_CONNECTION)).build()); + this.disconnectButton.active = false; + this.layout.arrangeElements(); +- this.layout.visitWidgets(p_295135_ -> { +- }); ++ this.layout.visitWidgets(this::addRenderableWidget); + this.repositionElements(); + } diff --git a/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/gui/screens/reporting/ChatReportScreen.java.patch b/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/gui/screens/reporting/ChatReportScreen.java.patch index eb3ecfa6..7e3d67ff 100644 --- a/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/gui/screens/reporting/ChatReportScreen.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/gui/screens/reporting/ChatReportScreen.java.patch @@ -1,12 +1,12 @@ --- a/net/minecraft/client/gui/screens/reporting/ChatReportScreen.java +++ b/net/minecraft/client/gui/screens/reporting/ChatReportScreen.java @@ -77,8 +77,7 @@ - LinearLayout linearlayout = this.layout.addChild(LinearLayout.horizontal().spacing(8)); - linearlayout.addChild(Button.builder(CommonComponents.GUI_BACK, p_309407_ -> this.onClose()).width(120).build()); - this.sendButton = linearlayout.addChild(Button.builder(SEND_REPORT, p_299795_ -> this.sendReport()).width(120).build()); -- this.layout.visitWidgets(p_299794_ -> { -- }); -+ this.layout.visitWidgets(this::addRenderableWidget); - this.repositionElements(); - this.onReportChanged(); - } + LinearLayout linearlayout = this.layout.addChild(LinearLayout.horizontal().spacing(8)); + linearlayout.addChild(Button.builder(CommonComponents.GUI_BACK, p_309407_ -> this.onClose()).width(120).build()); + this.sendButton = linearlayout.addChild(Button.builder(SEND_REPORT, p_299795_ -> this.sendReport()).width(120).build()); +- this.layout.visitWidgets(p_299794_ -> { +- }); ++ this.layout.visitWidgets(this::addRenderableWidget); + this.repositionElements(); + this.onReportChanged(); + } diff --git a/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/gui/screens/reporting/NameReportScreen.java.patch b/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/gui/screens/reporting/NameReportScreen.java.patch index 0d5607b0..9537fd79 100644 --- a/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/gui/screens/reporting/NameReportScreen.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/gui/screens/reporting/NameReportScreen.java.patch @@ -1,12 +1,12 @@ --- a/net/minecraft/client/gui/screens/reporting/NameReportScreen.java +++ b/net/minecraft/client/gui/screens/reporting/NameReportScreen.java @@ -59,8 +59,7 @@ - linearlayout.addChild(Button.builder(CommonComponents.GUI_BACK, p_309408_ -> this.onClose()).width(120).build()); - this.sendButton = linearlayout.addChild(Button.builder(SEND_REPORT, p_299852_ -> this.sendReport()).width(120).build()); - this.onReportChanged(); -- this.layout.visitWidgets(p_300038_ -> { -- }); -+ this.layout.visitWidgets(this::addRenderableWidget); - this.repositionElements(); - } + linearlayout.addChild(Button.builder(CommonComponents.GUI_BACK, p_309408_ -> this.onClose()).width(120).build()); + this.sendButton = linearlayout.addChild(Button.builder(SEND_REPORT, p_299852_ -> this.sendReport()).width(120).build()); + this.onReportChanged(); +- this.layout.visitWidgets(p_300038_ -> { +- }); ++ this.layout.visitWidgets(this::addRenderableWidget); + this.repositionElements(); + } diff --git a/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/gui/screens/reporting/ReportPlayerScreen.java.patch b/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/gui/screens/reporting/ReportPlayerScreen.java.patch index 5e67ad23..d744939f 100644 --- a/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/gui/screens/reporting/ReportPlayerScreen.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/gui/screens/reporting/ReportPlayerScreen.java.patch @@ -1,12 +1,12 @@ --- a/net/minecraft/client/gui/screens/reporting/ReportPlayerScreen.java +++ b/net/minecraft/client/gui/screens/reporting/ReportPlayerScreen.java -@@ -79,8 +79,7 @@ - ); - this.layout.addChild(SpacerElement.height(20)); - this.layout.addChild(Button.builder(CommonComponents.GUI_CANCEL, p_299992_ -> this.onClose()).build()); -- this.layout.visitWidgets(p_299910_ -> { -- }); -+ this.layout.visitWidgets(this::addRenderableWidget); - this.repositionElements(); - } +@@ -81,8 +81,7 @@ + ); + this.layout.addChild(SpacerElement.height(20)); + this.layout.addChild(Button.builder(CommonComponents.GUI_CANCEL, p_299992_ -> this.onClose()).build()); +- this.layout.visitWidgets(p_299910_ -> { +- }); ++ this.layout.visitWidgets(this::addRenderableWidget); + this.repositionElements(); + } diff --git a/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/gui/screens/reporting/SkinReportScreen.java.patch b/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/gui/screens/reporting/SkinReportScreen.java.patch index 4c5d77c3..9c10fb41 100644 --- a/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/gui/screens/reporting/SkinReportScreen.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/gui/screens/reporting/SkinReportScreen.java.patch @@ -1,12 +1,12 @@ --- a/net/minecraft/client/gui/screens/reporting/SkinReportScreen.java +++ b/net/minecraft/client/gui/screens/reporting/SkinReportScreen.java @@ -71,8 +71,7 @@ - LinearLayout linearlayout2 = this.layout.addChild(LinearLayout.horizontal().spacing(8)); - linearlayout2.addChild(Button.builder(CommonComponents.GUI_BACK, p_309409_ -> this.onClose()).width(120).build()); - this.sendButton = linearlayout2.addChild(Button.builder(SEND_REPORT, p_299925_ -> this.sendReport()).width(120).build()); -- this.layout.visitWidgets(p_299974_ -> { -- }); -+ this.layout.visitWidgets(this::addRenderableWidget); - this.repositionElements(); - this.onReportChanged(); - } + LinearLayout linearlayout2 = this.layout.addChild(LinearLayout.horizontal().spacing(8)); + linearlayout2.addChild(Button.builder(CommonComponents.GUI_BACK, p_309409_ -> this.onClose()).width(120).build()); + this.sendButton = linearlayout2.addChild(Button.builder(SEND_REPORT, p_299925_ -> this.sendReport()).width(120).build()); +- this.layout.visitWidgets(p_299974_ -> { +- }); ++ this.layout.visitWidgets(this::addRenderableWidget); + this.repositionElements(); + this.onReportChanged(); + } diff --git a/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/gui/screens/telemetry/TelemetryInfoScreen.java.patch b/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/gui/screens/telemetry/TelemetryInfoScreen.java.patch index dbe7c976..7829c3b9 100644 --- a/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/gui/screens/telemetry/TelemetryInfoScreen.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/gui/screens/telemetry/TelemetryInfoScreen.java.patch @@ -1,12 +1,12 @@ --- a/net/minecraft/client/gui/screens/telemetry/TelemetryInfoScreen.java +++ b/net/minecraft/client/gui/screens/telemetry/TelemetryInfoScreen.java -@@ -77,8 +77,7 @@ - linearlayout.addChild(layout); - framelayout.arrangeElements(); - FrameLayout.alignInRectangle(framelayout, 0, 0, this.width, this.height, 0.5F, 0.0F); -- framelayout.visitWidgets(p_264696_ -> { -- }); -+ framelayout.visitWidgets(this::addRenderableWidget); - } +@@ -78,8 +78,7 @@ + linearlayout.addChild(layout); + framelayout.arrangeElements(); + FrameLayout.alignInRectangle(framelayout, 0, 0, this.width, this.height, 0.5F, 0.0F); +- framelayout.visitWidgets(p_264696_ -> { +- }); ++ framelayout.visitWidgets(this::addRenderableWidget); + } - private Layout createLowerSection() { + private Layout createLowerSection() { diff --git a/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/gui/screens/worldselection/ConfirmExperimentalFeaturesScreen.java.patch b/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/gui/screens/worldselection/ConfirmExperimentalFeaturesScreen.java.patch index 9ab9a86b..f5ffa4cd 100644 --- a/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/gui/screens/worldselection/ConfirmExperimentalFeaturesScreen.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/gui/screens/worldselection/ConfirmExperimentalFeaturesScreen.java.patch @@ -1,12 +1,12 @@ --- a/net/minecraft/client/gui/screens/worldselection/ConfirmExperimentalFeaturesScreen.java +++ b/net/minecraft/client/gui/screens/worldselection/ConfirmExperimentalFeaturesScreen.java -@@ -60,8 +60,7 @@ - ); - gridlayout$rowhelper.addChild(Button.builder(CommonComponents.GUI_PROCEED, p_252248_ -> this.callback.accept(true)).build()); - gridlayout$rowhelper.addChild(Button.builder(CommonComponents.GUI_BACK, p_250397_ -> this.callback.accept(false)).build()); -- this.layout.visitWidgets(p_269625_ -> { -- }); -+ this.layout.visitWidgets(this::addRenderableWidget); - this.layout.arrangeElements(); - this.repositionElements(); - } +@@ -62,8 +62,7 @@ + ); + gridlayout$rowhelper.addChild(Button.builder(CommonComponents.GUI_PROCEED, p_252248_ -> this.callback.accept(true)).build()); + gridlayout$rowhelper.addChild(Button.builder(CommonComponents.GUI_BACK, p_250397_ -> this.callback.accept(false)).build()); +- this.layout.visitWidgets(p_269625_ -> { +- }); ++ this.layout.visitWidgets(this::addRenderableWidget); + this.layout.arrangeElements(); + this.repositionElements(); + } diff --git a/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/gui/screens/worldselection/EditGameRulesScreen.java.patch b/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/gui/screens/worldselection/EditGameRulesScreen.java.patch index fd5ab7ce..7aadc0a9 100644 --- a/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/gui/screens/worldselection/EditGameRulesScreen.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/gui/screens/worldselection/EditGameRulesScreen.java.patch @@ -1,12 +1,12 @@ --- a/net/minecraft/client/gui/screens/worldselection/EditGameRulesScreen.java +++ b/net/minecraft/client/gui/screens/worldselection/EditGameRulesScreen.java @@ -58,8 +58,7 @@ - Button.builder(CommonComponents.GUI_DONE, p_101059_ -> this.exitCallback.accept(Optional.of(this.gameRules))).build() - ); - gridlayout$rowhelper.addChild(Button.builder(CommonComponents.GUI_CANCEL, p_101073_ -> this.exitCallback.accept(Optional.empty())).build()); -- gridlayout$rowhelper.getGrid().visitWidgets(p_267855_ -> { -- }); -+ gridlayout$rowhelper.getGrid().visitWidgets(this::addRenderableWidget); - gridlayout$rowhelper.getGrid().setPosition(this.width / 2 - 155, this.height - 28); - gridlayout$rowhelper.getGrid().arrangeElements(); - } + Button.builder(CommonComponents.GUI_DONE, p_101059_ -> this.exitCallback.accept(Optional.of(this.gameRules))).build() + ); + gridlayout$rowhelper.addChild(Button.builder(CommonComponents.GUI_CANCEL, p_101073_ -> this.exitCallback.accept(Optional.empty())).build()); +- gridlayout$rowhelper.getGrid().visitWidgets(p_267855_ -> { +- }); ++ gridlayout$rowhelper.getGrid().visitWidgets(this::addRenderableWidget); + gridlayout$rowhelper.getGrid().setPosition(this.width / 2 - 155, this.height - 28); + gridlayout$rowhelper.getGrid().arrangeElements(); + } diff --git a/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/gui/screens/worldselection/EditWorldScreen.java.patch b/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/gui/screens/worldselection/EditWorldScreen.java.patch index cba55513..5d2478e5 100644 --- a/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/gui/screens/worldselection/EditWorldScreen.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/gui/screens/worldselection/EditWorldScreen.java.patch @@ -1,12 +1,12 @@ --- a/net/minecraft/client/gui/screens/worldselection/EditWorldScreen.java +++ b/net/minecraft/client/gui/screens/worldselection/EditWorldScreen.java @@ -112,8 +112,7 @@ - this.layout.addChild(new SpacerElement(200, 20)); - this.layout.addChild(linearlayout); - this.setInitialFocus(editbox); -- this.layout.visitWidgets(p_307064_ -> { -- }); -+ this.layout.visitWidgets(this::addRenderableWidget); - } + this.layout.addChild(new SpacerElement(200, 20)); + this.layout.addChild(linearlayout); + this.setInitialFocus(editbox); +- this.layout.visitWidgets(p_307064_ -> { +- }); ++ this.layout.visitWidgets(this::addRenderableWidget); + } - @Override + @Override diff --git a/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/gui/screens/worldselection/ExperimentsScreen.java.patch b/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/gui/screens/worldselection/ExperimentsScreen.java.patch index 2345b4e1..682c6cc4 100644 --- a/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/gui/screens/worldselection/ExperimentsScreen.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/gui/screens/worldselection/ExperimentsScreen.java.patch @@ -1,12 +1,12 @@ --- a/net/minecraft/client/gui/screens/worldselection/ExperimentsScreen.java +++ b/net/minecraft/client/gui/screens/worldselection/ExperimentsScreen.java -@@ -68,8 +68,7 @@ - GridLayout.RowHelper gridlayout$rowhelper = this.layout.addToFooter(new GridLayout().columnSpacing(10)).createRowHelper(2); - gridlayout$rowhelper.addChild(Button.builder(CommonComponents.GUI_DONE, p_270336_ -> this.onDone()).build()); - gridlayout$rowhelper.addChild(Button.builder(CommonComponents.GUI_CANCEL, p_274702_ -> this.onClose()).build()); -- this.layout.visitWidgets(p_270313_ -> { -- }); -+ this.layout.visitWidgets(this::addRenderableWidget); - this.repositionElements(); - } +@@ -70,8 +70,7 @@ + GridLayout.RowHelper gridlayout$rowhelper = this.layout.addToFooter(new GridLayout().columnSpacing(10)).createRowHelper(2); + gridlayout$rowhelper.addChild(Button.builder(CommonComponents.GUI_DONE, p_270336_ -> this.onDone()).build()); + gridlayout$rowhelper.addChild(Button.builder(CommonComponents.GUI_CANCEL, p_274702_ -> this.onClose()).build()); +- this.layout.visitWidgets(p_270313_ -> { +- }); ++ this.layout.visitWidgets(this::addRenderableWidget); + this.repositionElements(); + } diff --git a/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/gui/screens/worldselection/WorldCreationUiState.java.patch b/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/gui/screens/worldselection/WorldCreationUiState.java.patch index bd906643..2facd110 100644 --- a/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/gui/screens/worldselection/WorldCreationUiState.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/gui/screens/worldselection/WorldCreationUiState.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/client/gui/screens/worldselection/WorldCreationUiState.java +++ b/net/minecraft/client/gui/screens/worldselection/WorldCreationUiState.java -@@ -299,7 +299,7 @@ - public Component describePreset() { - return Optional.ofNullable(this.preset) - .flatMap(Holder::unwrapKey) -- .map(p_268048_ -> Component.translatable(p_268048_.location().toLanguageKey("generator"))) -+ .map(p_268048_ -> (Component) Component.translatable(p_268048_.location().toLanguageKey("generator"))) - .orElse(CUSTOM_WORLD_DESCRIPTION); - } +@@ -303,7 +303,7 @@ + public Component describePreset() { + return Optional.ofNullable(this.preset) + .flatMap(Holder::unwrapKey) +- .map(p_268048_ -> Component.translatable(p_268048_.location().toLanguageKey("generator"))) ++ .map(p_268048_ -> (Component) Component.translatable(p_268048_.location().toLanguageKey("generator"))) + .orElse(CUSTOM_WORLD_DESCRIPTION); + } diff --git a/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/gui/screens/worldselection/WorldOpenFlows.java.patch b/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/gui/screens/worldselection/WorldOpenFlows.java.patch index e4cac364..2c5c8431 100644 --- a/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/gui/screens/worldselection/WorldOpenFlows.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/gui/screens/worldselection/WorldOpenFlows.java.patch @@ -1,26 +1,26 @@ --- a/net/minecraft/client/gui/screens/worldselection/WorldOpenFlows.java +++ b/net/minecraft/client/gui/screens/worldselection/WorldOpenFlows.java -@@ -146,7 +146,10 @@ - PackRepository packrepository = ServerPacksSource.createPackRepository(p_249540_); - Dynamic dynamic = p_249540_.getDataTag(); - WorldLoader.PackConfig worldloader$packconfig = LevelStorageSource.getPackConfig(dynamic, packrepository, false); -- return this.loadWorldDataBlocking( -+ @OnlyIn(Dist.CLIENT) -+ record Data(LevelSettings levelSettings, WorldOptions options, Registry existingDimensions) { -+ } -+ return this.>loadWorldDataBlocking( - worldloader$packconfig, - p_307097_ -> { - Registry registry = new MappedRegistry<>(Registries.LEVEL_STEM, Lifecycle.stable()).freeze(); -@@ -173,11 +176,7 @@ - } - ); +@@ -149,7 +149,10 @@ + PackRepository packrepository = ServerPacksSource.createPackRepository(p_249540_); + Dynamic dynamic = p_249540_.getDataTag(); + WorldLoader.PackConfig worldloader$packconfig = LevelStorageSource.getPackConfig(dynamic, packrepository, false); +- return this.loadWorldDataBlocking( ++ @OnlyIn(Dist.CLIENT) ++ record Data(LevelSettings levelSettings, WorldOptions options, Registry existingDimensions) { ++ } ++ return this.>loadWorldDataBlocking( + worldloader$packconfig, + p_307097_ -> { + Registry registry = new MappedRegistry<>(Registries.LEVEL_STEM, Lifecycle.stable()).freeze(); +@@ -180,11 +183,7 @@ + } + ); -- @OnlyIn(Dist.CLIENT) -- record Data(LevelSettings levelSettings, WorldOptions options, Registry existingDimensions) { - } +- @OnlyIn(Dist.CLIENT) +- record Data(LevelSettings levelSettings, WorldOptions options, Registry existingDimensions) { + } - -- } +- } - private R loadWorldDataBlocking( - WorldLoader.PackConfig p_250997_, WorldLoader.WorldDataSupplier p_251759_, WorldLoader.ResultFactory p_249635_ + private R loadWorldDataBlocking( + WorldLoader.PackConfig p_250997_, WorldLoader.WorldDataSupplier p_251759_, WorldLoader.ResultFactory p_249635_ diff --git a/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/gui/spectator/categories/TeleportToPlayerMenuCategory.java.patch b/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/gui/spectator/categories/TeleportToPlayerMenuCategory.java.patch index 8baab0a7..7b7e3586 100644 --- a/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/gui/spectator/categories/TeleportToPlayerMenuCategory.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/gui/spectator/categories/TeleportToPlayerMenuCategory.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/client/gui/spectator/categories/TeleportToPlayerMenuCategory.java +++ b/net/minecraft/client/gui/spectator/categories/TeleportToPlayerMenuCategory.java @@ -32,7 +32,7 @@ - this.items = p_101861_.stream() - .filter(p_253336_ -> p_253336_.getGameMode() != GameType.SPECTATOR) - .sorted(PROFILE_ORDER) -- .map(p_253334_ -> new PlayerMenuItem(p_253334_.getProfile())) -+ .map(p_253334_ -> (SpectatorMenuItem)new PlayerMenuItem(p_253334_.getProfile())) - .toList(); - } + this.items = p_101861_.stream() + .filter(p_253336_ -> p_253336_.getGameMode() != GameType.SPECTATOR) + .sorted(PROFILE_ORDER) +- .map(p_253334_ -> new PlayerMenuItem(p_253334_.getProfile())) ++ .map(p_253334_ -> (SpectatorMenuItem)new PlayerMenuItem(p_253334_.getProfile())) + .toList(); + } diff --git a/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/main/Main.java.patch b/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/main/Main.java.patch index 1a7133ab..f40f267f 100644 --- a/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/main/Main.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/main/Main.java.patch @@ -1,20 +1,20 @@ --- a/net/minecraft/client/main/Main.java +++ b/net/minecraft/client/main/Main.java @@ -197,7 +197,7 @@ - }; - thread.setUncaughtExceptionHandler(new DefaultUncaughtExceptionHandler(LOGGER)); - Runtime.getRuntime().addShutdownHook(thread); -- final Minecraft minecraft = null; -+ Minecraft minecraft = null; + }; + thread.setUncaughtExceptionHandler(new DefaultUncaughtExceptionHandler(LOGGER)); + Runtime.getRuntime().addShutdownHook(thread); +- final Minecraft minecraft = null; ++ Minecraft minecraft = null; - try { - Thread.currentThread().setName("Render thread"); + try { + Thread.currentThread().setName("Render thread"); @@ -226,7 +226,7 @@ - public void run() { - try { - RenderSystem.initGameThread(true); -- minecraft.run(); -+ minecraft1.run(); - } catch (Throwable throwable3) { - Main.LOGGER.error("Exception in client thread", throwable3); - } + public void run() { + try { + RenderSystem.initGameThread(true); +- minecraft.run(); ++ minecraft1.run(); + } catch (Throwable throwable3) { + Main.LOGGER.error("Exception in client thread", throwable3); + } diff --git a/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/multiplayer/ClientCommonPacketListenerImpl.java.patch b/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/multiplayer/ClientCommonPacketListenerImpl.java.patch index 15055c05..fa46567a 100644 --- a/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/multiplayer/ClientCommonPacketListenerImpl.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/multiplayer/ClientCommonPacketListenerImpl.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/client/multiplayer/ClientCommonPacketListenerImpl.java +++ b/net/minecraft/client/multiplayer/ClientCommonPacketListenerImpl.java @@ -202,7 +202,7 @@ - if (!p_294666_.isEmpty()) { - Registry registry = this.registryAccess().registry(p_294128_).orElseThrow(() -> new IllegalStateException("Unknown registry " + p_294128_)); - Map, List>> map = new HashMap<>(); -- TagNetworkSerialization.deserializeTagsFromNetwork(p_294128_, registry, p_294666_, map::put); -+ TagNetworkSerialization.deserializeTagsFromNetwork((ResourceKey>)p_294128_, registry, p_294666_, map::put); - registry.bindTags(map); - } - } + if (!p_294666_.isEmpty()) { + Registry registry = this.registryAccess().registry(p_294128_).orElseThrow(() -> new IllegalStateException("Unknown registry " + p_294128_)); + Map, List>> map = new HashMap<>(); +- TagNetworkSerialization.deserializeTagsFromNetwork(p_294128_, registry, p_294666_, map::put); ++ TagNetworkSerialization.deserializeTagsFromNetwork((ResourceKey>)p_294128_, registry, p_294666_, map::put); + registry.bindTags(map); + } + } diff --git a/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/renderer/entity/EntityRenderDispatcher.java.patch b/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/renderer/entity/EntityRenderDispatcher.java.patch index 4b219c0c..d60f7748 100644 --- a/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/renderer/entity/EntityRenderDispatcher.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/renderer/entity/EntityRenderDispatcher.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/client/renderer/entity/EntityRenderDispatcher.java +++ b/net/minecraft/client/renderer/entity/EntityRenderDispatcher.java @@ -101,7 +101,7 @@ - if (p_114383_ instanceof AbstractClientPlayer abstractclientplayer) { - PlayerSkin.Model playerskin$model = abstractclientplayer.getSkin().model(); - EntityRenderer entityrenderer = this.playerRenderers.get(playerskin$model); -- return entityrenderer != null ? entityrenderer : this.playerRenderers.get(PlayerSkin.Model.WIDE); -+ return (EntityRenderer)(entityrenderer != null ? entityrenderer : this.playerRenderers.get(PlayerSkin.Model.WIDE)); - } else { - return (EntityRenderer)this.renderers.get(p_114383_.getType()); - } + if (p_114383_ instanceof AbstractClientPlayer abstractclientplayer) { + PlayerSkin.Model playerskin$model = abstractclientplayer.getSkin().model(); + EntityRenderer entityrenderer = this.playerRenderers.get(playerskin$model); +- return entityrenderer != null ? entityrenderer : this.playerRenderers.get(PlayerSkin.Model.WIDE); ++ return (EntityRenderer)(entityrenderer != null ? entityrenderer : this.playerRenderers.get(PlayerSkin.Model.WIDE)); + } else { + return (EntityRenderer)this.renderers.get(p_114383_.getType()); + } diff --git a/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/searchtree/SearchRegistry.java.patch b/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/searchtree/SearchRegistry.java.patch index b693ca02..63421331 100644 --- a/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/searchtree/SearchRegistry.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/searchtree/SearchRegistry.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/client/searchtree/SearchRegistry.java +++ b/net/minecraft/client/searchtree/SearchRegistry.java @@ -64,7 +64,7 @@ - } + } - void populate(List p_235246_) { -- this.tree = this.factory.apply((T)p_235246_); -+ this.tree = this.factory.apply(p_235246_); - this.tree.refresh(); - } + void populate(List p_235246_) { +- this.tree = this.factory.apply((T)p_235246_); ++ this.tree = this.factory.apply(p_235246_); + this.tree.refresh(); + } diff --git a/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/telemetry/TelemetryPropertyMap.java.patch b/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/telemetry/TelemetryPropertyMap.java.patch index c5094032..faba2e96 100644 --- a/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/telemetry/TelemetryPropertyMap.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/joined/net/minecraft/client/telemetry/TelemetryPropertyMap.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/client/telemetry/TelemetryPropertyMap.java +++ b/net/minecraft/client/telemetry/TelemetryPropertyMap.java @@ -61,7 +61,7 @@ - T t = p_261668_.get(p_261627_.id()); - if (t != null) { - DataResult dataresult = p_261627_.codec().parse(p_261859_, t); -- return p_261892_.apply2stable((p_262028_, p_261796_) -> p_262028_.put(p_261627_, (T)p_261796_), dataresult); -+ return p_261892_.apply2stable((p_262028_, p_261796_) -> p_262028_.put((TelemetryProperty)p_261627_, (T)p_261796_), dataresult); - } else { - return p_261892_; - } + T t = p_261668_.get(p_261627_.id()); + if (t != null) { + DataResult dataresult = p_261627_.codec().parse(p_261859_, t); +- return p_261892_.apply2stable((p_262028_, p_261796_) -> p_262028_.put(p_261627_, (T)p_261796_), dataresult); ++ return p_261892_.apply2stable((p_262028_, p_261796_) -> p_262028_.put((TelemetryProperty)p_261627_, (T)p_261796_), dataresult); + } else { + return p_261892_; + } diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/advancements/critereon/InventoryChangeTrigger.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/advancements/critereon/InventoryChangeTrigger.java.patch index 32b43d00..753b8c19 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/advancements/critereon/InventoryChangeTrigger.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/advancements/critereon/InventoryChangeTrigger.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/advancements/critereon/InventoryChangeTrigger.java +++ b/net/minecraft/advancements/critereon/InventoryChangeTrigger.java @@ -71,7 +71,7 @@ - } + } - public static Criterion hasItems(ItemPredicate.Builder... p_298231_) { -- return hasItems(Stream.of(p_298231_).map(ItemPredicate.Builder::build).toArray(p_297901_ -> new ItemPredicate[p_297901_])); -+ return hasItems(Stream.of(p_298231_).map(ItemPredicate.Builder::build).toArray(p_297901_ -> new ItemPredicate[p_297901_])); - } + public static Criterion hasItems(ItemPredicate.Builder... p_298231_) { +- return hasItems(Stream.of(p_298231_).map(ItemPredicate.Builder::build).toArray(p_297901_ -> new ItemPredicate[p_297901_])); ++ return hasItems(Stream.of(p_298231_).map(ItemPredicate.Builder::build).toArray(p_297901_ -> new ItemPredicate[p_297901_])); + } - public static Criterion hasItems(ItemPredicate... p_43198_) { + public static Criterion hasItems(ItemPredicate... p_43198_) { diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/advancements/critereon/MinMaxBounds.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/advancements/critereon/MinMaxBounds.java.patch index ac630f99..b901003d 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/advancements/critereon/MinMaxBounds.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/advancements/critereon/MinMaxBounds.java.patch @@ -1,20 +1,20 @@ --- a/net/minecraft/advancements/critereon/MinMaxBounds.java +++ b/net/minecraft/advancements/critereon/MinMaxBounds.java -@@ -140,7 +140,7 @@ +@@ -143,7 +143,7 @@ - public static record Doubles(Optional min, Optional max, Optional minSq, Optional maxSq) implements MinMaxBounds { - public static final MinMaxBounds.Doubles ANY = new MinMaxBounds.Doubles(Optional.empty(), Optional.empty()); -- public static final Codec CODEC = MinMaxBounds.createCodec(Codec.DOUBLE, MinMaxBounds.Doubles::new); -+ public static final Codec CODEC = MinMaxBounds.createCodec(Codec.DOUBLE, MinMaxBounds.Doubles::new); + public static record Doubles(Optional min, Optional max, Optional minSq, Optional maxSq) implements MinMaxBounds { + public static final MinMaxBounds.Doubles ANY = new MinMaxBounds.Doubles(Optional.empty(), Optional.empty()); +- public static final Codec CODEC = MinMaxBounds.createCodec(Codec.DOUBLE, MinMaxBounds.Doubles::new); ++ public static final Codec CODEC = MinMaxBounds.createCodec(Codec.DOUBLE, MinMaxBounds.Doubles::new); - private Doubles(Optional p_298243_, Optional p_299159_) { - this(p_298243_, p_299159_, squareOpt(p_298243_), squareOpt(p_299159_)); -@@ -211,7 +211,7 @@ + private Doubles(Optional p_298243_, Optional p_299159_) { + this(p_298243_, p_299159_, squareOpt(p_298243_), squareOpt(p_299159_)); +@@ -214,7 +214,7 @@ - public static record Ints(Optional min, Optional max, Optional minSq, Optional maxSq) implements MinMaxBounds { - public static final MinMaxBounds.Ints ANY = new MinMaxBounds.Ints(Optional.empty(), Optional.empty()); -- public static final Codec CODEC = MinMaxBounds.createCodec(Codec.INT, MinMaxBounds.Ints::new); -+ public static final Codec CODEC = MinMaxBounds.createCodec(Codec.INT, MinMaxBounds.Ints::new); + public static record Ints(Optional min, Optional max, Optional minSq, Optional maxSq) implements MinMaxBounds { + public static final MinMaxBounds.Ints ANY = new MinMaxBounds.Ints(Optional.empty(), Optional.empty()); +- public static final Codec CODEC = MinMaxBounds.createCodec(Codec.INT, MinMaxBounds.Ints::new); ++ public static final Codec CODEC = MinMaxBounds.createCodec(Codec.INT, MinMaxBounds.Ints::new); - private Ints(Optional p_298275_, Optional p_298272_) { - this(p_298275_, p_298272_, p_298275_.map(p_297910_ -> p_297910_.longValue() * p_297910_.longValue()), squareOpt(p_298272_)); + private Ints(Optional p_298275_, Optional p_298272_) { + this(p_298275_, p_298272_, p_298275_.map(p_297910_ -> p_297910_.longValue() * p_297910_.longValue()), squareOpt(p_298272_)); diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/commands/Commands.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/commands/Commands.java.patch index ff499bf4..0f4f5eb7 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/commands/Commands.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/commands/Commands.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/commands/Commands.java +++ b/net/minecraft/commands/Commands.java -@@ -370,7 +370,7 @@ - ) { - for(CommandNode commandnode : p_82113_.getChildren()) { - if (commandnode.canUse(p_82115_)) { -- ArgumentBuilder argumentbuilder = commandnode.createBuilder(); -+ ArgumentBuilder argumentbuilder = (ArgumentBuilder)(ArgumentBuilder)commandnode.createBuilder(); - argumentbuilder.requires(p_82126_ -> true); - if (argumentbuilder.getCommand() != null) { - argumentbuilder.executes(p_82102_ -> 0); +@@ -373,7 +373,7 @@ + ) { + for(CommandNode commandnode : p_82113_.getChildren()) { + if (commandnode.canUse(p_82115_)) { +- ArgumentBuilder argumentbuilder = commandnode.createBuilder(); ++ ArgumentBuilder argumentbuilder = (ArgumentBuilder)(ArgumentBuilder)commandnode.createBuilder(); + argumentbuilder.requires(p_82126_ -> true); + if (argumentbuilder.getCommand() != null) { + argumentbuilder.executes(p_82102_ -> 0); diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/commands/arguments/ArgumentSignatures.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/commands/arguments/ArgumentSignatures.java.patch index 5d307b20..9c134434 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/commands/arguments/ArgumentSignatures.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/commands/arguments/ArgumentSignatures.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/commands/arguments/ArgumentSignatures.java +++ b/net/minecraft/commands/arguments/ArgumentSignatures.java @@ -14,7 +14,7 @@ - private static final int MAX_ARGUMENT_NAME_LENGTH = 16; + private static final int MAX_ARGUMENT_NAME_LENGTH = 16; - public ArgumentSignatures(FriendlyByteBuf p_231052_) { -- this(p_231052_.readCollection(FriendlyByteBuf.limitValue(ArrayList::new, 8), ArgumentSignatures.Entry::new)); -+ this(p_231052_.>readCollection(FriendlyByteBuf.limitValue(ArrayList::new, 8), ArgumentSignatures.Entry::new)); - } + public ArgumentSignatures(FriendlyByteBuf p_231052_) { +- this(p_231052_.readCollection(FriendlyByteBuf.limitValue(ArrayList::new, 8), ArgumentSignatures.Entry::new)); ++ this(p_231052_.>readCollection(FriendlyByteBuf.limitValue(ArrayList::new, 8), ArgumentSignatures.Entry::new)); + } - @Nullable + @Nullable diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/commands/arguments/EntityArgument.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/commands/arguments/EntityArgument.java.patch index 0942b697..b131603d 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/commands/arguments/EntityArgument.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/commands/arguments/EntityArgument.java.patch @@ -2,14 +2,14 @@ +++ b/net/minecraft/commands/arguments/EntityArgument.java @@ -116,9 +116,9 @@ - @Override - public CompletableFuture listSuggestions(CommandContext p_91482_, SuggestionsBuilder p_91483_) { -- StringReader stringreader = p_91482_.getSource(); -- if (stringreader instanceof SharedSuggestionProvider sharedsuggestionprovider) { -- stringreader = new StringReader(p_91483_.getInput()); -+ S s = p_91482_.getSource(); -+ if (s instanceof SharedSuggestionProvider sharedsuggestionprovider) { -+ StringReader stringreader = new StringReader(p_91483_.getInput()); - stringreader.setCursor(p_91483_.getStart()); - EntitySelectorParser entityselectorparser = new EntitySelectorParser(stringreader, sharedsuggestionprovider.hasPermission(2)); + @Override + public CompletableFuture listSuggestions(CommandContext p_91482_, SuggestionsBuilder p_91483_) { +- StringReader stringreader = p_91482_.getSource(); +- if (stringreader instanceof SharedSuggestionProvider sharedsuggestionprovider) { +- stringreader = new StringReader(p_91483_.getInput()); ++ S s = p_91482_.getSource(); ++ if (s instanceof SharedSuggestionProvider sharedsuggestionprovider) { ++ StringReader stringreader = new StringReader(p_91483_.getInput()); + stringreader.setCursor(p_91483_.getStart()); + EntitySelectorParser entityselectorparser = new EntitySelectorParser(stringreader, sharedsuggestionprovider.hasPermission(2)); diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/commands/arguments/OperationArgument.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/commands/arguments/OperationArgument.java.patch index f215ba1b..65bddac1 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/commands/arguments/OperationArgument.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/commands/arguments/OperationArgument.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/commands/arguments/OperationArgument.java +++ b/net/minecraft/commands/arguments/OperationArgument.java @@ -56,7 +56,7 @@ - } + } - private static OperationArgument.Operation getOperation(String p_103282_) throws CommandSyntaxException { -- return (OperationArgument.Operation)(p_103282_.equals("><") ? (p_103279_, p_103280_) -> { -+ return (p_103282_.equals("><") ? (p_103279_, p_103280_) -> { - int i = p_103279_.getScore(); - p_103279_.setScore(p_103280_.getScore()); - p_103280_.setScore(i); + private static OperationArgument.Operation getOperation(String p_103282_) throws CommandSyntaxException { +- return (OperationArgument.Operation)(p_103282_.equals("><") ? (p_103279_, p_103280_) -> { ++ return (p_103282_.equals("><") ? (p_103279_, p_103280_) -> { + int i = p_103279_.getScore(); + p_103279_.setScore(p_103280_.getScore()); + p_103280_.setScore(i); diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/commands/arguments/ResourceOrTagArgument.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/commands/arguments/ResourceOrTagArgument.java.patch index 11e434d7..beefd894 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/commands/arguments/ResourceOrTagArgument.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/commands/arguments/ResourceOrTagArgument.java.patch @@ -2,19 +2,19 @@ +++ b/net/minecraft/commands/arguments/ResourceOrTagArgument.java @@ -143,7 +143,7 @@ - @Override - public Optional> cast(ResourceKey> p_250007_) { -- return this.value.key().isFor(p_250007_) ? Optional.of(this) : Optional.empty(); -+ return this.value.key().isFor(p_250007_) ? Optional.of((ResourceOrTagArgument.Result)this) : Optional.empty(); - } + @Override + public Optional> cast(ResourceKey> p_250007_) { +- return this.value.key().isFor(p_250007_) ? Optional.of(this) : Optional.empty(); ++ return this.value.key().isFor(p_250007_) ? Optional.of((ResourceOrTagArgument.Result)this) : Optional.empty(); + } - public boolean test(Holder p_249230_) { + public boolean test(Holder p_249230_) { @@ -172,7 +172,7 @@ - @Override - public Optional> cast(ResourceKey> p_250945_) { -- return this.tag.key().isFor(p_250945_) ? Optional.of(this) : Optional.empty(); -+ return this.tag.key().isFor(p_250945_) ? Optional.of((ResourceOrTagArgument.Result)this) : Optional.empty(); - } + @Override + public Optional> cast(ResourceKey> p_250945_) { +- return this.tag.key().isFor(p_250945_) ? Optional.of(this) : Optional.empty(); ++ return this.tag.key().isFor(p_250945_) ? Optional.of((ResourceOrTagArgument.Result)this) : Optional.empty(); + } - public boolean test(Holder p_252187_) { + public boolean test(Holder p_252187_) { diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/commands/arguments/item/ItemInput.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/commands/arguments/item/ItemInput.java.patch index 664a04ca..dbbe7d8c 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/commands/arguments/item/ItemInput.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/commands/arguments/item/ItemInput.java.patch @@ -1,10 +1,10 @@ --- a/net/minecraft/commands/arguments/item/ItemInput.java +++ b/net/minecraft/commands/arguments/item/ItemInput.java @@ -56,6 +56,6 @@ - } + } - private String getItemName() { -- return this.item.unwrapKey().map(ResourceKey::location).orElseGet(() -> "unknown[" + this.item + "]").toString(); -+ return this.item.unwrapKey().map(ResourceKey::location).orElseGet(() -> "unknown[" + this.item + "]").toString(); - } + private String getItemName() { +- return this.item.unwrapKey().map(ResourceKey::location).orElseGet(() -> "unknown[" + this.item + "]").toString(); ++ return this.item.unwrapKey().map(ResourceKey::location).orElseGet(() -> "unknown[" + this.item + "]").toString(); + } } diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/commands/execution/tasks/BuildContexts.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/commands/execution/tasks/BuildContexts.java.patch index fc029aef..9d2b9f8f 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/commands/execution/tasks/BuildContexts.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/commands/execution/tasks/BuildContexts.java.patch @@ -2,19 +2,19 @@ +++ b/net/minecraft/commands/execution/tasks/BuildContexts.java @@ -60,7 +60,7 @@ - if (redirectmodifier != null) { - p_305977_.incrementCost(); -- custommodifierexecutor = chainmodifiers.isForked(); -+ boolean custommodifierexecutor = chainmodifiers.isForked(); - List list1 = new ArrayList<>(); + if (redirectmodifier != null) { + p_305977_.incrementCost(); +- custommodifierexecutor = chainmodifiers.isForked(); ++ boolean custommodifierexecutor = chainmodifiers.isForked(); + List list1 = new ArrayList<>(); - for(T t : list) { + for(T t : list) { @@ -91,7 +91,7 @@ - if (list.isEmpty()) { - if (chainmodifiers.isReturn()) { -- p_305977_.queueNext(new CommandQueueEntry<>(p_309603_, FallthroughTask.instance())); -+ p_305977_.queueNext(new CommandQueueEntry(p_309603_, FallthroughTask.instance())); - } - } else { - CommandContext commandcontext1 = contextchain.getTopContext(); + if (list.isEmpty()) { + if (chainmodifiers.isReturn()) { +- p_305977_.queueNext(new CommandQueueEntry<>(p_309603_, FallthroughTask.instance())); ++ p_305977_.queueNext(new CommandQueueEntry(p_309603_, FallthroughTask.instance())); + } + } else { + CommandContext commandcontext1 = contextchain.getTopContext(); diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/commands/execution/tasks/FallthroughTask.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/commands/execution/tasks/FallthroughTask.java.patch index c468c02b..ab0ba1f1 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/commands/execution/tasks/FallthroughTask.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/commands/execution/tasks/FallthroughTask.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/commands/execution/tasks/FallthroughTask.java +++ b/net/minecraft/commands/execution/tasks/FallthroughTask.java @@ -9,7 +9,7 @@ - private static final FallthroughTask> INSTANCE = new FallthroughTask<>(); + private static final FallthroughTask> INSTANCE = new FallthroughTask<>(); - public static > EntryAction instance() { -- return INSTANCE; -+ return (EntryAction)INSTANCE; - } + public static > EntryAction instance() { +- return INSTANCE; ++ return (EntryAction)INSTANCE; + } - @Override + @Override diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/commands/synchronization/ArgumentTypeInfos.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/commands/synchronization/ArgumentTypeInfos.java.patch index c6271eb3..162952f2 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/commands/synchronization/ArgumentTypeInfos.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/commands/synchronization/ArgumentTypeInfos.java.patch @@ -1,26 +1,26 @@ --- a/net/minecraft/commands/synchronization/ArgumentTypeInfos.java +++ b/net/minecraft/commands/synchronization/ArgumentTypeInfos.java @@ -114,10 +114,10 @@ - register(p_235385_, "dimension", DimensionArgument.class, SingletonArgumentInfo.contextFree(DimensionArgument::dimension)); - register(p_235385_, "gamemode", GameModeArgument.class, SingletonArgumentInfo.contextFree(GameModeArgument::gameMode)); - register(p_235385_, "time", TimeArgument.class, new TimeArgument.Info()); -- register(p_235385_, "resource_or_tag", fixClassType(ResourceOrTagArgument.class), new ResourceOrTagArgument.Info()); -- register(p_235385_, "resource_or_tag_key", fixClassType(ResourceOrTagKeyArgument.class), new ResourceOrTagKeyArgument.Info()); -- register(p_235385_, "resource", fixClassType(ResourceArgument.class), new ResourceArgument.Info()); -- register(p_235385_, "resource_key", fixClassType(ResourceKeyArgument.class), new ResourceKeyArgument.Info()); -+ register(p_235385_, "resource_or_tag", fixClassType(ResourceOrTagArgument.class), new ResourceOrTagArgument.Info()); -+ register(p_235385_, "resource_or_tag_key", fixClassType(ResourceOrTagKeyArgument.class), new ResourceOrTagKeyArgument.Info()); -+ register(p_235385_, "resource", fixClassType(ResourceArgument.class), new ResourceArgument.Info()); -+ register(p_235385_, "resource_key", fixClassType(ResourceKeyArgument.class), new ResourceKeyArgument.Info()); - register(p_235385_, "template_mirror", TemplateMirrorArgument.class, SingletonArgumentInfo.contextFree(TemplateMirrorArgument::templateMirror)); - register(p_235385_, "template_rotation", TemplateRotationArgument.class, SingletonArgumentInfo.contextFree(TemplateRotationArgument::templateRotation)); - register(p_235385_, "heightmap", HeightmapTypeArgument.class, SingletonArgumentInfo.contextFree(HeightmapTypeArgument::heightmap)); + register(p_235385_, "dimension", DimensionArgument.class, SingletonArgumentInfo.contextFree(DimensionArgument::dimension)); + register(p_235385_, "gamemode", GameModeArgument.class, SingletonArgumentInfo.contextFree(GameModeArgument::gameMode)); + register(p_235385_, "time", TimeArgument.class, new TimeArgument.Info()); +- register(p_235385_, "resource_or_tag", fixClassType(ResourceOrTagArgument.class), new ResourceOrTagArgument.Info()); +- register(p_235385_, "resource_or_tag_key", fixClassType(ResourceOrTagKeyArgument.class), new ResourceOrTagKeyArgument.Info()); +- register(p_235385_, "resource", fixClassType(ResourceArgument.class), new ResourceArgument.Info()); +- register(p_235385_, "resource_key", fixClassType(ResourceKeyArgument.class), new ResourceKeyArgument.Info()); ++ register(p_235385_, "resource_or_tag", fixClassType(ResourceOrTagArgument.class), new ResourceOrTagArgument.Info()); ++ register(p_235385_, "resource_or_tag_key", fixClassType(ResourceOrTagKeyArgument.class), new ResourceOrTagKeyArgument.Info()); ++ register(p_235385_, "resource", fixClassType(ResourceArgument.class), new ResourceArgument.Info()); ++ register(p_235385_, "resource_key", fixClassType(ResourceKeyArgument.class), new ResourceKeyArgument.Info()); + register(p_235385_, "template_mirror", TemplateMirrorArgument.class, SingletonArgumentInfo.contextFree(TemplateMirrorArgument::templateMirror)); + register(p_235385_, "template_rotation", TemplateRotationArgument.class, SingletonArgumentInfo.contextFree(TemplateRotationArgument::templateRotation)); + register(p_235385_, "heightmap", HeightmapTypeArgument.class, SingletonArgumentInfo.contextFree(HeightmapTypeArgument::heightmap)); @@ -142,7 +142,7 @@ - if (argumenttypeinfo == null) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Unrecognized argument type %s (%s)", p_235383_, p_235383_.getClass())); - } else { -- return argumenttypeinfo; -+ return (ArgumentTypeInfo)argumenttypeinfo; - } - } + if (argumenttypeinfo == null) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Unrecognized argument type %s (%s)", p_235383_, p_235383_.getClass())); + } else { +- return argumenttypeinfo; ++ return (ArgumentTypeInfo)argumenttypeinfo; + } + } diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/commands/synchronization/SuggestionProviders.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/commands/synchronization/SuggestionProviders.java.patch index f1d6e1b2..d8a0ddba 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/commands/synchronization/SuggestionProviders.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/commands/synchronization/SuggestionProviders.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/commands/synchronization/SuggestionProviders.java +++ b/net/minecraft/commands/synchronization/SuggestionProviders.java -@@ -47,7 +47,7 @@ - throw new IllegalArgumentException("A command suggestion provider is already registered with the name " + p_121659_); - } else { - PROVIDERS_BY_NAME.put(p_121659_, p_121660_); -- return new SuggestionProviders.Wrapper(p_121659_, p_121660_); -+ return (SuggestionProvider)new SuggestionProviders.Wrapper(p_121659_, p_121660_); - } - } +@@ -49,7 +49,7 @@ + throw new IllegalArgumentException("A command suggestion provider is already registered with the name " + p_121659_); + } else { + PROVIDERS_BY_NAME.put(p_121659_, p_121660_); +- return new SuggestionProviders.Wrapper(p_121659_, p_121660_); ++ return (SuggestionProvider)new SuggestionProviders.Wrapper(p_121659_, p_121660_); + } + } diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/core/HolderLookup.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/core/HolderLookup.java.patch index 84616959..9f6c7342 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/core/HolderLookup.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/core/HolderLookup.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/core/HolderLookup.java +++ b/net/minecraft/core/HolderLookup.java -@@ -86,7 +86,7 @@ - static HolderLookup.Provider create(Stream> p_256054_) { - final Map>, HolderLookup.RegistryLookup> map = p_256054_.collect( - Collectors.toUnmodifiableMap( -- HolderLookup.RegistryLookup::key, (Function)(p_256335_ -> p_256335_) -+ HolderLookup.RegistryLookup::key, (p_256335_ -> p_256335_) - ) - ); - return new HolderLookup.Provider() { +@@ -87,7 +87,7 @@ + final Map>, HolderLookup.RegistryLookup> map = p_256054_.collect( + Collectors.toUnmodifiableMap( + HolderLookup.RegistryLookup::key, +- (Function)(p_256335_ -> p_256335_) ++ (p_256335_ -> p_256335_) + ) + ); + return new HolderLookup.Provider() { diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/core/Registry.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/core/Registry.java.patch index da5a4642..9c196284 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/core/Registry.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/core/Registry.java.patch @@ -1,29 +1,29 @@ --- a/net/minecraft/core/Registry.java +++ b/net/minecraft/core/Registry.java @@ -150,7 +150,7 @@ - Optional> getTag(TagKey p_206052_); + Optional> getTag(TagKey p_206052_); - default Iterable> getTagOrEmpty(TagKey p_206059_) { -- return DataFixUtils.orElse(this.getTag(p_206059_), List.of()); -+ return DataFixUtils.orElse(this.getTag(p_206059_), List.of()); - } + default Iterable> getTagOrEmpty(TagKey p_206059_) { +- return DataFixUtils.orElse(this.getTag(p_206059_), List.of()); ++ return DataFixUtils.orElse(this.getTag(p_206059_), List.of()); + } - HolderSet.Named getOrCreateTag(TagKey p_206045_); + HolderSet.Named getOrCreateTag(TagKey p_206045_); @@ -171,7 +171,7 @@ - @Nullable - public Holder byId(int p_259972_) { -- return (Holder)Registry.this.getHolder(p_259972_).orElse((T)null); -+ return (Holder)Registry.this.getHolder(p_259972_).orElse(null); - } + @Nullable + public Holder byId(int p_259972_) { +- return (Holder)Registry.this.getHolder(p_259972_).orElse((T)null); ++ return (Holder)Registry.this.getHolder(p_259972_).orElse(null); + } - @Override + @Override @@ -181,7 +181,7 @@ - @Override - public Iterator> iterator() { -- return Registry.this.holders().map(p_260061_ -> p_260061_).iterator(); -+ return Registry.this.holders().map(p_260061_ -> (Holder)p_260061_).iterator(); - } - }; - } + @Override + public Iterator> iterator() { +- return Registry.this.holders().map(p_260061_ -> p_260061_).iterator(); ++ return Registry.this.holders().map(p_260061_ -> (Holder)p_260061_).iterator(); + } + }; + } diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/core/RegistryAccess.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/core/RegistryAccess.java.patch index 3666fe89..5a84a514 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/core/RegistryAccess.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/core/RegistryAccess.java.patch @@ -1,40 +1,40 @@ --- a/net/minecraft/core/RegistryAccess.java +++ b/net/minecraft/core/RegistryAccess.java @@ -34,8 +34,8 @@ - return new RegistryAccess.Frozen() { - @Override - public Optional> registry(ResourceKey> p_206220_) { -- Registry> registry = p_206166_; -- return registry.getOptional(p_206220_); -+ Registry> registry = (Registry>)p_206166_; -+ return registry.getOptional((ResourceKey>)p_206220_); - } + return new RegistryAccess.Frozen() { + @Override + public Optional> registry(ResourceKey> p_206220_) { +- Registry> registry = p_206166_; +- return registry.getOptional(p_206220_); ++ Registry> registry = (Registry>)p_206166_; ++ return registry.getOptional((ResourceKey>)p_206220_); + } - @Override + @Override @@ -72,7 +72,7 @@ - public ImmutableRegistryAccess(List> p_248540_) { - this.registries = p_248540_.stream() -- .collect(Collectors.toUnmodifiableMap(Registry::key, (Function)(p_206232_ -> p_206232_))); -+ .collect(Collectors.toUnmodifiableMap(Registry::key, (p_206232_ -> p_206232_))); - } + public ImmutableRegistryAccess(List> p_248540_) { + this.registries = p_248540_.stream() +- .collect(Collectors.toUnmodifiableMap(Registry::key, (Function)(p_206232_ -> p_206232_))); ++ .collect(Collectors.toUnmodifiableMap(Registry::key, (p_206232_ -> p_206232_))); + } - public ImmutableRegistryAccess(Map>, ? extends Registry> p_206225_) { + public ImmutableRegistryAccess(Map>, ? extends Registry> p_206225_) { @@ -85,7 +85,7 @@ - @Override - public Optional> registry(ResourceKey> p_206229_) { -- return Optional.ofNullable(this.registries.get(p_206229_)).map((Function, ? extends Registry>)(p_247993_ -> p_247993_)); -+ return Optional.ofNullable(this.registries.get(p_206229_)).map((Function, ? extends Registry>)(p_247993_ -> (Registry)p_247993_)); - } + @Override + public Optional> registry(ResourceKey> p_206229_) { +- return Optional.ofNullable(this.registries.get(p_206229_)).map((Function, ? extends Registry>)(p_247993_ -> p_247993_)); ++ return Optional.ofNullable(this.registries.get(p_206229_)).map((Function, ? extends Registry>)(p_247993_ -> (Registry)p_247993_)); + } - @Override + @Override @@ -102,7 +102,7 @@ - } + } - private static RegistryAccess.RegistryEntry fromUntyped(ResourceKey> p_206244_, Registry p_206245_) { -- return new RegistryAccess.RegistryEntry<>(p_206244_, p_206245_); -+ return new RegistryAccess.RegistryEntry((ResourceKey>)p_206244_, (Registry)p_206245_); - } + private static RegistryAccess.RegistryEntry fromUntyped(ResourceKey> p_206244_, Registry p_206245_) { +- return new RegistryAccess.RegistryEntry<>(p_206244_, p_206245_); ++ return new RegistryAccess.RegistryEntry((ResourceKey>)p_206244_, (Registry)p_206245_); + } - private RegistryAccess.RegistryEntry freeze() { + private RegistryAccess.RegistryEntry freeze() { diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/core/RegistrySetBuilder.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/core/RegistrySetBuilder.java.patch index c0b72f26..0fccf331 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/core/RegistrySetBuilder.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/core/RegistrySetBuilder.java.patch @@ -1,22 +1,22 @@ --- a/net/minecraft/core/RegistrySetBuilder.java +++ b/net/minecraft/core/RegistrySetBuilder.java -@@ -269,8 +269,8 @@ - ResourceKey resourcekey = entry.getKey(); - if (resourcekey.isFor(this.key)) { - RegistrySetBuilder.RegisteredValue registeredvalue = (RegistrySetBuilder.RegisteredValue)entry.getValue(); -- Holder.Reference reference = p_256416_.lookup.holders.remove(resourcekey); -- map.put(resourcekey, new RegistrySetBuilder.ValueAndHolder<>(registeredvalue, Optional.ofNullable(reference))); -+ Holder.Reference reference = (Holder.Reference)p_256416_.lookup.holders.remove(resourcekey); -+ map.put((ResourceKey)resourcekey, new RegistrySetBuilder.ValueAndHolder<>(registeredvalue, Optional.ofNullable(reference))); - iterator.remove(); +@@ -271,8 +271,8 @@ + ResourceKey resourcekey = entry.getKey(); + if (resourcekey.isFor(this.key)) { + RegistrySetBuilder.RegisteredValue registeredvalue = (RegistrySetBuilder.RegisteredValue)entry.getValue(); +- Holder.Reference reference = p_256416_.lookup.holders.remove(resourcekey); +- map.put(resourcekey, new RegistrySetBuilder.ValueAndHolder<>(registeredvalue, Optional.ofNullable(reference))); ++ Holder.Reference reference = (Holder.Reference)p_256416_.lookup.holders.remove(resourcekey); ++ map.put((ResourceKey)resourcekey, new RegistrySetBuilder.ValueAndHolder<>(registeredvalue, Optional.ofNullable(reference))); + iterator.remove(); + } } - } -@@ -292,7 +292,7 @@ - } +@@ -294,7 +294,7 @@ + } - Holder.Reference getOrCreate(ResourceKey p_256298_) { -- return this.holders.computeIfAbsent(p_256298_, p_256154_ -> Holder.Reference.createStandAlone(this.owner, p_256154_)); -+ return (Holder.Reference)this.holders.computeIfAbsent((ResourceKey)p_256298_, p_256154_ -> Holder.Reference.createStandAlone(this.owner, p_256154_)); - } - } + Holder.Reference getOrCreate(ResourceKey p_256298_) { +- return this.holders.computeIfAbsent(p_256298_, p_256154_ -> Holder.Reference.createStandAlone(this.owner, p_256154_)); ++ return (Holder.Reference)this.holders.computeIfAbsent((ResourceKey)p_256298_, p_256154_ -> Holder.Reference.createStandAlone(this.owner, p_256154_)); + } + } diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/core/RegistrySynchronization.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/core/RegistrySynchronization.java.patch index 9e64eb5d..2800504b 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/core/RegistrySynchronization.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/core/RegistrySynchronization.java.patch @@ -2,19 +2,19 @@ +++ b/net/minecraft/core/RegistrySynchronization.java @@ -48,7 +48,7 @@ - private static DataResult> getNetworkCodec(ResourceKey> p_252190_) { - return (DataResult>)Optional.ofNullable(NETWORKABLE_REGISTRIES.get(p_252190_)) -- .map(p_250582_ -> p_250582_.networkCodec()) -+ .map(p_250582_ -> (Codec)p_250582_.networkCodec()) - .map(DataResult::success) - .orElseGet(() -> DataResult.error(() -> "Unknown or not serializable registry: " + p_252190_)); - } -@@ -67,7 +67,7 @@ - private static >, V extends Registry> Codec captureMap(UnboundedMapCodec p_249934_) { - return p_249934_.xmap( - RegistryAccess.ImmutableRegistryAccess::new, -- p_251578_ -> ownedNetworkableRegistries(p_251578_).collect(ImmutableMap.toImmutableMap(p_250395_ -> p_250395_.key(), p_248951_ -> p_248951_.value())) -+ p_251578_ -> ownedNetworkableRegistries(p_251578_).collect(ImmutableMap.toImmutableMap(p_250395_ -> (K)p_250395_.key(), p_248951_ -> (V)p_248951_.value())) - ); - } + private static DataResult> getNetworkCodec(ResourceKey> p_252190_) { + return (DataResult>)Optional.ofNullable(NETWORKABLE_REGISTRIES.get(p_252190_)) +- .map(p_250582_ -> p_250582_.networkCodec()) ++ .map(p_250582_ -> (Codec)p_250582_.networkCodec()) + .map(DataResult::success) + .orElseGet(() -> DataResult.error(() -> "Unknown or not serializable registry: " + p_252190_)); + } +@@ -68,7 +68,7 @@ + return p_249934_.xmap( + RegistryAccess.ImmutableRegistryAccess::new, + p_251578_ -> ownedNetworkableRegistries(p_251578_) +- .collect(ImmutableMap.toImmutableMap(p_250395_ -> p_250395_.key(), p_248951_ -> p_248951_.value())) ++ .collect(ImmutableMap.toImmutableMap(p_250395_ -> (K)p_250395_.key(), p_248951_ -> (V)p_248951_.value())) + ); + } diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/core/registries/BuiltInRegistries.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/core/registries/BuiltInRegistries.java.patch index 6820c033..ba1f4741 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/core/registries/BuiltInRegistries.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/core/registries/BuiltInRegistries.java.patch @@ -1,57 +1,57 @@ --- a/net/minecraft/core/registries/BuiltInRegistries.java +++ b/net/minecraft/core/registries/BuiltInRegistries.java @@ -153,7 +153,7 @@ - public static final Registry> POSITION_SOURCE_TYPE = registerSimple( - Registries.POSITION_SOURCE_TYPE, p_259113_ -> PositionSourceType.BLOCK - ); -- public static final Registry> COMMAND_ARGUMENT_TYPE = registerSimple(Registries.COMMAND_ARGUMENT_TYPE, ArgumentTypeInfos::bootstrap); -+ public static final Registry> COMMAND_ARGUMENT_TYPE = registerSimple(Registries.COMMAND_ARGUMENT_TYPE, (RegistryBootstrap)ArgumentTypeInfos::bootstrap); - public static final Registry> STAT_TYPE = registerSimple(Registries.STAT_TYPE, p_259967_ -> Stats.ITEM_USED); - public static final DefaultedRegistry VILLAGER_TYPE = registerDefaulted(Registries.VILLAGER_TYPE, "plains", p_259473_ -> VillagerType.PLAINS); - public static final DefaultedRegistry VILLAGER_PROFESSION = registerDefaulted( + public static final Registry> POSITION_SOURCE_TYPE = registerSimple( + Registries.POSITION_SOURCE_TYPE, p_259113_ -> PositionSourceType.BLOCK + ); +- public static final Registry> COMMAND_ARGUMENT_TYPE = registerSimple(Registries.COMMAND_ARGUMENT_TYPE, ArgumentTypeInfos::bootstrap); ++ public static final Registry> COMMAND_ARGUMENT_TYPE = registerSimple(Registries.COMMAND_ARGUMENT_TYPE, (RegistryBootstrap)ArgumentTypeInfos::bootstrap); + public static final Registry> STAT_TYPE = registerSimple(Registries.STAT_TYPE, p_259967_ -> Stats.ITEM_USED); + public static final DefaultedRegistry VILLAGER_TYPE = registerDefaulted(Registries.VILLAGER_TYPE, "plains", p_259473_ -> VillagerType.PLAINS); + public static final DefaultedRegistry VILLAGER_PROFESSION = registerDefaulted( @@ -223,21 +223,21 @@ - Registries.FEATURE_SIZE_TYPE, p_259370_ -> FeatureSizeType.TWO_LAYERS_FEATURE_SIZE - ); - public static final Registry> BIOME_SOURCE = registerSimple( -- Registries.BIOME_SOURCE, Lifecycle.stable(), BiomeSources::bootstrap -+ Registries.BIOME_SOURCE, Lifecycle.stable(), (RegistryBootstrap)BiomeSources::bootstrap - ); - public static final Registry> CHUNK_GENERATOR = registerSimple( -- Registries.CHUNK_GENERATOR, Lifecycle.stable(), ChunkGenerators::bootstrap -+ Registries.CHUNK_GENERATOR, Lifecycle.stable(), (RegistryBootstrap)ChunkGenerators::bootstrap - ); - public static final Registry> MATERIAL_CONDITION = registerSimple( -- Registries.MATERIAL_CONDITION, SurfaceRules.ConditionSource::bootstrap -+ Registries.MATERIAL_CONDITION, (RegistryBootstrap)SurfaceRules.ConditionSource::bootstrap - ); - public static final Registry> MATERIAL_RULE = registerSimple( -- Registries.MATERIAL_RULE, SurfaceRules.RuleSource::bootstrap -+ Registries.MATERIAL_RULE, (RegistryBootstrap)SurfaceRules.RuleSource::bootstrap - ); - public static final Registry> DENSITY_FUNCTION_TYPE = registerSimple( -- Registries.DENSITY_FUNCTION_TYPE, DensityFunctions::bootstrap -+ Registries.DENSITY_FUNCTION_TYPE, (RegistryBootstrap)DensityFunctions::bootstrap - ); -- public static final Registry> BLOCK_TYPE = registerSimple(Registries.BLOCK_TYPE, BlockTypes::bootstrap); -+ public static final Registry> BLOCK_TYPE = registerSimple(Registries.BLOCK_TYPE, (RegistryBootstrap)BlockTypes::bootstrap); - public static final Registry> STRUCTURE_PROCESSOR = registerSimple( - Registries.STRUCTURE_PROCESSOR, p_259305_ -> StructureProcessorType.BLOCK_IGNORE - ); + Registries.FEATURE_SIZE_TYPE, p_259370_ -> FeatureSizeType.TWO_LAYERS_FEATURE_SIZE + ); + public static final Registry> BIOME_SOURCE = registerSimple( +- Registries.BIOME_SOURCE, Lifecycle.stable(), BiomeSources::bootstrap ++ Registries.BIOME_SOURCE, Lifecycle.stable(), (RegistryBootstrap)BiomeSources::bootstrap + ); + public static final Registry> CHUNK_GENERATOR = registerSimple( +- Registries.CHUNK_GENERATOR, Lifecycle.stable(), ChunkGenerators::bootstrap ++ Registries.CHUNK_GENERATOR, Lifecycle.stable(), (RegistryBootstrap)ChunkGenerators::bootstrap + ); + public static final Registry> MATERIAL_CONDITION = registerSimple( +- Registries.MATERIAL_CONDITION, SurfaceRules.ConditionSource::bootstrap ++ Registries.MATERIAL_CONDITION, (RegistryBootstrap)SurfaceRules.ConditionSource::bootstrap + ); + public static final Registry> MATERIAL_RULE = registerSimple( +- Registries.MATERIAL_RULE, SurfaceRules.RuleSource::bootstrap ++ Registries.MATERIAL_RULE, (RegistryBootstrap)SurfaceRules.RuleSource::bootstrap + ); + public static final Registry> DENSITY_FUNCTION_TYPE = registerSimple( +- Registries.DENSITY_FUNCTION_TYPE, DensityFunctions::bootstrap ++ Registries.DENSITY_FUNCTION_TYPE, (RegistryBootstrap)DensityFunctions::bootstrap + ); +- public static final Registry> BLOCK_TYPE = registerSimple(Registries.BLOCK_TYPE, BlockTypes::bootstrap); ++ public static final Registry> BLOCK_TYPE = registerSimple(Registries.BLOCK_TYPE, (RegistryBootstrap)BlockTypes::bootstrap); + public static final Registry> STRUCTURE_PROCESSOR = registerSimple( + Registries.STRUCTURE_PROCESSOR, p_259305_ -> StructureProcessorType.BLOCK_IGNORE + ); @@ -245,7 +245,7 @@ - Registries.STRUCTURE_POOL_ELEMENT, p_259361_ -> StructurePoolElementType.EMPTY - ); - public static final Registry> POOL_ALIAS_BINDING_TYPE = registerSimple( -- Registries.POOL_ALIAS_BINDING, PoolAliasBindings::bootstrap -+ Registries.POOL_ALIAS_BINDING, (RegistryBootstrap)PoolAliasBindings::bootstrap - ); - public static final Registry CAT_VARIANT = registerSimple(Registries.CAT_VARIANT, CatVariant::bootstrap); - public static final Registry FROG_VARIANT = registerSimple(Registries.FROG_VARIANT, p_259261_ -> FrogVariant.TEMPERATE); + Registries.STRUCTURE_POOL_ELEMENT, p_259361_ -> StructurePoolElementType.EMPTY + ); + public static final Registry> POOL_ALIAS_BINDING_TYPE = registerSimple( +- Registries.POOL_ALIAS_BINDING, PoolAliasBindings::bootstrap ++ Registries.POOL_ALIAS_BINDING, (RegistryBootstrap)PoolAliasBindings::bootstrap + ); + public static final Registry CAT_VARIANT = registerSimple(Registries.CAT_VARIANT, CatVariant::bootstrap); + public static final Registry FROG_VARIANT = registerSimple(Registries.FROG_VARIANT, p_259261_ -> FrogVariant.TEMPERATE); @@ -300,7 +300,7 @@ - ) { - ResourceLocation resourcelocation = p_259230_.location(); - LOADERS.put(resourcelocation, () -> p_259210_.run(p_260327_)); -- WRITABLE_REGISTRY.register(p_259230_, p_260327_, p_259258_); -+ WRITABLE_REGISTRY.register((ResourceKey)p_259230_, p_260327_, p_259258_); - return p_260327_; - } + ) { + ResourceLocation resourcelocation = p_259230_.location(); + LOADERS.put(resourcelocation, () -> p_259210_.run(p_260327_)); +- WRITABLE_REGISTRY.register(p_259230_, p_260327_, p_259258_); ++ WRITABLE_REGISTRY.register((ResourceKey)p_259230_, p_260327_, p_259258_); + return p_260327_; + } diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/data/info/RegistryDumpReport.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/data/info/RegistryDumpReport.java.patch index 9f3a6485..fc4fcac4 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/data/info/RegistryDumpReport.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/data/info/RegistryDumpReport.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/data/info/RegistryDumpReport.java +++ b/net/minecraft/data/info/RegistryDumpReport.java @@ -35,7 +35,7 @@ - jsonobject.addProperty("default", resourcelocation.toString()); - } + jsonobject.addProperty("default", resourcelocation.toString()); + } -- int i = BuiltInRegistries.REGISTRY.getId(p_124059_); -+ int i = ((Registry>)BuiltInRegistries.REGISTRY).getId(p_124059_); - jsonobject.addProperty("protocol_id", i); - JsonObject jsonobject1 = new JsonObject(); - p_124059_.holders().forEach(p_211092_ -> { +- int i = BuiltInRegistries.REGISTRY.getId(p_124059_); ++ int i = ((Registry>)BuiltInRegistries.REGISTRY).getId(p_124059_); + jsonobject.addProperty("protocol_id", i); + JsonObject jsonobject1 = new JsonObject(); + p_124059_.holders().forEach(p_211092_ -> { diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/data/loot/BlockLootSubProvider.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/data/loot/BlockLootSubProvider.java.patch index 321b3314..d6b675e8 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/data/loot/BlockLootSubProvider.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/data/loot/BlockLootSubProvider.java.patch @@ -1,29 +1,29 @@ --- a/net/minecraft/data/loot/BlockLootSubProvider.java +++ b/net/minecraft/data/loot/BlockLootSubProvider.java -@@ -357,7 +357,7 @@ - p_252139_, - this.applyExplosionDecay( +@@ -360,7 +360,7 @@ p_252139_, -- ((LootPoolSingletonContainer.Builder)LootItem.lootTableItem(Items.WHEAT_SEEDS).when(LootItemRandomChanceCondition.randomChance(0.125F))) -+ LootItem.lootTableItem(Items.WHEAT_SEEDS).when(LootItemRandomChanceCondition.randomChance(0.125F)) - .apply(ApplyBonusCount.addUniformBonusCount(Enchantments.BLOCK_FORTUNE, 2)) - ) - ); -@@ -408,7 +408,7 @@ - .add( - this.applyExplosionDecay( - p_249088_, -- ((LootPoolSingletonContainer.Builder)((LootPoolSingletonContainer.Builder)LootItem.lootTableItem(p_249088_).when(p_251535_)) -+ LootItem.lootTableItem(p_249088_).when(p_251535_) - .apply( - Direction.values(), - p_251536_ -> SetItemCountFunction.setCount(ConstantValue.exactly(1.0F), true) -@@ -418,7 +418,7 @@ - StatePropertiesPredicate.Builder.properties().hasProperty(MultifaceBlock.getFaceProperty(p_251536_), true) - ) - ) -- )) -+ ) - .apply(SetItemCountFunction.setCount(ConstantValue.exactly(-1.0F), true)) - ) - ) + this.applyExplosionDecay( + p_252139_, +- ((LootPoolSingletonContainer.Builder)LootItem.lootTableItem(Items.WHEAT_SEEDS).when(LootItemRandomChanceCondition.randomChance(0.125F))) ++ LootItem.lootTableItem(Items.WHEAT_SEEDS).when(LootItemRandomChanceCondition.randomChance(0.125F)) + .apply(ApplyBonusCount.addUniformBonusCount(Enchantments.BLOCK_FORTUNE, 2)) + ) + ); +@@ -414,7 +414,7 @@ + .add( + this.applyExplosionDecay( + p_249088_, +- ((LootPoolSingletonContainer.Builder)((LootPoolSingletonContainer.Builder)LootItem.lootTableItem(p_249088_).when(p_251535_)) ++ LootItem.lootTableItem(p_249088_).when(p_251535_) + .apply( + Direction.values(), + p_251536_ -> SetItemCountFunction.setCount(ConstantValue.exactly(1.0F), true) +@@ -425,7 +425,7 @@ + .hasProperty(MultifaceBlock.getFaceProperty(p_251536_), true) + ) + ) +- )) ++ ) + .apply(SetItemCountFunction.setCount(ConstantValue.exactly(-1.0F), true)) + ) + ) diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/data/recipes/RecipeProvider.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/data/recipes/RecipeProvider.java.patch index e9e9468f..bf00fefb 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/data/recipes/RecipeProvider.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/data/recipes/RecipeProvider.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/data/recipes/RecipeProvider.java +++ b/net/minecraft/data/recipes/RecipeProvider.java -@@ -639,7 +639,7 @@ - } +@@ -645,7 +645,7 @@ + } - private static Criterion inventoryTrigger(ItemPredicate.Builder... p_299111_) { -- return inventoryTrigger(Arrays.stream(p_299111_).map(ItemPredicate.Builder::build).toArray(p_297943_ -> new ItemPredicate[p_297943_])); -+ return inventoryTrigger(Arrays.stream(p_299111_).map(ItemPredicate.Builder::build).toArray(p_297943_ -> new ItemPredicate[p_297943_])); - } + private static Criterion inventoryTrigger(ItemPredicate.Builder... p_299111_) { +- return inventoryTrigger(Arrays.stream(p_299111_).map(ItemPredicate.Builder::build).toArray(p_297943_ -> new ItemPredicate[p_297943_])); ++ return inventoryTrigger(Arrays.stream(p_299111_).map(ItemPredicate.Builder::build).toArray(p_297943_ -> new ItemPredicate[p_297943_])); + } - private static Criterion inventoryTrigger(ItemPredicate... p_126012_) { + private static Criterion inventoryTrigger(ItemPredicate... p_126012_) { diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/data/registries/VanillaRegistries.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/data/registries/VanillaRegistries.java.patch index d64c2872..948c435c 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/data/registries/VanillaRegistries.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/data/registries/VanillaRegistries.java.patch @@ -2,12 +2,12 @@ +++ b/net/minecraft/data/registries/VanillaRegistries.java @@ -38,8 +38,8 @@ public class VanillaRegistries { - private static final RegistrySetBuilder BUILDER = new RegistrySetBuilder() - .add(Registries.DIMENSION_TYPE, DimensionTypes::bootstrap) -- .add(Registries.CONFIGURED_CARVER, Carvers::bootstrap) -- .add(Registries.CONFIGURED_FEATURE, FeatureUtils::bootstrap) -+ .add(Registries.CONFIGURED_CARVER, (RegistrySetBuilder.RegistryBootstrap)Carvers::bootstrap) -+ .add(Registries.CONFIGURED_FEATURE, (RegistrySetBuilder.RegistryBootstrap)FeatureUtils::bootstrap) - .add(Registries.PLACED_FEATURE, PlacementUtils::bootstrap) - .add(Registries.STRUCTURE, Structures::bootstrap) - .add(Registries.STRUCTURE_SET, StructureSets::bootstrap) + private static final RegistrySetBuilder BUILDER = new RegistrySetBuilder() + .add(Registries.DIMENSION_TYPE, DimensionTypes::bootstrap) +- .add(Registries.CONFIGURED_CARVER, Carvers::bootstrap) +- .add(Registries.CONFIGURED_FEATURE, FeatureUtils::bootstrap) ++ .add(Registries.CONFIGURED_CARVER, (RegistrySetBuilder.RegistryBootstrap)Carvers::bootstrap) ++ .add(Registries.CONFIGURED_FEATURE, (RegistrySetBuilder.RegistryBootstrap)FeatureUtils::bootstrap) + .add(Registries.PLACED_FEATURE, PlacementUtils::bootstrap) + .add(Registries.STRUCTURE, Structures::bootstrap) + .add(Registries.STRUCTURE_SET, StructureSets::bootstrap) diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/data/tags/TagsProvider.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/data/tags/TagsProvider.java.patch index fdc0218e..52ceaf15 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/data/tags/TagsProvider.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/data/tags/TagsProvider.java.patch @@ -2,28 +2,28 @@ +++ b/net/minecraft/data/tags/TagsProvider.java @@ -63,6 +63,8 @@ - @Override - public CompletableFuture run(CachedOutput p_253684_) { -+ record CombinedData(HolderLookup.Provider contents, TagsProvider.TagLookup parent) { -+ } - return this.createContentsProvider() - .thenApply(p_275895_ -> { - this.contentsDone.complete(null); -@@ -106,8 +108,6 @@ - } - ); + @Override + public CompletableFuture run(CachedOutput p_253684_) { ++ record CombinedData(HolderLookup.Provider contents, TagsProvider.TagLookup parent) { ++ } + return this.createContentsProvider() + .thenApply(p_275895_ -> { + this.contentsDone.complete(null); +@@ -108,8 +110,6 @@ + } + ); -- record CombinedData(HolderLookup.Provider contents, TagsProvider.TagLookup parent) { -- } +- record CombinedData(HolderLookup.Provider contents, TagsProvider.TagLookup parent) { +- } - } + } -@@ -176,7 +176,7 @@ - } +@@ -178,7 +178,7 @@ + } - default boolean contains(TagKey p_275413_) { -- return this.apply((T)p_275413_).isPresent(); -+ return this.apply(p_275413_).isPresent(); - } - } + default boolean contains(TagKey p_275413_) { +- return this.apply((T)p_275413_).isPresent(); ++ return this.apply(p_275413_).isPresent(); + } + } } diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/gametest/framework/GameTestRegistry.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/gametest/framework/GameTestRegistry.java.patch index 27440161..90d8a793 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/gametest/framework/GameTestRegistry.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/gametest/framework/GameTestRegistry.java.patch @@ -1,20 +1,20 @@ --- a/net/minecraft/gametest/framework/GameTestRegistry.java +++ b/net/minecraft/gametest/framework/GameTestRegistry.java @@ -54,7 +54,7 @@ - T t = p_177506_.getAnnotation(p_177507_); - if (t != null) { - String s = p_177508_.apply(t); -- Consumer consumer = p_177509_.putIfAbsent(s, turnMethodIntoConsumer(p_177506_)); -+ Consumer consumer = p_177509_.putIfAbsent(s, (Consumer)turnMethodIntoConsumer(p_177506_)); - if (consumer != null) { - throw new RuntimeException("Hey, there should only be one " + p_177507_ + " method per batch. Batch '" + s + "' has more than one!"); - } + T t = p_177506_.getAnnotation(p_177507_); + if (t != null) { + String s = p_177508_.apply(t); +- Consumer consumer = p_177509_.putIfAbsent(s, turnMethodIntoConsumer(p_177506_)); ++ Consumer consumer = p_177509_.putIfAbsent(s, (Consumer)turnMethodIntoConsumer(p_177506_)); + if (consumer != null) { + throw new RuntimeException("Hey, there should only be one " + p_177507_ + " method per batch. Batch '" + s + "' has more than one!"); + } @@ -127,7 +127,7 @@ - gametest.required(), - gametest.requiredSuccesses(), - gametest.attempts(), -- turnMethodIntoConsumer(p_177516_) -+ (Consumer)turnMethodIntoConsumer(p_177516_) - ); - } + gametest.required(), + gametest.requiredSuccesses(), + gametest.attempts(), +- turnMethodIntoConsumer(p_177516_) ++ (Consumer)turnMethodIntoConsumer(p_177516_) + ); + } diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/nbt/CompoundTag.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/nbt/CompoundTag.java.patch index 8098d604..2575253d 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/nbt/CompoundTag.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/nbt/CompoundTag.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/nbt/CompoundTag.java +++ b/net/minecraft/nbt/CompoundTag.java @@ -111,7 +111,7 @@ - } - - if (b0 != 0) { -- while((b0 = p_302325_.readByte()) != false) { -+ while((b0 = p_302325_.readByte()) != 0) { - StringTag.skipString(p_302325_); - TagTypes.getType(b0).skip(p_302325_, p_302355_); } + + if (b0 != 0) { +- while((b0 = p_302325_.readByte()) != false) { ++ while((b0 = p_302325_.readByte()) != 0) { + StringTag.skipString(p_302325_); + TagTypes.getType(b0).skip(p_302325_, p_302355_); + } diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/nbt/NbtOps.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/nbt/NbtOps.java.patch index 6b795e18..eb3e4fe4 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/nbt/NbtOps.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/nbt/NbtOps.java.patch @@ -2,10 +2,10 @@ +++ b/net/minecraft/nbt/NbtOps.java @@ -165,7 +165,7 @@ - public DataResult>> getMapValues(Tag p_129070_) { - return p_129070_ instanceof CompoundTag compoundtag -- ? DataResult.success(compoundtag.getAllKeys().stream().map(p_129021_ -> Pair.of(this.createString(p_129021_), compoundtag.get(p_129021_)))) -+ ? DataResult.success(compoundtag.getAllKeys().stream().map(p_129021_ -> (Pair)Pair.of(this.createString(p_129021_), compoundtag.get(p_129021_)))) - : DataResult.error(() -> "Not a map: " + p_129070_); - } + public DataResult>> getMapValues(Tag p_129070_) { + return p_129070_ instanceof CompoundTag compoundtag +- ? DataResult.success(compoundtag.getAllKeys().stream().map(p_129021_ -> Pair.of(this.createString(p_129021_), compoundtag.get(p_129021_)))) ++ ? DataResult.success(compoundtag.getAllKeys().stream().map(p_129021_ -> (Pair)Pair.of(this.createString(p_129021_), compoundtag.get(p_129021_)))) + : DataResult.error(() -> "Not a map: " + p_129070_); + } diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/nbt/TagParser.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/nbt/TagParser.java.patch index 578bce63..3063348c 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/nbt/TagParser.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/nbt/TagParser.java.patch @@ -1,17 +1,17 @@ --- a/net/minecraft/nbt/TagParser.java +++ b/net/minecraft/nbt/TagParser.java @@ -252,11 +252,11 @@ - } + } - if (p_129363_ == ByteTag.TYPE) { -- list.add((T)((NumericTag)tag).getAsByte()); -+ list.add((T)(Byte)((NumericTag)tag).getAsByte()); - } else if (p_129363_ == LongTag.TYPE) { -- list.add((T)((NumericTag)tag).getAsLong()); -+ list.add((T)(Long)((NumericTag)tag).getAsLong()); - } else { -- list.add((T)((NumericTag)tag).getAsInt()); -+ list.add((T)(Integer)((NumericTag)tag).getAsInt()); - } + if (p_129363_ == ByteTag.TYPE) { +- list.add((T)((NumericTag)tag).getAsByte()); ++ list.add((T)(Byte)((NumericTag)tag).getAsByte()); + } else if (p_129363_ == LongTag.TYPE) { +- list.add((T)((NumericTag)tag).getAsLong()); ++ list.add((T)(Long)((NumericTag)tag).getAsLong()); + } else { +- list.add((T)((NumericTag)tag).getAsInt()); ++ list.add((T)(Integer)((NumericTag)tag).getAsInt()); + } - if (!this.hasElementSeparator()) { + if (!this.hasElementSeparator()) { diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/network/ConnectionProtocol.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/network/ConnectionProtocol.java.patch index 9ca71d2e..bd89cbbc 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/network/ConnectionProtocol.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/network/ConnectionProtocol.java.patch @@ -1,80 +1,80 @@ --- a/net/minecraft/network/ConnectionProtocol.java +++ b/net/minecraft/network/ConnectionProtocol.java @@ -209,14 +209,14 @@ - "handshake", - protocol() - .addFlow(PacketFlow.CLIENTBOUND, new ConnectionProtocol.PacketSet()) -- .addFlow(PacketFlow.SERVERBOUND, new ConnectionProtocol.PacketSet().addPacket(ClientIntentionPacket.class, ClientIntentionPacket::new)) -+ .addFlow(PacketFlow.SERVERBOUND, new ConnectionProtocol.PacketSet().addPacket(ClientIntentionPacket.class, ClientIntentionPacket::new)) - ), - PLAY( - "play", - protocol() - .addFlow( - PacketFlow.CLIENTBOUND, -- new ConnectionProtocol.PacketSet() -+ new ConnectionProtocol.PacketSet() - .withBundlePacket(ClientboundBundlePacket.class, ClientboundBundlePacket::new) - .addPacket(ClientboundAddEntityPacket.class, ClientboundAddEntityPacket::new) - .addPacket(ClientboundAddExperienceOrbPacket.class, ClientboundAddExperienceOrbPacket::new) + "handshake", + protocol() + .addFlow(PacketFlow.CLIENTBOUND, new ConnectionProtocol.PacketSet()) +- .addFlow(PacketFlow.SERVERBOUND, new ConnectionProtocol.PacketSet().addPacket(ClientIntentionPacket.class, ClientIntentionPacket::new)) ++ .addFlow(PacketFlow.SERVERBOUND, new ConnectionProtocol.PacketSet().addPacket(ClientIntentionPacket.class, ClientIntentionPacket::new)) + ), + PLAY( + "play", + protocol() + .addFlow( + PacketFlow.CLIENTBOUND, +- new ConnectionProtocol.PacketSet() ++ new ConnectionProtocol.PacketSet() + .withBundlePacket(ClientboundBundlePacket.class, ClientboundBundlePacket::new) + .addPacket(ClientboundAddEntityPacket.class, ClientboundAddEntityPacket::new) + .addPacket(ClientboundAddExperienceOrbPacket.class, ClientboundAddExperienceOrbPacket::new) @@ -335,7 +335,7 @@ - ) - .addFlow( - PacketFlow.SERVERBOUND, -- new ConnectionProtocol.PacketSet() -+ new ConnectionProtocol.PacketSet() - .addPacket(ServerboundAcceptTeleportationPacket.class, ServerboundAcceptTeleportationPacket::new) - .addPacket(ServerboundBlockEntityTagQuery.class, ServerboundBlockEntityTagQuery::new) - .addPacket(ServerboundChangeDifficultyPacket.class, ServerboundChangeDifficultyPacket::new) + ) + .addFlow( + PacketFlow.SERVERBOUND, +- new ConnectionProtocol.PacketSet() ++ new ConnectionProtocol.PacketSet() + .addPacket(ServerboundAcceptTeleportationPacket.class, ServerboundAcceptTeleportationPacket::new) + .addPacket(ServerboundBlockEntityTagQuery.class, ServerboundBlockEntityTagQuery::new) + .addPacket(ServerboundChangeDifficultyPacket.class, ServerboundChangeDifficultyPacket::new) @@ -398,13 +398,13 @@ - protocol() - .addFlow( - PacketFlow.SERVERBOUND, -- new ConnectionProtocol.PacketSet() -+ new ConnectionProtocol.PacketSet() - .addPacket(ServerboundStatusRequestPacket.class, ServerboundStatusRequestPacket::new) - .addPacket(ServerboundPingRequestPacket.class, ServerboundPingRequestPacket::new) - ) - .addFlow( - PacketFlow.CLIENTBOUND, -- new ConnectionProtocol.PacketSet() -+ new ConnectionProtocol.PacketSet() - .addPacket(ClientboundStatusResponsePacket.class, ClientboundStatusResponsePacket::new) - .addPacket(ClientboundPongResponsePacket.class, ClientboundPongResponsePacket::new) - ) + protocol() + .addFlow( + PacketFlow.SERVERBOUND, +- new ConnectionProtocol.PacketSet() ++ new ConnectionProtocol.PacketSet() + .addPacket(ServerboundStatusRequestPacket.class, ServerboundStatusRequestPacket::new) + .addPacket(ServerboundPingRequestPacket.class, ServerboundPingRequestPacket::new) + ) + .addFlow( + PacketFlow.CLIENTBOUND, +- new ConnectionProtocol.PacketSet() ++ new ConnectionProtocol.PacketSet() + .addPacket(ClientboundStatusResponsePacket.class, ClientboundStatusResponsePacket::new) + .addPacket(ClientboundPongResponsePacket.class, ClientboundPongResponsePacket::new) + ) @@ -414,7 +414,7 @@ - protocol() - .addFlow( - PacketFlow.CLIENTBOUND, -- new ConnectionProtocol.PacketSet() -+ new ConnectionProtocol.PacketSet() - .addPacket(ClientboundLoginDisconnectPacket.class, ClientboundLoginDisconnectPacket::new) - .addPacket(ClientboundHelloPacket.class, ClientboundHelloPacket::new) - .addPacket(ClientboundGameProfilePacket.class, ClientboundGameProfilePacket::new) + protocol() + .addFlow( + PacketFlow.CLIENTBOUND, +- new ConnectionProtocol.PacketSet() ++ new ConnectionProtocol.PacketSet() + .addPacket(ClientboundLoginDisconnectPacket.class, ClientboundLoginDisconnectPacket::new) + .addPacket(ClientboundHelloPacket.class, ClientboundHelloPacket::new) + .addPacket(ClientboundGameProfilePacket.class, ClientboundGameProfilePacket::new) @@ -423,7 +423,7 @@ - ) - .addFlow( - PacketFlow.SERVERBOUND, -- new ConnectionProtocol.PacketSet() -+ new ConnectionProtocol.PacketSet() - .addPacket(ServerboundHelloPacket.class, ServerboundHelloPacket::new) - .addPacket(ServerboundKeyPacket.class, ServerboundKeyPacket::new) - .addPacket(ServerboundCustomQueryAnswerPacket.class, ServerboundCustomQueryAnswerPacket::read) + ) + .addFlow( + PacketFlow.SERVERBOUND, +- new ConnectionProtocol.PacketSet() ++ new ConnectionProtocol.PacketSet() + .addPacket(ServerboundHelloPacket.class, ServerboundHelloPacket::new) + .addPacket(ServerboundKeyPacket.class, ServerboundKeyPacket::new) + .addPacket(ServerboundCustomQueryAnswerPacket.class, ServerboundCustomQueryAnswerPacket::read) @@ -435,7 +435,7 @@ - protocol() - .addFlow( - PacketFlow.CLIENTBOUND, -- new ConnectionProtocol.PacketSet() -+ new ConnectionProtocol.PacketSet() - .addPacket(ClientboundCustomPayloadPacket.class, ClientboundCustomPayloadPacket::new) - .addPacket(ClientboundDisconnectPacket.class, ClientboundDisconnectPacket::new) - .addPacket(ClientboundFinishConfigurationPacket.class, ClientboundFinishConfigurationPacket::new) + protocol() + .addFlow( + PacketFlow.CLIENTBOUND, +- new ConnectionProtocol.PacketSet() ++ new ConnectionProtocol.PacketSet() + .addPacket(ClientboundCustomPayloadPacket.class, ClientboundCustomPayloadPacket::new) + .addPacket(ClientboundDisconnectPacket.class, ClientboundDisconnectPacket::new) + .addPacket(ClientboundFinishConfigurationPacket.class, ClientboundFinishConfigurationPacket::new) @@ -448,7 +448,7 @@ - ) - .addFlow( - PacketFlow.SERVERBOUND, -- new ConnectionProtocol.PacketSet() -+ new ConnectionProtocol.PacketSet() - .addPacket(ServerboundClientInformationPacket.class, ServerboundClientInformationPacket::new) - .addPacket(ServerboundCustomPayloadPacket.class, ServerboundCustomPayloadPacket::new) - .addPacket(ServerboundFinishConfigurationPacket.class, ServerboundFinishConfigurationPacket::new) + ) + .addFlow( + PacketFlow.SERVERBOUND, +- new ConnectionProtocol.PacketSet() ++ new ConnectionProtocol.PacketSet() + .addPacket(ServerboundClientInformationPacket.class, ServerboundClientInformationPacket::new) + .addPacket(ServerboundCustomPayloadPacket.class, ServerboundCustomPayloadPacket::new) + .addPacket(ServerboundFinishConfigurationPacket.class, ServerboundFinishConfigurationPacket::new) diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/network/FriendlyByteBuf.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/network/FriendlyByteBuf.java.patch index 8c0e2860..b9301ba0 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/network/FriendlyByteBuf.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/network/FriendlyByteBuf.java.patch @@ -1,109 +1,109 @@ --- a/net/minecraft/network/FriendlyByteBuf.java +++ b/net/minecraft/network/FriendlyByteBuf.java @@ -146,7 +146,7 @@ - break; - case DIRECT: - this.writeVarInt(0); -- p_263358_.accept((T)this, p_263384_.value()); -+ p_263358_.accept(this, p_263384_.value()); - } - } + break; + case DIRECT: + this.writeVarInt(0); +- p_263358_.accept((T)this, p_263384_.value()); ++ p_263358_.accept(this, p_263384_.value()); + } + } @@ -159,7 +159,7 @@ - public Holder readById(IdMap> p_263401_, FriendlyByteBuf.Reader p_263374_) { - int i = this.readVarInt(); - if (i == 0) { -- return Holder.direct(p_263374_.apply((T)this)); -+ return Holder.direct(p_263374_.apply(this)); - } else { - Holder holder = p_263401_.byId(i - 1); - if (holder == null) { + public Holder readById(IdMap> p_263401_, FriendlyByteBuf.Reader p_263374_) { + int i = this.readVarInt(); + if (i == 0) { +- return Holder.direct(p_263374_.apply((T)this)); ++ return Holder.direct(p_263374_.apply(this)); + } else { + Holder holder = p_263401_.byId(i - 1); + if (holder == null) { @@ -185,7 +185,7 @@ - C c = p_236839_.apply(i); + C c = p_236839_.apply(i); - for(int j = 0; j < i; ++j) { -- c.add(p_236840_.apply((T)this)); -+ c.add(p_236840_.apply(this)); - } + for(int j = 0; j < i; ++j) { +- c.add(p_236840_.apply((T)this)); ++ c.add(p_236840_.apply(this)); + } - return c; + return c; @@ -195,7 +195,7 @@ - this.writeVarInt(p_236829_.size()); + this.writeVarInt(p_236829_.size()); - for(T t : p_236829_) { -- p_236830_.accept((T)this, t); -+ p_236830_.accept(this, t); - } - } + for(T t : p_236829_) { +- p_236830_.accept((T)this, t); ++ p_236830_.accept(this, t); + } + } @@ -224,8 +224,8 @@ - M m = p_236842_.apply(i); + M m = p_236842_.apply(i); - for(int j = 0; j < i; ++j) { -- K k = p_236843_.apply((K)this); -- V v = p_236844_.apply((V)this); -+ K k = p_236843_.apply(this); -+ V v = p_236844_.apply(this); - m.put(k, v); - } + for(int j = 0; j < i; ++j) { +- K k = p_236843_.apply((K)this); +- V v = p_236844_.apply((V)this); ++ K k = p_236843_.apply(this); ++ V v = p_236844_.apply(this); + m.put(k, v); + } @@ -239,8 +239,8 @@ - public void writeMap(Map p_236832_, FriendlyByteBuf.Writer p_236833_, FriendlyByteBuf.Writer p_236834_) { - this.writeVarInt(p_236832_.size()); - p_236832_.forEach((p_236856_, p_236857_) -> { -- p_236833_.accept((K)this, p_236856_); -- p_236834_.accept((V)this, p_236857_); -+ p_236833_.accept(this, p_236856_); -+ p_236834_.accept(this, p_236857_); - }); - } + public void writeMap(Map p_236832_, FriendlyByteBuf.Writer p_236833_, FriendlyByteBuf.Writer p_236834_) { + this.writeVarInt(p_236832_.size()); + p_236832_.forEach((p_236856_, p_236857_) -> { +- p_236833_.accept((K)this, p_236856_); +- p_236834_.accept((V)this, p_236857_); ++ p_236833_.accept(this, p_236856_); ++ p_236834_.accept(this, p_236857_); + }); + } @@ -280,25 +280,25 @@ - public void writeOptional(Optional p_236836_, FriendlyByteBuf.Writer p_236837_) { - if (p_236836_.isPresent()) { - this.writeBoolean(true); -- p_236837_.accept((T)this, p_236836_.get()); -+ p_236837_.accept(this, p_236836_.get()); - } else { - this.writeBoolean(false); - } - } + public void writeOptional(Optional p_236836_, FriendlyByteBuf.Writer p_236837_) { + if (p_236836_.isPresent()) { + this.writeBoolean(true); +- p_236837_.accept((T)this, p_236836_.get()); ++ p_236837_.accept(this, p_236836_.get()); + } else { + this.writeBoolean(false); + } + } - public Optional readOptional(FriendlyByteBuf.Reader p_236861_) { -- return this.readBoolean() ? Optional.of(p_236861_.apply((T)this)) : Optional.empty(); -+ return this.readBoolean() ? Optional.of(p_236861_.apply(this)) : Optional.empty(); - } + public Optional readOptional(FriendlyByteBuf.Reader p_236861_) { +- return this.readBoolean() ? Optional.of(p_236861_.apply((T)this)) : Optional.empty(); ++ return this.readBoolean() ? Optional.of(p_236861_.apply(this)) : Optional.empty(); + } - @Nullable - public T readNullable(FriendlyByteBuf.Reader p_236869_) { -- return this.readBoolean() ? p_236869_.apply((T)this) : null; -+ return this.readBoolean() ? p_236869_.apply(this) : null; - } + @Nullable + public T readNullable(FriendlyByteBuf.Reader p_236869_) { +- return this.readBoolean() ? p_236869_.apply((T)this) : null; ++ return this.readBoolean() ? p_236869_.apply(this) : null; + } - public void writeNullable(@Nullable T p_236822_, FriendlyByteBuf.Writer p_236823_) { - if (p_236822_ != null) { - this.writeBoolean(true); -- p_236823_.accept((T)this, p_236822_); -+ p_236823_.accept(this, p_236822_); - } else { - this.writeBoolean(false); - } + public void writeNullable(@Nullable T p_236822_, FriendlyByteBuf.Writer p_236823_) { + if (p_236822_ != null) { + this.writeBoolean(true); +- p_236823_.accept((T)this, p_236822_); ++ p_236823_.accept(this, p_236822_); + } else { + this.writeBoolean(false); + } @@ -307,15 +307,15 @@ - public void writeEither(Either p_236811_, FriendlyByteBuf.Writer p_236812_, FriendlyByteBuf.Writer p_236813_) { - p_236811_.ifLeft(p_293716_ -> { - this.writeBoolean(true); -- p_236812_.accept((L)this, p_293716_); -+ p_236812_.accept(this, p_293716_); - }).ifRight(p_293718_ -> { - this.writeBoolean(false); -- p_236813_.accept((R)this, p_293718_); -+ p_236813_.accept(this, p_293718_); - }); - } + public void writeEither(Either p_236811_, FriendlyByteBuf.Writer p_236812_, FriendlyByteBuf.Writer p_236813_) { + p_236811_.ifLeft(p_293716_ -> { + this.writeBoolean(true); +- p_236812_.accept((L)this, p_293716_); ++ p_236812_.accept(this, p_293716_); + }).ifRight(p_293718_ -> { + this.writeBoolean(false); +- p_236813_.accept((R)this, p_293718_); ++ p_236813_.accept(this, p_293718_); + }); + } - public Either readEither(FriendlyByteBuf.Reader p_236863_, FriendlyByteBuf.Reader p_236864_) { -- return this.readBoolean() ? Either.left(p_236863_.apply((L)this)) : Either.right(p_236864_.apply((R)this)); -+ return this.readBoolean() ? Either.left(p_236863_.apply(this)) : Either.right(p_236864_.apply(this)); - } + public Either readEither(FriendlyByteBuf.Reader p_236863_, FriendlyByteBuf.Reader p_236864_) { +- return this.readBoolean() ? Either.left(p_236863_.apply((L)this)) : Either.right(p_236864_.apply((R)this)); ++ return this.readBoolean() ? Either.left(p_236863_.apply(this)) : Either.right(p_236864_.apply(this)); + } - public byte[] readByteArray() { + public byte[] readByteArray() { diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/network/chat/Component.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/network/chat/Component.java.patch index 9131d3e9..d1908198 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/network/chat/Component.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/network/chat/Component.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/network/chat/Component.java +++ b/net/minecraft/network/chat/Component.java @@ -244,7 +244,7 @@ - } + } - static MutableComponent deserialize(JsonElement p_130720_) { -- return Util.getOrThrow(ComponentSerialization.CODEC.parse(JsonOps.INSTANCE, p_130720_), JsonParseException::new); -+ return (MutableComponent)Util.getOrThrow(ComponentSerialization.CODEC.parse(JsonOps.INSTANCE, p_130720_), JsonParseException::new); - } + static MutableComponent deserialize(JsonElement p_130720_) { +- return Util.getOrThrow(ComponentSerialization.CODEC.parse(JsonOps.INSTANCE, p_130720_), JsonParseException::new); ++ return (MutableComponent)Util.getOrThrow(ComponentSerialization.CODEC.parse(JsonOps.INSTANCE, p_130720_), JsonParseException::new); + } - static JsonElement serialize(Component p_304983_) { + static JsonElement serialize(Component p_304983_) { diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/network/chat/ComponentSerialization.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/network/chat/ComponentSerialization.java.patch index de5564ed..0d758a85 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/network/chat/ComponentSerialization.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/network/chat/ComponentSerialization.java.patch @@ -1,20 +1,20 @@ --- a/net/minecraft/network/chat/ComponentSerialization.java +++ b/net/minecraft/network/chat/ComponentSerialization.java @@ -89,7 +89,7 @@ - for(MapDecoder mapdecoder : this.codecs) { - DataResult dataresult = mapdecoder.decode(p_304922_, p_304447_); - if (dataresult.result().isPresent()) { -- return dataresult; -+ return (DataResult)dataresult; + for(MapDecoder mapdecoder : this.codecs) { + DataResult dataresult = mapdecoder.decode(p_304922_, p_304447_); + if (dataresult.result().isPresent()) { +- return dataresult; ++ return (DataResult)dataresult; + } } - } @@ -98,7 +98,7 @@ - @Override - public RecordBuilder encode(T p_304409_, DynamicOps p_304945_, RecordBuilder p_304823_) { -- MapEncoder mapencoder = this.encoderGetter.apply(p_304409_); -+ MapEncoder mapencoder = (MapEncoder)this.encoderGetter.apply(p_304409_); - return mapencoder.encode(p_304409_, p_304945_, p_304823_); - } + @Override + public RecordBuilder encode(T p_304409_, DynamicOps p_304945_, RecordBuilder p_304823_) { +- MapEncoder mapencoder = this.encoderGetter.apply(p_304409_); ++ MapEncoder mapencoder = (MapEncoder)this.encoderGetter.apply(p_304409_); + return mapencoder.encode(p_304409_, p_304945_, p_304823_); + } diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/network/chat/LastSeenMessages.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/network/chat/LastSeenMessages.java.patch index 1e8042ab..07c0f7bd 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/network/chat/LastSeenMessages.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/network/chat/LastSeenMessages.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/network/chat/LastSeenMessages.java +++ b/net/minecraft/network/chat/LastSeenMessages.java @@ -31,7 +31,7 @@ - public static final LastSeenMessages.Packed EMPTY = new LastSeenMessages.Packed(List.of()); + public static final LastSeenMessages.Packed EMPTY = new LastSeenMessages.Packed(List.of()); - public Packed(FriendlyByteBuf p_249757_) { -- this(p_249757_.readCollection(FriendlyByteBuf.limitValue(ArrayList::new, 20), MessageSignature.Packed::read)); -+ this(p_249757_.readCollection(FriendlyByteBuf.>limitValue(ArrayList::new, 20), MessageSignature.Packed::read)); - } + public Packed(FriendlyByteBuf p_249757_) { +- this(p_249757_.readCollection(FriendlyByteBuf.limitValue(ArrayList::new, 20), MessageSignature.Packed::read)); ++ this(p_249757_.readCollection(FriendlyByteBuf.>limitValue(ArrayList::new, 20), MessageSignature.Packed::read)); + } - public void write(FriendlyByteBuf p_250725_) { + public void write(FriendlyByteBuf p_250725_) { diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/network/protocol/BundlerInfo.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/network/protocol/BundlerInfo.java.patch index f95264b8..c2bbb1ed 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/network/protocol/BundlerInfo.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/network/protocol/BundlerInfo.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/network/protocol/BundlerInfo.java +++ b/net/minecraft/network/protocol/BundlerInfo.java @@ -52,7 +52,7 @@ - } else if (this.bundlePackets.size() >= 4096) { - throw new IllegalStateException("Too many packets in a bundle"); - } else { -- this.bundlePackets.add(p_265205_); -+ this.bundlePackets.add((Packet)p_265205_); - return null; - } - } + } else if (this.bundlePackets.size() >= 4096) { + throw new IllegalStateException("Too many packets in a bundle"); + } else { +- this.bundlePackets.add(p_265205_); ++ this.bundlePackets.add((Packet)p_265205_); + return null; + } + } diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/network/protocol/configuration/ClientboundUpdateEnabledFeaturesPacket.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/network/protocol/configuration/ClientboundUpdateEnabledFeaturesPacket.java.patch index 6af6fa06..8e540153 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/network/protocol/configuration/ClientboundUpdateEnabledFeaturesPacket.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/network/protocol/configuration/ClientboundUpdateEnabledFeaturesPacket.java.patch @@ -3,9 +3,9 @@ @@ -8,7 +8,7 @@ public record ClientboundUpdateEnabledFeaturesPacket(Set features) implements Packet { - public ClientboundUpdateEnabledFeaturesPacket(FriendlyByteBuf p_295459_) { -- this(p_295459_.readCollection(HashSet::new, FriendlyByteBuf::readResourceLocation)); -+ this(p_295459_.>readCollection(HashSet::new, FriendlyByteBuf::readResourceLocation)); - } + public ClientboundUpdateEnabledFeaturesPacket(FriendlyByteBuf p_295459_) { +- this(p_295459_.readCollection(HashSet::new, FriendlyByteBuf::readResourceLocation)); ++ this(p_295459_.>readCollection(HashSet::new, FriendlyByteBuf::readResourceLocation)); + } - @Override + @Override diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/network/protocol/game/ClientboundUpdateRecipesPacket.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/network/protocol/game/ClientboundUpdateRecipesPacket.java.patch index e5979953..9fbbbbfd 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/network/protocol/game/ClientboundUpdateRecipesPacket.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/network/protocol/game/ClientboundUpdateRecipesPacket.java.patch @@ -1,10 +1,10 @@ --- a/net/minecraft/network/protocol/game/ClientboundUpdateRecipesPacket.java +++ b/net/minecraft/network/protocol/game/ClientboundUpdateRecipesPacket.java @@ -47,6 +47,6 @@ - public static > void toNetwork(FriendlyByteBuf p_179470_, RecipeHolder p_301050_) { - p_179470_.writeResourceLocation(BuiltInRegistries.RECIPE_SERIALIZER.getKey(p_301050_.value().getSerializer())); - p_179470_.writeResourceLocation(p_301050_.id()); -- p_301050_.value().getSerializer().toNetwork(p_179470_, (T)p_301050_.value()); -+ ((net.minecraft.world.item.crafting.RecipeSerializer)p_301050_.value().getSerializer()).toNetwork(p_179470_, (T)p_301050_.value()); - } + public static > void toNetwork(FriendlyByteBuf p_179470_, RecipeHolder p_301050_) { + p_179470_.writeResourceLocation(BuiltInRegistries.RECIPE_SERIALIZER.getKey(p_301050_.value().getSerializer())); + p_179470_.writeResourceLocation(p_301050_.id()); +- p_301050_.value().getSerializer().toNetwork(p_179470_, (T)p_301050_.value()); ++ ((net.minecraft.world.item.crafting.RecipeSerializer)p_301050_.value().getSerializer()).toNetwork(p_179470_, (T)p_301050_.value()); + } } diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/network/syncher/EntityDataSerializer.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/network/syncher/EntityDataSerializer.java.patch index 89e640a4..a4bc047a 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/network/syncher/EntityDataSerializer.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/network/syncher/EntityDataSerializer.java.patch @@ -1,17 +1,17 @@ --- a/net/minecraft/network/syncher/EntityDataSerializer.java +++ b/net/minecraft/network/syncher/EntityDataSerializer.java @@ -19,12 +19,12 @@ - return new EntityDataSerializer.ForValueType() { - @Override - public void write(FriendlyByteBuf p_238109_, T p_238110_) { -- p_238096_.accept((T)p_238109_, p_238110_); -+ p_238096_.accept(p_238109_, p_238110_); - } + return new EntityDataSerializer.ForValueType() { + @Override + public void write(FriendlyByteBuf p_238109_, T p_238110_) { +- p_238096_.accept((T)p_238109_, p_238110_); ++ p_238096_.accept(p_238109_, p_238110_); + } - @Override - public T read(FriendlyByteBuf p_238107_) { -- return p_238097_.apply((T)p_238107_); -+ return p_238097_.apply(p_238107_); - } - }; - } + @Override + public T read(FriendlyByteBuf p_238107_) { +- return p_238097_.apply((T)p_238107_); ++ return p_238097_.apply(p_238107_); + } + }; + } diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/network/syncher/SynchedEntityData.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/network/syncher/SynchedEntityData.java.patch index 73ad77b8..cd77d16a 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/network/syncher/SynchedEntityData.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/network/syncher/SynchedEntityData.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/network/syncher/SynchedEntityData.java +++ b/net/minecraft/network/syncher/SynchedEntityData.java @@ -212,7 +212,7 @@ - ) - ); - } else { -- p_135376_.setValue(p_254484_.value); -+ p_135376_.setValue((T)p_254484_.value); - } - } + ) + ); + } else { +- p_135376_.setValue(p_254484_.value); ++ p_135376_.setValue((T)p_254484_.value); + } + } diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/resources/RegistryFileCodec.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/resources/RegistryFileCodec.java.patch index 73b02c07..7fb8d447 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/resources/RegistryFileCodec.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/resources/RegistryFileCodec.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/resources/RegistryFileCodec.java +++ b/net/minecraft/resources/RegistryFileCodec.java @@ -68,7 +68,7 @@ - return holdergetter.get(resourcekey) - .map(DataResult::success) - .orElseGet(() -> DataResult.error(() -> "Failed to get element " + resourcekey)) -- ., T>>map(p_255658_ -> Pair.of(p_255658_, pair.getSecond())) -+ ., T>>map(p_255658_ -> Pair.of(p_255658_, pair.getSecond())) - .setLifecycle(Lifecycle.stable()); + return holdergetter.get(resourcekey) + .map(DataResult::success) + .orElseGet(() -> DataResult.error(() -> "Failed to get element " + resourcekey)) +- ., T>>map(p_255658_ -> Pair.of(p_255658_, pair.getSecond())) ++ ., T>>map(p_255658_ -> Pair.of(p_255658_, pair.getSecond())) + .setLifecycle(Lifecycle.stable()); + } } - } diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/resources/RegistryFixedCodec.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/resources/RegistryFixedCodec.java.patch index 9e6445c7..2ef2de65 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/resources/RegistryFixedCodec.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/resources/RegistryFixedCodec.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/resources/RegistryFixedCodec.java +++ b/net/minecraft/resources/RegistryFixedCodec.java @@ -55,7 +55,7 @@ - .get(ResourceKey.create(this.registryKey, resourcelocation)) - .map(DataResult::success) - .orElseGet(() -> DataResult.error(() -> "Failed to get element " + resourcelocation)) -- ., T>>map(p_256041_ -> Pair.of(p_256041_, (T)p_255515_.getSecond())) -+ ., T>>map(p_256041_ -> Pair.of(p_256041_, (T)p_255515_.getSecond())) - .setLifecycle(Lifecycle.stable()); - } - ); + .get(ResourceKey.create(this.registryKey, resourcelocation)) + .map(DataResult::success) + .orElseGet(() -> DataResult.error(() -> "Failed to get element " + resourcelocation)) +- ., T>>map(p_256041_ -> Pair.of(p_256041_, (T)p_255515_.getSecond())) ++ ., T>>map(p_256041_ -> Pair.of(p_256041_, (T)p_255515_.getSecond())) + .setLifecycle(Lifecycle.stable()); + } + ); diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/resources/RegistryOps.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/resources/RegistryOps.java.patch index 313e22ac..a600ff6b 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/resources/RegistryOps.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/resources/RegistryOps.java.patch @@ -2,10 +2,10 @@ +++ b/net/minecraft/resources/RegistryOps.java @@ -23,7 +23,7 @@ - @Override - public Optional> lookup(ResourceKey> p_256043_) { -- return this.lookups.computeIfAbsent(p_256043_, p_255769_::lookup); -+ return (Optional>)this.lookups.computeIfAbsent(p_256043_, p_255769_::lookup); - } - }; - } + @Override + public Optional> lookup(ResourceKey> p_256043_) { +- return this.lookups.computeIfAbsent(p_256043_, p_255769_::lookup); ++ return (Optional>)this.lookups.computeIfAbsent(p_256043_, p_255769_::lookup); + } + }; + } diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/resources/ResourceKey.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/resources/ResourceKey.java.patch index 4b9ba881..bdcddd4d 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/resources/ResourceKey.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/resources/ResourceKey.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/resources/ResourceKey.java +++ b/net/minecraft/resources/ResourceKey.java @@ -45,7 +45,7 @@ - } + } - public Optional> cast(ResourceKey> p_195976_) { -- return this.isFor(p_195976_) ? Optional.of(this) : Optional.empty(); -+ return this.isFor(p_195976_) ? Optional.of((ResourceKey)this) : Optional.empty(); - } + public Optional> cast(ResourceKey> p_195976_) { +- return this.isFor(p_195976_) ? Optional.of(this) : Optional.empty(); ++ return this.isFor(p_195976_) ? Optional.of((ResourceKey)this) : Optional.empty(); + } - public ResourceLocation location() { + public ResourceLocation location() { diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/server/MinecraftServer.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/server/MinecraftServer.java.patch index b3a04657..6a9b695d 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/server/MinecraftServer.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/server/MinecraftServer.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/server/MinecraftServer.java +++ b/net/minecraft/server/MinecraftServer.java @@ -793,7 +793,7 @@ - } - } + } + } -- protected void doRunTask(TickTask p_129957_) { -+ public void doRunTask(TickTask p_129957_) { - this.getProfiler().incrementCounter("runTask"); - super.doRunTask(p_129957_); - } +- protected void doRunTask(TickTask p_129957_) { ++ public void doRunTask(TickTask p_129957_) { + this.getProfiler().incrementCounter("runTask"); + super.doRunTask(p_129957_); + } diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/server/commands/ReturnCommand.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/server/commands/ReturnCommand.java.patch index c71acc74..f0bccd3d 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/server/commands/ReturnCommand.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/server/commands/ReturnCommand.java.patch @@ -2,10 +2,10 @@ +++ b/net/minecraft/server/commands/ReturnCommand.java @@ -18,7 +18,7 @@ public class ReturnCommand { - public static > void register(CommandDispatcher p_282091_) { - p_282091_.register( -- LiteralArgumentBuilder.literal("return") -+ LiteralArgumentBuilder.literal("return") - .requires(p_305728_ -> p_305728_.hasPermission(2)) - .then( - RequiredArgumentBuilder.argument("value", IntegerArgumentType.integer()).executes(new ReturnCommand.ReturnValueCustomExecutor<>()) + public static > void register(CommandDispatcher p_282091_) { + p_282091_.register( +- LiteralArgumentBuilder.literal("return") ++ LiteralArgumentBuilder.literal("return") + .requires(p_305728_ -> p_305728_.hasPermission(2)) + .then( + RequiredArgumentBuilder.argument("value", IntegerArgumentType.integer()) diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/server/dedicated/DedicatedServerProperties.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/server/dedicated/DedicatedServerProperties.java.patch index 5dd93c98..6c7f327e 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/server/dedicated/DedicatedServerProperties.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/server/dedicated/DedicatedServerProperties.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/server/dedicated/DedicatedServerProperties.java +++ b/net/minecraft/server/dedicated/DedicatedServerProperties.java @@ -186,7 +186,7 @@ - } + } - private static FeatureFlagSet getFeatures(String p_251025_) { -- return FeatureFlags.REGISTRY.fromNames(COMMA_SPLITTER.splitToStream(p_251025_).mapMulti((p_248197_, p_248198_) -> { -+ return FeatureFlags.REGISTRY.fromNames(COMMA_SPLITTER.splitToStream(p_251025_).mapMulti((p_248197_, p_248198_) -> { - ResourceLocation resourcelocation = ResourceLocation.tryParse(p_248197_); - if (resourcelocation == null) { - LOGGER.warn("Invalid resource location {}, ignoring", p_248197_); + private static FeatureFlagSet getFeatures(String p_251025_) { +- return FeatureFlags.REGISTRY.fromNames(COMMA_SPLITTER.splitToStream(p_251025_).mapMulti((p_248197_, p_248198_) -> { ++ return FeatureFlags.REGISTRY.fromNames(COMMA_SPLITTER.splitToStream(p_251025_).mapMulti((p_248197_, p_248198_) -> { + ResourceLocation resourcelocation = ResourceLocation.tryParse(p_248197_); + if (resourcelocation == null) { + LOGGER.warn("Invalid resource location {}, ignoring", p_248197_); diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/server/dedicated/Settings.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/server/dedicated/Settings.java.patch index 7308b0e7..28af301b 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/server/dedicated/Settings.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/server/dedicated/Settings.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/server/dedicated/Settings.java +++ b/net/minecraft/server/dedicated/Settings.java @@ -119,7 +119,7 @@ - String s = this.getStringRaw(p_139869_); - V v = MoreObjects.firstNonNull(s != null ? p_139870_.apply(s) : null, p_139872_); - this.properties.put(p_139869_, p_139871_.apply(v)); -- return new Settings.MutableValue<>(p_139869_, v, p_139871_); -+ return this.new MutableValue(p_139869_, v, p_139871_); - } + String s = this.getStringRaw(p_139869_); + V v = MoreObjects.firstNonNull(s != null ? p_139870_.apply(s) : null, p_139872_); + this.properties.put(p_139869_, p_139871_.apply(v)); +- return new Settings.MutableValue<>(p_139869_, v, p_139871_); ++ return this.new MutableValue(p_139869_, v, p_139871_); + } - protected V get(String p_139827_, Function p_139828_, UnaryOperator p_139829_, Function p_139830_, V p_139831_) { + protected V get(String p_139827_, Function p_139828_, UnaryOperator p_139829_, Function p_139830_, V p_139831_) { diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/server/level/ChunkMap.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/server/level/ChunkMap.java.patch index 70a67d1f..00fc84cf 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/server/level/ChunkMap.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/server/level/ChunkMap.java.patch @@ -1,24 +1,24 @@ --- a/net/minecraft/server/level/ChunkMap.java +++ b/net/minecraft/server/level/ChunkMap.java -@@ -498,9 +498,10 @@ +@@ -502,9 +502,10 @@ - int k = Math.max(0, this.unloadQueue.size() - 2000); + int k = Math.max(0, this.unloadQueue.size() - 2000); -- while((p_140354_.getAsBoolean() || k > 0) && (j = (long)this.unloadQueue.poll()) != null) { -+ Runnable runnable; -+ while((p_140354_.getAsBoolean() || k > 0) && (runnable = this.unloadQueue.poll()) != null) { - --k; -- j.run(); -+ runnable.run(); - } +- while((p_140354_.getAsBoolean() || k > 0) && (j = (long)this.unloadQueue.poll()) != null) { ++ Runnable runnable; ++ while((p_140354_.getAsBoolean() || k > 0) && (runnable = this.unloadQueue.poll()) != null) { + --k; +- j.run(); ++ runnable.run(); + } - int l = 0; -@@ -585,7 +586,7 @@ - } + int l = 0; +@@ -589,7 +590,7 @@ + } - return flag; -- })).thenApplyAsync(p_308562_ -> { -+ })).>thenApplyAsync(p_308562_ -> { - this.level.getProfiler().incrementCounter("chunkLoad"); - if (p_308562_.isPresent()) { - ChunkAccess chunkaccess = ChunkSerializer.read(this.level, this.poiManager, p_140418_, p_308562_.get()); + return flag; +- })).thenApplyAsync(p_308562_ -> { ++ })).>thenApplyAsync(p_308562_ -> { + this.level.getProfiler().incrementCounter("chunkLoad"); + if (p_308562_.isPresent()) { + ChunkAccess chunkaccess = ChunkSerializer.read(this.level, this.poiManager, p_140418_, p_308562_.get()); diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/server/level/ChunkTaskPriorityQueue.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/server/level/ChunkTaskPriorityQueue.java.patch index f4f1d12e..ba62f6b1 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/server/level/ChunkTaskPriorityQueue.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/server/level/ChunkTaskPriorityQueue.java.patch @@ -2,19 +2,19 @@ +++ b/net/minecraft/server/level/ChunkTaskPriorityQueue.java @@ -17,7 +17,7 @@ public class ChunkTaskPriorityQueue { - public static final int PRIORITY_LEVEL_COUNT = ChunkLevel.MAX_LEVEL + 2; - private final List>>> taskQueue = IntStream.range(0, PRIORITY_LEVEL_COUNT) -- .mapToObj(p_140520_ -> new Long2ObjectLinkedOpenHashMap()) -+ .mapToObj(p_140520_ -> new Long2ObjectLinkedOpenHashMap>>()) - .collect(Collectors.toList()); - private volatile int firstQueue = PRIORITY_LEVEL_COUNT; - private final String name; + public static final int PRIORITY_LEVEL_COUNT = ChunkLevel.MAX_LEVEL + 2; + private final List>>> taskQueue = IntStream.range(0, PRIORITY_LEVEL_COUNT) +- .mapToObj(p_140520_ -> new Long2ObjectLinkedOpenHashMap()) ++ .mapToObj(p_140520_ -> new Long2ObjectLinkedOpenHashMap>>()) + .collect(Collectors.toList()); + private volatile int firstQueue = PRIORITY_LEVEL_COUNT; + private final String name; @@ -94,7 +94,7 @@ - ++this.firstQueue; - } + ++this.firstQueue; + } -- return list.stream().map(p_140529_ -> p_140529_.map(Either::left).orElseGet(() -> Either.right(this.acquire(j)))); -+ return list.stream().map(p_140529_ -> p_140529_.>map(Either::left).orElseGet(() -> Either.right(this.acquire(j)))); - } - } +- return list.stream().map(p_140529_ -> p_140529_.map(Either::left).orElseGet(() -> Either.right(this.acquire(j)))); ++ return list.stream().map(p_140529_ -> p_140529_.>map(Either::left).orElseGet(() -> Either.right(this.acquire(j)))); + } + } diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/server/level/ChunkTaskPriorityQueueSorter.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/server/level/ChunkTaskPriorityQueueSorter.java.patch index 3a0f59ef..fe1dcb53 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/server/level/ChunkTaskPriorityQueueSorter.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/server/level/ChunkTaskPriorityQueueSorter.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/server/level/ChunkTaskPriorityQueueSorter.java +++ b/net/minecraft/server/level/ChunkTaskPriorityQueueSorter.java -@@ -154,7 +154,7 @@ - if (chunktaskpriorityqueue == null) { - throw (IllegalArgumentException)Util.pauseInIde(new IllegalArgumentException("No queue for: " + p_140653_)); - } else { -- return chunktaskpriorityqueue; -+ return (ChunkTaskPriorityQueue, T>>)chunktaskpriorityqueue; - } - } +@@ -156,7 +156,7 @@ + if (chunktaskpriorityqueue == null) { + throw (IllegalArgumentException)Util.pauseInIde(new IllegalArgumentException("No queue for: " + p_140653_)); + } else { +- return chunktaskpriorityqueue; ++ return (ChunkTaskPriorityQueue, T>>)chunktaskpriorityqueue; + } + } diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/server/level/ServerChunkCache.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/server/level/ServerChunkCache.java.patch index ebc2f485..8708e62d 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/server/level/ServerChunkCache.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/server/level/ServerChunkCache.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/server/level/ServerChunkCache.java +++ b/net/minecraft/server/level/ServerChunkCache.java -@@ -569,7 +569,7 @@ - } +@@ -571,7 +571,7 @@ + } - @Override -- protected boolean pollTask() { -+ public boolean pollTask() { - if (ServerChunkCache.this.runDistanceManagerUpdates()) { - return true; - } else { + @Override +- protected boolean pollTask() { ++ public boolean pollTask() { + if (ServerChunkCache.this.runDistanceManagerUpdates()) { + return true; + } else { diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/server/level/ServerLevel.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/server/level/ServerLevel.java.patch index 373fe321..a72c7899 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/server/level/ServerLevel.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/server/level/ServerLevel.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/server/level/ServerLevel.java +++ b/net/minecraft/server/level/ServerLevel.java -@@ -1551,7 +1551,7 @@ +@@ -1553,7 +1553,7 @@ - return object2intopenhashmap.object2IntEntrySet() - .stream() -- .sorted(Comparator.comparing(Entry::getIntValue).reversed()) -+ .sorted(Comparator., Integer>comparing(Entry::getIntValue).reversed()) - .limit(5L) - .map(p_207570_ -> (String)p_207570_.getKey() + ":" + p_207570_.getIntValue()) - .collect(Collectors.joining(",")); + return object2intopenhashmap.object2IntEntrySet() + .stream() +- .sorted(Comparator.comparing(Entry::getIntValue).reversed()) ++ .sorted(Comparator., Integer>comparing(Entry::getIntValue).reversed()) + .limit(5L) + .map(p_207570_ -> (String)p_207570_.getKey() + ":" + p_207570_.getIntValue()) + .collect(Collectors.joining(",")); diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/server/level/Ticket.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/server/level/Ticket.java.patch index 51cd2f56..c4828f3d 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/server/level/Ticket.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/server/level/Ticket.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/server/level/Ticket.java +++ b/net/minecraft/server/level/Ticket.java @@ -20,7 +20,7 @@ - return i; - } else { - int j = Integer.compare(System.identityHashCode(this.type), System.identityHashCode(p_9432_.type)); -- return j != 0 ? j : this.type.getComparator().compare(this.key, p_9432_.key); -+ return j != 0 ? j : this.type.getComparator().compare(this.key, (T)p_9432_.key); - } - } + return i; + } else { + int j = Integer.compare(System.identityHashCode(this.type), System.identityHashCode(p_9432_.type)); +- return j != 0 ? j : this.type.getComparator().compare(this.key, p_9432_.key); ++ return j != 0 ? j : this.type.getComparator().compare(this.key, (T)p_9432_.key); + } + } diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/server/level/TickingTracker.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/server/level/TickingTracker.java.patch index fbdcc3b5..6e9f7840 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/server/level/TickingTracker.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/server/level/TickingTracker.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/server/level/TickingTracker.java +++ b/net/minecraft/server/level/TickingTracker.java @@ -63,7 +63,7 @@ - for(Entry>> entry : this.tickets.long2ObjectEntrySet()) { - for(Ticket ticket : entry.getValue()) { - if (ticket.getType() == TicketType.PLAYER) { -- list.add(Pair.of(ticket, entry.getLongKey())); -+ list.add(Pair.of((Ticket)ticket, entry.getLongKey())); + for(Entry>> entry : this.tickets.long2ObjectEntrySet()) { + for(Ticket ticket : entry.getValue()) { + if (ticket.getType() == TicketType.PLAYER) { +- list.add(Pair.of(ticket, entry.getLongKey())); ++ list.add(Pair.of((Ticket)ticket, entry.getLongKey())); + } } - } - } + } diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/server/packs/linkfs/LinkFSProvider.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/server/packs/linkfs/LinkFSProvider.java.patch index cbf8a29f..f4fde0b4 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/server/packs/linkfs/LinkFSProvider.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/server/packs/linkfs/LinkFSProvider.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/server/packs/linkfs/LinkFSProvider.java +++ b/net/minecraft/server/packs/linkfs/LinkFSProvider.java @@ -85,7 +85,7 @@ - } catch (IOException ioexception) { - throw new DirectoryIteratorException(ioexception); - } -- }).map(p_249891_ -> p_249891_).iterator(); -+ }).map(p_249891_ -> (Path)p_249891_).iterator(); - } + } catch (IOException ioexception) { + throw new DirectoryIteratorException(ioexception); + } +- }).map(p_249891_ -> p_249891_).iterator(); ++ }).map(p_249891_ -> (Path)p_249891_).iterator(); + } - @Override + @Override diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/tags/TagKey.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/tags/TagKey.java.patch index 6cc9e60e..2f0f2c47 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/tags/TagKey.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/tags/TagKey.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/tags/TagKey.java +++ b/net/minecraft/tags/TagKey.java @@ -41,7 +41,7 @@ - } + } - public Optional> cast(ResourceKey> p_207648_) { -- return this.isFor(p_207648_) ? Optional.of(this) : Optional.empty(); -+ return this.isFor(p_207648_) ? Optional.of((TagKey)this) : Optional.empty(); - } + public Optional> cast(ResourceKey> p_207648_) { +- return this.isFor(p_207648_) ? Optional.of(this) : Optional.empty(); ++ return this.isFor(p_207648_) ? Optional.of((TagKey)this) : Optional.empty(); + } - @Override + @Override diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/tags/TagLoader.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/tags/TagLoader.java.patch index b2df2671..d8a99ae8 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/tags/TagLoader.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/tags/TagLoader.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/tags/TagLoader.java +++ b/net/minecraft/tags/TagLoader.java @@ -85,7 +85,7 @@ - @Nullable - @Override - public T element(ResourceLocation p_216039_) { -- return TagLoader.this.idToValue.apply(p_216039_).orElse((T)null); -+ return TagLoader.this.idToValue.apply(p_216039_).orElse(null); - } + @Nullable + @Override + public T element(ResourceLocation p_216039_) { +- return TagLoader.this.idToValue.apply(p_216039_).orElse((T)null); ++ return TagLoader.this.idToValue.apply(p_216039_).orElse(null); + } - @Nullable + @Nullable diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/ArrayListDeque.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/ArrayListDeque.java.patch index 0c53e314..d1a082a7 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/ArrayListDeque.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/ArrayListDeque.java.patch @@ -1,13 +1,13 @@ --- a/net/minecraft/util/ArrayListDeque.java +++ b/net/minecraft/util/ArrayListDeque.java @@ -324,6 +324,10 @@ - return new ArrayListDeque.DescendingIterator(); - } + return new ArrayListDeque.DescendingIterator(); + } -+ public ArrayListDeque reversed() { -+ throw new UnsupportedOperationException("Method was added in java 21 and is required to be overridden for classes implementing both List and Deque"); -+ } ++ public ArrayListDeque reversed() { ++ throw new UnsupportedOperationException("Method was added in java 21 and is required to be overridden for classes implementing both List and Deque"); ++ } + - class DescendingIterator implements Iterator { - private int index = ArrayListDeque.this.size() - 1; + class DescendingIterator implements Iterator { + private int index = ArrayListDeque.this.size() - 1; diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/ClassInstanceMultiMap.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/ClassInstanceMultiMap.java.patch index 854be1d3..89302af3 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/ClassInstanceMultiMap.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/ClassInstanceMultiMap.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/util/ClassInstanceMultiMap.java +++ b/net/minecraft/util/ClassInstanceMultiMap.java @@ -61,7 +61,7 @@ - } else { - List list = this.byClass - .computeIfAbsent(p_13534_, p_13538_ -> this.allInstances.stream().filter(p_13538_::isInstance).collect(Collectors.toList())); -- return Collections.unmodifiableCollection(list); -+ return (Collection)Collections.unmodifiableCollection(list); - } - } + } else { + List list = this.byClass + .computeIfAbsent(p_13534_, p_13538_ -> this.allInstances.stream().filter(p_13538_::isInstance).collect(Collectors.toList())); +- return Collections.unmodifiableCollection(list); ++ return (Collection)Collections.unmodifiableCollection(list); + } + } diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/ExtraCodecs.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/ExtraCodecs.java.patch index 1319b47c..e2730595 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/ExtraCodecs.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/ExtraCodecs.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/util/ExtraCodecs.java +++ b/net/minecraft/util/ExtraCodecs.java @@ -224,7 +224,7 @@ - P p1 = p_184445_.get(1); - return p_184365_.apply(p, p1); - }), p_184459_ -> ImmutableList.of(p_184366_.apply(p_184459_), p_184367_.apply(p_184459_))); -- Codec codec1 = RecordCodecBuilder.create( -+ Codec codec1 = RecordCodecBuilder.>create( - p_184360_ -> p_184360_.group(p_184362_.fieldOf(p_184363_).forGetter(Pair::getFirst), p_184362_.fieldOf(p_184364_).forGetter(Pair::getSecond)) - .apply(p_184360_, Pair::of) - ) + P p1 = p_184445_.get(1); + return p_184365_.apply(p, p1); + }), p_184459_ -> ImmutableList.of(p_184366_.apply(p_184459_), p_184367_.apply(p_184459_))); +- Codec codec1 = RecordCodecBuilder.create( ++ Codec codec1 = RecordCodecBuilder.>create( + p_184360_ -> p_184360_.group(p_184362_.fieldOf(p_184363_).forGetter(Pair::getFirst), p_184362_.fieldOf(p_184364_).forGetter(Pair::getSecond)) + .apply(p_184360_, Pair::of) + ) diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/SortedArraySet.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/SortedArraySet.java.patch index e3269b04..244bf92a 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/SortedArraySet.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/SortedArraySet.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/util/SortedArraySet.java +++ b/net/minecraft/util/SortedArraySet.java @@ -28,7 +28,7 @@ - } + } - public static > SortedArraySet create(int p_14247_) { -- return new SortedArraySet<>(p_14247_, Comparator.naturalOrder()); -+ return new SortedArraySet<>(p_14247_, Comparator.naturalOrder()); - } + public static > SortedArraySet create(int p_14247_) { +- return new SortedArraySet<>(p_14247_, Comparator.naturalOrder()); ++ return new SortedArraySet<>(p_14247_, Comparator.naturalOrder()); + } - public static SortedArraySet create(Comparator p_144977_) { + public static SortedArraySet create(Comparator p_144977_) { diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/StringRepresentable.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/StringRepresentable.java.patch index 8050b51c..8ff959c4 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/StringRepresentable.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/StringRepresentable.java.patch @@ -2,10 +2,10 @@ +++ b/net/minecraft/util/StringRepresentable.java @@ -42,7 +42,7 @@ - static Function createNameLookup(T[] p_304419_, Function p_304658_) { - if (p_304419_.length > 16) { -- Map map = Arrays.stream(p_304419_) -+ Map map = Arrays.stream(p_304419_) - .collect(Collectors.toMap(p_304335_ -> p_304658_.apply(p_304335_.getSerializedName()), p_304719_ -> p_304719_)); - return p_304332_ -> p_304332_ == null ? null : map.get(p_304332_); - } else { + static Function createNameLookup(T[] p_304419_, Function p_304658_) { + if (p_304419_.length > 16) { +- Map map = Arrays.stream(p_304419_) ++ Map map = Arrays.stream(p_304419_) + .collect(Collectors.toMap(p_304335_ -> p_304658_.apply(p_304335_.getSerializedName()), p_304719_ -> p_304719_)); + return p_304332_ -> p_304332_ == null ? null : map.get(p_304332_); + } else { diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/DataFixTypes.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/DataFixTypes.java.patch index 1623b3d2..c151c8f9 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/DataFixTypes.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/DataFixTypes.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/util/datafix/DataFixTypes.java +++ b/net/minecraft/util/datafix/DataFixTypes.java -@@ -72,7 +72,7 @@ - } +@@ -74,7 +74,7 @@ + } - public CompoundTag update(DataFixer p_265128_, CompoundTag p_265422_, int p_265549_, int p_265304_) { -- return this.update(p_265128_, new Dynamic<>(NbtOps.INSTANCE, p_265422_), p_265549_, p_265304_).getValue(); -+ return (CompoundTag)this.update(p_265128_, new Dynamic<>(NbtOps.INSTANCE, p_265422_), p_265549_, p_265304_).getValue(); - } + public CompoundTag update(DataFixer p_265128_, CompoundTag p_265422_, int p_265549_, int p_265304_) { +- return this.update(p_265128_, new Dynamic<>(NbtOps.INSTANCE, p_265422_), p_265549_, p_265304_).getValue(); ++ return (CompoundTag)this.update(p_265128_, new Dynamic<>(NbtOps.INSTANCE, p_265422_), p_265549_, p_265304_).getValue(); + } - public CompoundTag updateToCurrentVersion(DataFixer p_265583_, CompoundTag p_265401_, int p_265111_) { + public CompoundTag updateToCurrentVersion(DataFixer p_265583_, CompoundTag p_265401_, int p_265111_) { diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/DataFixers.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/DataFixers.java.patch index 02be0c89..edaaf708 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/DataFixers.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/DataFixers.java.patch @@ -1,20 +1,20 @@ --- a/net/minecraft/util/datafix/DataFixers.java +++ b/net/minecraft/util/datafix/DataFixers.java -@@ -1002,7 +1002,7 @@ - Schema schema161 = p_14514_.addSchema(3086, SAME_NAMESPACED); - p_14514_.addFixer( - new EntityVariantFix( -- schema161, "Change cat variant type", References.ENTITY, "minecraft:cat", "CatType", Util.make(new Int2ObjectOpenHashMap(), p_216528_ -> { -+ schema161, "Change cat variant type", References.ENTITY, "minecraft:cat", "CatType", Util.make(new Int2ObjectOpenHashMap(), p_216528_ -> { - p_216528_.defaultReturnValue("minecraft:tabby"); - p_216528_.put(0, "minecraft:tabby"); - p_216528_.put(1, "minecraft:black"); -@@ -1042,7 +1042,7 @@ - Schema schema162 = p_14514_.addSchema(3087, SAME_NAMESPACED); - p_14514_.addFixer( - new EntityVariantFix( -- schema162, "Change frog variant type", References.ENTITY, "minecraft:frog", "Variant", Util.make(new Int2ObjectOpenHashMap(), p_216519_ -> { -+ schema162, "Change frog variant type", References.ENTITY, "minecraft:frog", "Variant", Util.make(new Int2ObjectOpenHashMap(), p_216519_ -> { - p_216519_.put(0, "minecraft:temperate"); - p_216519_.put(1, "minecraft:warm"); - p_216519_.put(2, "minecraft:cold"); +@@ -1015,7 +1015,7 @@ + Schema schema161 = p_14514_.addSchema(3086, SAME_NAMESPACED); + p_14514_.addFixer( + new EntityVariantFix( +- schema161, "Change cat variant type", References.ENTITY, "minecraft:cat", "CatType", Util.make(new Int2ObjectOpenHashMap(), p_216528_ -> { ++ schema161, "Change cat variant type", References.ENTITY, "minecraft:cat", "CatType", Util.make(new Int2ObjectOpenHashMap(), p_216528_ -> { + p_216528_.defaultReturnValue("minecraft:tabby"); + p_216528_.put(0, "minecraft:tabby"); + p_216528_.put(1, "minecraft:black"); +@@ -1055,7 +1055,7 @@ + Schema schema162 = p_14514_.addSchema(3087, SAME_NAMESPACED); + p_14514_.addFixer( + new EntityVariantFix( +- schema162, "Change frog variant type", References.ENTITY, "minecraft:frog", "Variant", Util.make(new Int2ObjectOpenHashMap(), p_216519_ -> { ++ schema162, "Change frog variant type", References.ENTITY, "minecraft:frog", "Variant", Util.make(new Int2ObjectOpenHashMap(), p_216519_ -> { + p_216519_.put(0, "minecraft:temperate"); + p_216519_.put(1, "minecraft:warm"); + p_216519_.put(2, "minecraft:cold"); diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/AddNewChoices.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/AddNewChoices.java.patch index afb3bd00..7397a8a1 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/AddNewChoices.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/AddNewChoices.java.patch @@ -1,13 +1,13 @@ --- a/net/minecraft/util/datafix/fixes/AddNewChoices.java +++ b/net/minecraft/util/datafix/fixes/AddNewChoices.java @@ -30,8 +30,8 @@ - if (p_14639_.getKeyType() != p_14640_.getKeyType()) { - throw new IllegalStateException("Could not inject: key type is not the same"); - } else { -- return this.fixTypeEverywhere(p_14638_, p_14639_, p_14640_, p_14636_ -> p_145061_ -> { -- if (!p_14640_.hasType(p_145061_.getFirst())) { -+ return this.fixTypeEverywhere(p_14638_, p_14639_, (TaggedChoiceType)p_14640_, p_14636_ -> p_145061_ -> { -+ if (!((TaggedChoiceType)p_14640_).hasType(p_145061_.getFirst())) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Unknown type %s in %s ", p_145061_.getFirst(), this.type)); - } else { - return p_145061_; + if (p_14639_.getKeyType() != p_14640_.getKeyType()) { + throw new IllegalStateException("Could not inject: key type is not the same"); + } else { +- return this.fixTypeEverywhere(p_14638_, p_14639_, p_14640_, p_14636_ -> p_145061_ -> { +- if (!p_14640_.hasType(p_145061_.getFirst())) { ++ return this.fixTypeEverywhere(p_14638_, p_14639_, (TaggedChoiceType)p_14640_, p_14636_ -> p_145061_ -> { ++ if (!((TaggedChoiceType)p_14640_).hasType(p_145061_.getFirst())) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Unknown type %s in %s ", p_145061_.getFirst(), this.type)); + } else { + return p_145061_; diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/BlockEntityIdFix.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/BlockEntityIdFix.java.patch index 4740fcad..73a6c7b6 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/BlockEntityIdFix.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/BlockEntityIdFix.java.patch @@ -1,13 +1,13 @@ --- a/net/minecraft/util/datafix/fixes/BlockEntityIdFix.java +++ b/net/minecraft/util/datafix/fixes/BlockEntityIdFix.java @@ -47,8 +47,8 @@ - public TypeRewriteRule makeRule() { - Type type = this.getInputSchema().getType(References.ITEM_STACK); - Type type1 = this.getOutputSchema().getType(References.ITEM_STACK); -- TaggedChoiceType taggedchoicetype = this.getInputSchema().findChoiceType(References.BLOCK_ENTITY); -- TaggedChoiceType taggedchoicetype1 = this.getOutputSchema().findChoiceType(References.BLOCK_ENTITY); -+ TaggedChoiceType taggedchoicetype = (TaggedChoiceType)this.getInputSchema().findChoiceType(References.BLOCK_ENTITY); -+ TaggedChoiceType taggedchoicetype1 = (TaggedChoiceType)this.getOutputSchema().findChoiceType(References.BLOCK_ENTITY); - return TypeRewriteRule.seq( - this.convertUnchecked("item stack block entity name hook converter", type, type1), - this.fixTypeEverywhere( + public TypeRewriteRule makeRule() { + Type type = this.getInputSchema().getType(References.ITEM_STACK); + Type type1 = this.getOutputSchema().getType(References.ITEM_STACK); +- TaggedChoiceType taggedchoicetype = this.getInputSchema().findChoiceType(References.BLOCK_ENTITY); +- TaggedChoiceType taggedchoicetype1 = this.getOutputSchema().findChoiceType(References.BLOCK_ENTITY); ++ TaggedChoiceType taggedchoicetype = (TaggedChoiceType)this.getInputSchema().findChoiceType(References.BLOCK_ENTITY); ++ TaggedChoiceType taggedchoicetype1 = (TaggedChoiceType)this.getOutputSchema().findChoiceType(References.BLOCK_ENTITY); + return TypeRewriteRule.seq( + this.convertUnchecked("item stack block entity name hook converter", type, type1), + this.fixTypeEverywhere( diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/BlockEntityRenameFix.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/BlockEntityRenameFix.java.patch index 7602c70a..32ec7924 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/BlockEntityRenameFix.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/BlockEntityRenameFix.java.patch @@ -2,12 +2,12 @@ +++ b/net/minecraft/util/datafix/fixes/BlockEntityRenameFix.java @@ -20,8 +20,8 @@ - @Override - public TypeRewriteRule makeRule() { -- TaggedChoiceType taggedchoicetype = this.getInputSchema().findChoiceType(References.BLOCK_ENTITY); -- TaggedChoiceType taggedchoicetype1 = this.getOutputSchema().findChoiceType(References.BLOCK_ENTITY); -+ TaggedChoiceType taggedchoicetype = (TaggedChoiceType)this.getInputSchema().findChoiceType(References.BLOCK_ENTITY); -+ TaggedChoiceType taggedchoicetype1 = (TaggedChoiceType)this.getOutputSchema().findChoiceType(References.BLOCK_ENTITY); - return this.fixTypeEverywhere(this.name, taggedchoicetype, taggedchoicetype1, p_277946_ -> p_277512_ -> p_277512_.mapFirst(this.nameChangeLookup)); - } + @Override + public TypeRewriteRule makeRule() { +- TaggedChoiceType taggedchoicetype = this.getInputSchema().findChoiceType(References.BLOCK_ENTITY); +- TaggedChoiceType taggedchoicetype1 = this.getOutputSchema().findChoiceType(References.BLOCK_ENTITY); ++ TaggedChoiceType taggedchoicetype = (TaggedChoiceType)this.getInputSchema().findChoiceType(References.BLOCK_ENTITY); ++ TaggedChoiceType taggedchoicetype1 = (TaggedChoiceType)this.getOutputSchema().findChoiceType(References.BLOCK_ENTITY); + return this.fixTypeEverywhere(this.name, taggedchoicetype, taggedchoicetype1, p_277946_ -> p_277512_ -> p_277512_.mapFirst(this.nameChangeLookup)); + } diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/BlockEntityUUIDFix.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/BlockEntityUUIDFix.java.patch index 627ff8da..129c0025 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/BlockEntityUUIDFix.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/BlockEntityUUIDFix.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/util/datafix/fixes/BlockEntityUUIDFix.java +++ b/net/minecraft/util/datafix/fixes/BlockEntityUUIDFix.java @@ -22,7 +22,7 @@ - return p_14890_.get("Owner") - .get() - .map(p_14894_ -> replaceUUIDString(p_14894_, "Id", "Id").orElse(p_14894_)) -- .map(p_14888_ -> p_14890_.remove("Owner").set("SkullOwner", p_14888_)) -+ .>map(p_14888_ -> p_14890_.remove("Owner").set("SkullOwner", p_14888_)) - .result() - .orElse(p_14890_); - } + return p_14890_.get("Owner") + .get() + .map(p_14894_ -> replaceUUIDString(p_14894_, "Id", "Id").orElse(p_14894_)) +- .map(p_14888_ -> p_14890_.remove("Owner").set("SkullOwner", p_14888_)) ++ .>map(p_14888_ -> p_14890_.remove("Owner").set("SkullOwner", p_14888_)) + .result() + .orElse(p_14890_); + } diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/ChunkBedBlockEntityInjecterFix.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/ChunkBedBlockEntityInjecterFix.java.patch index d56dd348..9f02614c 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/ChunkBedBlockEntityInjecterFix.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/ChunkBedBlockEntityInjecterFix.java.patch @@ -1,13 +1,13 @@ --- a/net/minecraft/util/datafix/fixes/ChunkBedBlockEntityInjecterFix.java +++ b/net/minecraft/util/datafix/fixes/ChunkBedBlockEntityInjecterFix.java @@ -44,8 +44,8 @@ - return TypeRewriteRule.seq( - this.fixTypeEverywhere( - "InjectBedBlockEntityType", -- this.getInputSchema().findChoiceType(References.BLOCK_ENTITY), -- this.getOutputSchema().findChoiceType(References.BLOCK_ENTITY), -+ (com.mojang.datafixers.types.templates.TaggedChoice.TaggedChoiceType)this.getInputSchema().findChoiceType(References.BLOCK_ENTITY), -+ (com.mojang.datafixers.types.templates.TaggedChoice.TaggedChoiceType)this.getOutputSchema().findChoiceType(References.BLOCK_ENTITY), - p_184841_ -> p_184837_ -> p_184837_ - ), - this.fixTypeEverywhereTyped( + return TypeRewriteRule.seq( + this.fixTypeEverywhere( + "InjectBedBlockEntityType", +- this.getInputSchema().findChoiceType(References.BLOCK_ENTITY), +- this.getOutputSchema().findChoiceType(References.BLOCK_ENTITY), ++ (com.mojang.datafixers.types.templates.TaggedChoice.TaggedChoiceType)this.getInputSchema().findChoiceType(References.BLOCK_ENTITY), ++ (com.mojang.datafixers.types.templates.TaggedChoice.TaggedChoiceType)this.getOutputSchema().findChoiceType(References.BLOCK_ENTITY), + p_184841_ -> p_184837_ -> p_184837_ + ), + this.fixTypeEverywhereTyped( diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/ChunkHeightAndBiomeFix.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/ChunkHeightAndBiomeFix.java.patch index 6343e382..c515a303 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/ChunkHeightAndBiomeFix.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/ChunkHeightAndBiomeFix.java.patch @@ -1,19 +1,19 @@ --- a/net/minecraft/util/datafix/fixes/ChunkHeightAndBiomeFix.java +++ b/net/minecraft/util/datafix/fixes/ChunkHeightAndBiomeFix.java -@@ -219,12 +219,14 @@ - p_184910_.setValue(true); +@@ -221,12 +221,14 @@ + p_184910_.setValue(true); - for(int l = 0; l < 24; ++l) { -- dynamic[l] = makeBiomeContainer(p_184907_, p_184967_ -> getOldBiome(aint, l * 64 + p_184967_)); -+ int l_f = l; -+ dynamic[l] = makeBiomeContainer(p_184907_, p_184967_ -> getOldBiome(aint, l_f * 64 + p_184967_)); - } - } else if (aint != null && aint.length == 1024) { - for(int i = 0; i < 16; ++i) { -+ int i_f = i; - int j = i - p_184909_; -- dynamic[j] = makeBiomeContainer(p_184907_, p_184954_ -> getOldBiome(aint, i * 64 + p_184954_)); -+ dynamic[j] = makeBiomeContainer(p_184907_, p_184954_ -> getOldBiome(aint, i_f * 64 + p_184954_)); - } + for(int l = 0; l < 24; ++l) { +- dynamic[l] = makeBiomeContainer(p_184907_, p_184967_ -> getOldBiome(aint, l * 64 + p_184967_)); ++ int l_f = l; ++ dynamic[l] = makeBiomeContainer(p_184907_, p_184967_ -> getOldBiome(aint, l_f * 64 + p_184967_)); + } + } else if (aint != null && aint.length == 1024) { + for(int i = 0; i < 16; ++i) { ++ int i_f = i; + int j = i - p_184909_; +- dynamic[j] = makeBiomeContainer(p_184907_, p_184954_ -> getOldBiome(aint, i * 64 + p_184954_)); ++ dynamic[j] = makeBiomeContainer(p_184907_, p_184954_ -> getOldBiome(aint, i_f * 64 + p_184954_)); + } - if (p_184908_) { + if (p_184908_) { diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/ChunkProtoTickListFix.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/ChunkProtoTickListFix.java.patch index 89e654a7..ec80f1d1 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/ChunkProtoTickListFix.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/ChunkProtoTickListFix.java.patch @@ -1,20 +1,20 @@ --- a/net/minecraft/util/datafix/fixes/ChunkProtoTickListFix.java +++ b/net/minecraft/util/datafix/fixes/ChunkProtoTickListFix.java -@@ -105,7 +105,7 @@ - Dynamic dynamic2 = this.makeTickList(dynamic, int2objectmap, b0, i, j, "ToBeTicked", ChunkProtoTickListFix::getBlock); - Optional, ?>> optional = opticfinder6.type().readTyped(dynamic2).result(); - if (optional.isPresent()) { -- p_185010_ = p_185010_.set(opticfinder6, ((Pair)optional.get()).getFirst()); -+ p_185010_ = p_185010_.set(opticfinder6, (Typed)(optional.get()).getFirst()); - } - - return p_185010_.update( -@@ -178,7 +178,7 @@ - int k = p_185050_ >>> 8 & 15; - String s = p_185051_.apply(p_185046_ != null ? p_185046_.get().get(i, j, k) : null); - return p_185045_.createMap( -- ImmutableMap.builder() -+ ImmutableMap., Dynamic>builder() - .put(p_185045_.createString("i"), p_185045_.createString(s)) - .put(p_185045_.createString("x"), p_185045_.createInt(p_185047_ * 16 + i)) - .put(p_185045_.createString("y"), p_185045_.createInt(p_185048_ * 16 + j)) +@@ -109,7 +109,7 @@ + Dynamic dynamic2 = this.makeTickList(dynamic, int2objectmap, b0, i, j, "ToBeTicked", ChunkProtoTickListFix::getBlock); + Optional, ?>> optional = opticfinder6.type().readTyped(dynamic2).result(); + if (optional.isPresent()) { +- p_185010_ = p_185010_.set(opticfinder6, ((Pair)optional.get()).getFirst()); ++ p_185010_ = p_185010_.set(opticfinder6, (Typed)(optional.get()).getFirst()); + } + + return p_185010_.update( +@@ -184,7 +184,7 @@ + int k = p_185050_ >>> 8 & 15; + String s = p_185051_.apply(p_185046_ != null ? p_185046_.get().get(i, j, k) : null); + return p_185045_.createMap( +- ImmutableMap.builder() ++ ImmutableMap., Dynamic>builder() + .put(p_185045_.createString("i"), p_185045_.createString(s)) + .put(p_185045_.createString("x"), p_185045_.createInt(p_185047_ * 16 + i)) + .put(p_185045_.createString("y"), p_185045_.createInt(p_185048_ * 16 + j)) diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/EntityHorseSplitFix.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/EntityHorseSplitFix.java.patch index 7e6362a4..eafab75e 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/EntityHorseSplitFix.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/EntityHorseSplitFix.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/util/datafix/fixes/EntityHorseSplitFix.java +++ b/net/minecraft/util/datafix/fixes/EntityHorseSplitFix.java @@ -30,7 +30,7 @@ - Type type = (Type)this.getOutputSchema().findChoiceType(References.ENTITY).types().get($$8); - return Pair.of( - $$8, -- (Typed)((Pair)p_15452_.write().flatMap(type::readTyped).result().orElseThrow(() -> new IllegalStateException("Could not parse the new horse"))) -+ (Typed)((Pair)((com.mojang.serialization.DataResult>)p_15452_.write()).flatMap(type::readTyped).result().orElseThrow(() -> new IllegalStateException("Could not parse the new horse"))) - .getFirst() - ); - } else { + Type type = (Type)this.getOutputSchema().findChoiceType(References.ENTITY).types().get($$8); + return Pair.of( + $$8, +- (Typed)((Pair)p_15452_.write() ++ (Typed)((Pair)((com.mojang.serialization.DataResult>)p_15452_.write()) + .flatMap(type::readTyped) + .result() + .orElseThrow(() -> new IllegalStateException("Could not parse the new horse"))) diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/EntityIdFix.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/EntityIdFix.java.patch index 020af4c3..7f520cf3 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/EntityIdFix.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/EntityIdFix.java.patch @@ -2,12 +2,12 @@ +++ b/net/minecraft/util/datafix/fixes/EntityIdFix.java @@ -97,8 +97,8 @@ - @Override - public TypeRewriteRule makeRule() { -- TaggedChoiceType taggedchoicetype = this.getInputSchema().findChoiceType(References.ENTITY); -- TaggedChoiceType taggedchoicetype1 = this.getOutputSchema().findChoiceType(References.ENTITY); -+ TaggedChoiceType taggedchoicetype = (TaggedChoiceType)this.getInputSchema().findChoiceType(References.ENTITY); -+ TaggedChoiceType taggedchoicetype1 = (TaggedChoiceType)this.getOutputSchema().findChoiceType(References.ENTITY); - Type type = this.getInputSchema().getType(References.ITEM_STACK); - Type type1 = this.getOutputSchema().getType(References.ITEM_STACK); - return TypeRewriteRule.seq( + @Override + public TypeRewriteRule makeRule() { +- TaggedChoiceType taggedchoicetype = this.getInputSchema().findChoiceType(References.ENTITY); +- TaggedChoiceType taggedchoicetype1 = this.getOutputSchema().findChoiceType(References.ENTITY); ++ TaggedChoiceType taggedchoicetype = (TaggedChoiceType)this.getInputSchema().findChoiceType(References.ENTITY); ++ TaggedChoiceType taggedchoicetype1 = (TaggedChoiceType)this.getOutputSchema().findChoiceType(References.ENTITY); + Type type = this.getInputSchema().getType(References.ITEM_STACK); + Type type1 = this.getOutputSchema().getType(References.ITEM_STACK); + return TypeRewriteRule.seq( diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/EntityMinecartIdentifiersFix.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/EntityMinecartIdentifiersFix.java.patch index 184aa236..ca937442 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/EntityMinecartIdentifiersFix.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/EntityMinecartIdentifiersFix.java.patch @@ -2,21 +2,21 @@ +++ b/net/minecraft/util/datafix/fixes/EntityMinecartIdentifiersFix.java @@ -22,8 +22,8 @@ - @Override - public TypeRewriteRule makeRule() { -- TaggedChoiceType taggedchoicetype = this.getInputSchema().findChoiceType(References.ENTITY); -- TaggedChoiceType taggedchoicetype1 = this.getOutputSchema().findChoiceType(References.ENTITY); -+ TaggedChoiceType taggedchoicetype = (TaggedChoiceType)this.getInputSchema().findChoiceType(References.ENTITY); -+ TaggedChoiceType taggedchoicetype1 = (TaggedChoiceType)this.getOutputSchema().findChoiceType(References.ENTITY); - return this.fixTypeEverywhere( - "EntityMinecartIdentifiersFix", - taggedchoicetype, + @Override + public TypeRewriteRule makeRule() { +- TaggedChoiceType taggedchoicetype = this.getInputSchema().findChoiceType(References.ENTITY); +- TaggedChoiceType taggedchoicetype1 = this.getOutputSchema().findChoiceType(References.ENTITY); ++ TaggedChoiceType taggedchoicetype = (TaggedChoiceType)this.getInputSchema().findChoiceType(References.ENTITY); ++ TaggedChoiceType taggedchoicetype1 = (TaggedChoiceType)this.getOutputSchema().findChoiceType(References.ENTITY); + return this.fixTypeEverywhere( + "EntityMinecartIdentifiersFix", + taggedchoicetype, @@ -45,7 +45,7 @@ - - return Pair.of( - s, -- typed.write() -+ ((com.mojang.serialization.DataResult>>)typed.write()) - .map(p_145294_ -> taggedchoicetype1.types().get(s).read(p_145294_)) - .result() - .orElseThrow(() -> new IllegalStateException("Could not read the new minecart.")) + + return Pair.of( + s, +- typed.write() ++ ((com.mojang.serialization.DataResult>>)typed.write()) + .map(p_145294_ -> taggedchoicetype1.types().get(s).read(p_145294_)) + .result() + .orElseThrow(() -> new IllegalStateException("Could not read the new minecart.")) diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/EntityRenameFix.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/EntityRenameFix.java.patch index d4a08093..5a1d2d50 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/EntityRenameFix.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/EntityRenameFix.java.patch @@ -2,12 +2,12 @@ +++ b/net/minecraft/util/datafix/fixes/EntityRenameFix.java @@ -20,8 +20,8 @@ - @Override - public TypeRewriteRule makeRule() { -- TaggedChoiceType taggedchoicetype = this.getInputSchema().findChoiceType(References.ENTITY); -- TaggedChoiceType taggedchoicetype1 = this.getOutputSchema().findChoiceType(References.ENTITY); -+ TaggedChoiceType taggedchoicetype = (TaggedChoiceType)this.getInputSchema().findChoiceType(References.ENTITY); -+ TaggedChoiceType taggedchoicetype1 = (TaggedChoiceType)this.getOutputSchema().findChoiceType(References.ENTITY); - return this.fixTypeEverywhere(this.name, taggedchoicetype, taggedchoicetype1, p_15624_ -> p_145311_ -> { - String s = p_145311_.getFirst(); - Type type = taggedchoicetype.types().get(s); + @Override + public TypeRewriteRule makeRule() { +- TaggedChoiceType taggedchoicetype = this.getInputSchema().findChoiceType(References.ENTITY); +- TaggedChoiceType taggedchoicetype1 = this.getOutputSchema().findChoiceType(References.ENTITY); ++ TaggedChoiceType taggedchoicetype = (TaggedChoiceType)this.getInputSchema().findChoiceType(References.ENTITY); ++ TaggedChoiceType taggedchoicetype1 = (TaggedChoiceType)this.getOutputSchema().findChoiceType(References.ENTITY); + return this.fixTypeEverywhere( + this.name, + taggedchoicetype, diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/FixProjectileStoredItem.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/FixProjectileStoredItem.java.patch index ea25a9e7..aae6863f 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/FixProjectileStoredItem.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/FixProjectileStoredItem.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/util/datafix/fixes/FixProjectileStoredItem.java +++ b/net/minecraft/util/datafix/fixes/FixProjectileStoredItem.java @@ -56,7 +56,7 @@ - String p_309198_, FixProjectileStoredItem.SubFixer p_309081_, Type p_309063_, Type p_308929_ - ) { - OpticFinder opticfinder = DSL.namedChoice(p_309198_, p_309063_); -- return p_309195_ -> p_309195_.updateTyped(opticfinder, p_308929_, p_309191_ -> p_309081_.fix(p_309191_, p_308929_)); -+ return p_309195_ -> p_309195_.updateTyped(opticfinder, p_308929_, p_309191_ -> ((FixProjectileStoredItem.SubFixer)p_309081_).fix(p_309191_, p_308929_)); - } + String p_309198_, FixProjectileStoredItem.SubFixer p_309081_, Type p_309063_, Type p_308929_ + ) { + OpticFinder opticfinder = DSL.namedChoice(p_309198_, p_309063_); +- return p_309195_ -> p_309195_.updateTyped(opticfinder, p_308929_, p_309191_ -> p_309081_.fix(p_309191_, p_308929_)); ++ return p_309195_ -> p_309195_.updateTyped(opticfinder, p_308929_, p_309191_ -> ((FixProjectileStoredItem.SubFixer)p_309081_).fix(p_309191_, p_308929_)); + } - private static Typed fixArrow(Typed p_308973_, Type p_309096_) { + private static Typed fixArrow(Typed p_308973_, Type p_309096_) { diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/ItemRemoveBlockEntityTagFix.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/ItemRemoveBlockEntityTagFix.java.patch index 3e3f17e3..076e7689 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/ItemRemoveBlockEntityTagFix.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/ItemRemoveBlockEntityTagFix.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/util/datafix/fixes/ItemRemoveBlockEntityTagFix.java +++ b/net/minecraft/util/datafix/fixes/ItemRemoveBlockEntityTagFix.java @@ -43,7 +43,7 @@ - return p_242866_; - } + return p_242866_; + } -- return p_242866_.set(opticfinder1, ((Pair)optional4.get()).getFirst()); -+ return p_242866_.set((OpticFinder)opticfinder1, (Typed)((Pair)optional4.get()).getFirst()); - } +- return p_242866_.set(opticfinder1, ((Pair)optional4.get()).getFirst()); ++ return p_242866_.set((OpticFinder)opticfinder1, (Typed)((Pair)optional4.get()).getFirst()); + } + } } - } diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/ItemWrittenBookPagesStrictJsonFix.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/ItemWrittenBookPagesStrictJsonFix.java.patch index f7c6baf0..7e16b2de 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/ItemWrittenBookPagesStrictJsonFix.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/ItemWrittenBookPagesStrictJsonFix.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/util/datafix/fixes/ItemWrittenBookPagesStrictJsonFix.java +++ b/net/minecraft/util/datafix/fixes/ItemWrittenBookPagesStrictJsonFix.java @@ -24,7 +24,7 @@ - public Dynamic fixTag(Dynamic p_16172_) { - return p_16172_.update( - "pages", -- p_16175_ -> DataFixUtils.orElse(p_16175_.asStreamOpt().map(p_145441_ -> p_145441_.map((Function)(p_145443_ -> { -+ p_16175_ -> DataFixUtils.orElse(p_16175_.asStreamOpt().map(p_145441_ -> p_145441_.map((p_145443_ -> { - if (p_145443_.asString().result().isEmpty()) { - return p_145443_; - } else { + public Dynamic fixTag(Dynamic p_16172_) { + return p_16172_.update( + "pages", +- p_16175_ -> DataFixUtils.orElse(p_16175_.asStreamOpt().map(p_145441_ -> p_145441_.map((Function)(p_145443_ -> { ++ p_16175_ -> DataFixUtils.orElse(p_16175_.asStreamOpt().map(p_145441_ -> p_145441_.map((p_145443_ -> { + if (p_145443_.asString().result().isEmpty()) { + return p_145443_; + } else { diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/LeavesFix.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/LeavesFix.java.patch index 349c8b93..1c5a92e6 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/LeavesFix.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/LeavesFix.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/util/datafix/fixes/LeavesFix.java +++ b/net/minecraft/util/datafix/fixes/LeavesFix.java -@@ -352,7 +352,7 @@ - ? p_16289_ - : p_16289_.update(DSL.remainderFinder(), p_16305_ -> p_16305_.set("BlockStates", p_16305_.createLongList(Arrays.stream(this.storage.getRaw())))) - .set( -- this.paletteFinder, this.palette.stream().map(p_16300_ -> Pair.of(References.BLOCK_STATE.typeName(), p_16300_)).collect(Collectors.toList()) -+ this.paletteFinder, this.palette.stream().>>map(p_16300_ -> Pair.of(References.BLOCK_STATE.typeName(), p_16300_)).collect(Collectors.toList()) - ); - } +@@ -357,7 +357,7 @@ + : p_16289_.update(DSL.remainderFinder(), p_16305_ -> p_16305_.set("BlockStates", p_16305_.createLongList(Arrays.stream(this.storage.getRaw())))) + .set( + this.paletteFinder, +- this.palette.stream().map(p_16300_ -> Pair.of(References.BLOCK_STATE.typeName(), p_16300_)).collect(Collectors.toList()) ++ this.palette.stream().>>map(p_16300_ -> Pair.of(References.BLOCK_STATE.typeName(), p_16300_)).collect(Collectors.toList()) + ); + } diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/MobSpawnerEntityIdentifiersFix.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/MobSpawnerEntityIdentifiersFix.java.patch index 62f33937..d7869888 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/MobSpawnerEntityIdentifiersFix.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/MobSpawnerEntityIdentifiersFix.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/util/datafix/fixes/MobSpawnerEntityIdentifiersFix.java +++ b/net/minecraft/util/datafix/fixes/MobSpawnerEntityIdentifiersFix.java @@ -64,7 +64,7 @@ - Dynamic dynamic = p_297969_.get(DSL.remainderFinder()); - dynamic = dynamic.set("id", dynamic.createString("MobSpawner")); - DataResult, ?>> dataresult = type.readTyped(this.fix(dynamic)); -- return dataresult.result().isEmpty() ? p_297969_ : ((Pair)dataresult.result().get()).getFirst(); -+ return dataresult.result().isEmpty() ? p_297969_ : (dataresult.result().get()).getFirst(); - }); - } + Dynamic dynamic = p_297969_.get(DSL.remainderFinder()); + dynamic = dynamic.set("id", dynamic.createString("MobSpawner")); + DataResult, ?>> dataresult = type.readTyped(this.fix(dynamic)); +- return dataresult.result().isEmpty() ? p_297969_ : ((Pair)dataresult.result().get()).getFirst(); ++ return dataresult.result().isEmpty() ? p_297969_ : (dataresult.result().get()).getFirst(); + }); + } } diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/NamedEntityWriteReadFix.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/NamedEntityWriteReadFix.java.patch index ea24c6f8..73caec69 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/NamedEntityWriteReadFix.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/NamedEntityWriteReadFix.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/util/datafix/fixes/NamedEntityWriteReadFix.java +++ b/net/minecraft/util/datafix/fixes/NamedEntityWriteReadFix.java @@ -38,7 +38,7 @@ - opticfinder, - type3, - p_307284_ -> (Typed)Util.getOrThrow( -- p_307284_.write().map(this::fix).flatMap(type3::readTyped), -+ p_307284_.write().>map(this::fix).flatMap(type3::readTyped), - p_307587_ -> new IllegalStateException("Could not parse the value " + p_307587_) - ) - .getFirst() + opticfinder, + type3, + p_307284_ -> (Typed)Util.getOrThrow( +- p_307284_.write().map(this::fix).flatMap(type3::readTyped), ++ p_307284_.write().>map(this::fix).flatMap(type3::readTyped), + p_307587_ -> new IllegalStateException("Could not parse the value " + p_307587_) + ) + .getFirst() diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/OptionsKeyLwjgl3Fix.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/OptionsKeyLwjgl3Fix.java.patch index 5836eaff..3042919f 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/OptionsKeyLwjgl3Fix.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/OptionsKeyLwjgl3Fix.java.patch @@ -1,33 +1,33 @@ --- a/net/minecraft/util/datafix/fixes/OptionsKeyLwjgl3Fix.java +++ b/net/minecraft/util/datafix/fixes/OptionsKeyLwjgl3Fix.java @@ -143,8 +143,8 @@ - p_16633_ -> p_16633_.update( - DSL.remainderFinder(), - p_145575_ -> p_145575_.getMapValues().map(p_145578_ -> p_145575_.createMap(p_145578_.entrySet().stream().map(p_145580_ -> { -- if (((Dynamic)p_145580_.getKey()).asString("").startsWith("key_")) { -- int i = Integer.parseInt(((Dynamic)p_145580_.getValue()).asString("")); -+ if ((p_145580_.getKey()).asString("").startsWith("key_")) { -+ int i = Integer.parseInt((p_145580_.getValue()).asString("")); - if (i < 0) { - int j = i + 100; - String s1; + p_16633_ -> p_16633_.update( + DSL.remainderFinder(), + p_145575_ -> p_145575_.getMapValues().map(p_145578_ -> p_145575_.createMap(p_145578_.entrySet().stream().map(p_145580_ -> { +- if (((Dynamic)p_145580_.getKey()).asString("").startsWith("key_")) { +- int i = Integer.parseInt(((Dynamic)p_145580_.getValue()).asString("")); ++ if ((p_145580_.getKey()).asString("").startsWith("key_")) { ++ int i = Integer.parseInt((p_145580_.getValue()).asString("")); + if (i < 0) { + int j = i + 100; + String s1; @@ -158,15 +158,15 @@ - s1 = "key.mouse." + (j + 1); - } - -- return Pair.of((Dynamic)p_145580_.getKey(), ((Dynamic)p_145580_.getValue()).createString(s1)); -+ return Pair.of(p_145580_.getKey(), (p_145580_.getValue()).createString(s1)); - } else { - String s = MAP.getOrDefault(i, "key.unknown"); -- return Pair.of((Dynamic)p_145580_.getKey(), ((Dynamic)p_145580_.getValue()).createString(s)); -+ return Pair.of(p_145580_.getKey(), (p_145580_.getValue()).createString(s)); - } - } else { -- return Pair.of((Dynamic)p_145580_.getKey(), (Dynamic)p_145580_.getValue()); -+ return Pair.of(p_145580_.getKey(), p_145580_.getValue()); - } -- }).collect(Collectors.toMap(Pair::getFirst, Pair::getSecond)))).result().orElse(p_145575_) -+ }).collect(Collectors.toMap(Pair::getFirst, Pair::getSecond)))).result().orElse((Dynamic)p_145575_) - ) - ); - } + s1 = "key.mouse." + (j + 1); + } + +- return Pair.of((Dynamic)p_145580_.getKey(), ((Dynamic)p_145580_.getValue()).createString(s1)); ++ return Pair.of(p_145580_.getKey(), (p_145580_.getValue()).createString(s1)); + } else { + String s = MAP.getOrDefault(i, "key.unknown"); +- return Pair.of((Dynamic)p_145580_.getKey(), ((Dynamic)p_145580_.getValue()).createString(s)); ++ return Pair.of(p_145580_.getKey(), (p_145580_.getValue()).createString(s)); + } + } else { +- return Pair.of((Dynamic)p_145580_.getKey(), (Dynamic)p_145580_.getValue()); ++ return Pair.of(p_145580_.getKey(), p_145580_.getValue()); + } +- }).collect(Collectors.toMap(Pair::getFirst, Pair::getSecond)))).result().orElse(p_145575_) ++ }).collect(Collectors.toMap(Pair::getFirst, Pair::getSecond)))).result().orElse((Dynamic)p_145575_) + ) + ); + } diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/OptionsKeyTranslationFix.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/OptionsKeyTranslationFix.java.patch index 8c5a1c8c..4bd199e1 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/OptionsKeyTranslationFix.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/OptionsKeyTranslationFix.java.patch @@ -1,23 +1,23 @@ --- a/net/minecraft/util/datafix/fixes/OptionsKeyTranslationFix.java +++ b/net/minecraft/util/datafix/fixes/OptionsKeyTranslationFix.java @@ -24,15 +24,15 @@ - p_16648_ -> p_16648_.update( - DSL.remainderFinder(), - p_145582_ -> p_145582_.getMapValues().map(p_145588_ -> p_145582_.createMap(p_145588_.entrySet().stream().map(p_145585_ -> { -- if (((Dynamic)p_145585_.getKey()).asString("").startsWith("key_")) { -- String s = ((Dynamic)p_145585_.getValue()).asString(""); -+ if ((p_145585_.getKey()).asString("").startsWith("key_")) { -+ String s = (p_145585_.getValue()).asString(""); - if (!s.startsWith("key.mouse") && !s.startsWith("scancode.")) { -- return Pair.of((Dynamic)p_145585_.getKey(), p_145582_.createString("key.keyboard." + s.substring("key.".length()))); -+ return Pair.of(p_145585_.getKey(), p_145582_.createString("key.keyboard." + s.substring("key.".length()))); - } - } - -- return Pair.of((Dynamic)p_145585_.getKey(), (Dynamic)p_145585_.getValue()); -- }).collect(Collectors.toMap(Pair::getFirst, Pair::getSecond)))).result().orElse(p_145582_) -+ return Pair.of(p_145585_.getKey(), p_145585_.getValue()); -+ }).collect(Collectors.toMap(Pair::getFirst, Pair::getSecond)))).result().orElse((Dynamic)p_145582_) - ) - ); - } + p_16648_ -> p_16648_.update( + DSL.remainderFinder(), + p_145582_ -> p_145582_.getMapValues().map(p_145588_ -> p_145582_.createMap(p_145588_.entrySet().stream().map(p_145585_ -> { +- if (((Dynamic)p_145585_.getKey()).asString("").startsWith("key_")) { +- String s = ((Dynamic)p_145585_.getValue()).asString(""); ++ if ((p_145585_.getKey()).asString("").startsWith("key_")) { ++ String s = (p_145585_.getValue()).asString(""); + if (!s.startsWith("key.mouse") && !s.startsWith("scancode.")) { +- return Pair.of((Dynamic)p_145585_.getKey(), p_145582_.createString("key.keyboard." + s.substring("key.".length()))); ++ return Pair.of(p_145585_.getKey(), p_145582_.createString("key.keyboard." + s.substring("key.".length()))); + } + } + +- return Pair.of((Dynamic)p_145585_.getKey(), (Dynamic)p_145585_.getValue()); +- }).collect(Collectors.toMap(Pair::getFirst, Pair::getSecond)))).result().orElse(p_145582_) ++ return Pair.of(p_145585_.getKey(), p_145585_.getValue()); ++ }).collect(Collectors.toMap(Pair::getFirst, Pair::getSecond)))).result().orElse((Dynamic)p_145582_) + ) + ); + } diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/SimplestEntityRenameFix.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/SimplestEntityRenameFix.java.patch index ad48c192..2ded3554 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/SimplestEntityRenameFix.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/SimplestEntityRenameFix.java.patch @@ -2,12 +2,12 @@ +++ b/net/minecraft/util/datafix/fixes/SimplestEntityRenameFix.java @@ -22,8 +22,8 @@ - @Override - public TypeRewriteRule makeRule() { -- TaggedChoiceType taggedchoicetype = this.getInputSchema().findChoiceType(References.ENTITY); -- TaggedChoiceType taggedchoicetype1 = this.getOutputSchema().findChoiceType(References.ENTITY); -+ TaggedChoiceType taggedchoicetype = (TaggedChoiceType)this.getInputSchema().findChoiceType(References.ENTITY); -+ TaggedChoiceType taggedchoicetype1 = (TaggedChoiceType)this.getOutputSchema().findChoiceType(References.ENTITY); - Type> type = DSL.named(References.ENTITY_NAME.typeName(), NamespacedSchema.namespacedString()); - if (!Objects.equals(this.getOutputSchema().getType(References.ENTITY_NAME), type)) { - throw new IllegalStateException("Entity name type is not what was expected."); + @Override + public TypeRewriteRule makeRule() { +- TaggedChoiceType taggedchoicetype = this.getInputSchema().findChoiceType(References.ENTITY); +- TaggedChoiceType taggedchoicetype1 = this.getOutputSchema().findChoiceType(References.ENTITY); ++ TaggedChoiceType taggedchoicetype = (TaggedChoiceType)this.getInputSchema().findChoiceType(References.ENTITY); ++ TaggedChoiceType taggedchoicetype1 = (TaggedChoiceType)this.getOutputSchema().findChoiceType(References.ENTITY); + Type> type = DSL.named(References.ENTITY_NAME.typeName(), NamespacedSchema.namespacedString()); + if (!Objects.equals(this.getOutputSchema().getType(References.ENTITY_NAME), type)) { + throw new IllegalStateException("Entity name type is not what was expected."); diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/TrappedChestBlockEntityFix.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/TrappedChestBlockEntityFix.java.patch index 7bce1cc7..14323eb8 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/TrappedChestBlockEntityFix.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/TrappedChestBlockEntityFix.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/util/datafix/fixes/TrappedChestBlockEntityFix.java +++ b/net/minecraft/util/datafix/fixes/TrappedChestBlockEntityFix.java @@ -80,7 +80,7 @@ - Dynamic dynamic = p_145746_.get(DSL.remainderFinder()); - int k = dynamic.get("xPos").asInt(0); - int l = dynamic.get("zPos").asInt(0); -- TaggedChoiceType taggedchoicetype = this.getInputSchema().findChoiceType(References.BLOCK_ENTITY); -+ TaggedChoiceType taggedchoicetype = (TaggedChoiceType)this.getInputSchema().findChoiceType(References.BLOCK_ENTITY); - return p_145746_.updateTyped( - opticfinder, - p_145752_ -> p_145752_.updateTyped( + Dynamic dynamic = p_145746_.get(DSL.remainderFinder()); + int k = dynamic.get("xPos").asInt(0); + int l = dynamic.get("zPos").asInt(0); +- TaggedChoiceType taggedchoicetype = this.getInputSchema().findChoiceType(References.BLOCK_ENTITY); ++ TaggedChoiceType taggedchoicetype = (TaggedChoiceType)this.getInputSchema().findChoiceType(References.BLOCK_ENTITY); + return p_145746_.updateTyped( + opticfinder, + p_145752_ -> p_145752_.updateTyped( diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/WorldGenSettingsDisallowOldCustomWorldsFix.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/WorldGenSettingsDisallowOldCustomWorldsFix.java.patch index 4bc1b6b8..d646b013 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/WorldGenSettingsDisallowOldCustomWorldsFix.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/util/datafix/fixes/WorldGenSettingsDisallowOldCustomWorldsFix.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/util/datafix/fixes/WorldGenSettingsDisallowOldCustomWorldsFix.java +++ b/net/minecraft/util/datafix/fixes/WorldGenSettingsDisallowOldCustomWorldsFix.java @@ -23,7 +23,7 @@ - "WorldGenSettingsDisallowOldCustomWorldsFix_" + this.getOutputSchema().getVersionKey(), - type, - p_185160_ -> p_185160_.updateTyped(opticfinder, p_185162_ -> { -- p_185162_.write().map(p_185164_ -> p_185164_.getMapValues().map((Function)(p_185169_ -> { -+ p_185162_.write().map(p_185164_ -> p_185164_.getMapValues().map((p_185169_ -> { - p_185169_.forEach((p_185166_, p_185167_) -> { - if (p_185167_.get("type").asString().result().isEmpty()) { - throw new IllegalStateException("Unable load old custom worlds."); + "WorldGenSettingsDisallowOldCustomWorldsFix_" + this.getOutputSchema().getVersionKey(), + type, + p_185160_ -> p_185160_.updateTyped(opticfinder, p_185162_ -> { +- p_185162_.write().map(p_185164_ -> p_185164_.getMapValues().map((Function)(p_185169_ -> { ++ p_185162_.write().map(p_185164_ -> p_185164_.getMapValues().map((p_185169_ -> { + p_185169_.forEach((p_185166_, p_185167_) -> { + if (p_185167_.get("type").asString().result().isEmpty()) { + throw new IllegalStateException("Unable load old custom worlds."); diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/Mob.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/Mob.java.patch index 44ca3769..3b385de1 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/Mob.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/Mob.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/world/entity/Mob.java +++ b/net/minecraft/world/entity/Mob.java @@ -1124,7 +1124,7 @@ - if (this.level() instanceof ServerLevel) { - SpawnEggItem spawneggitem = (SpawnEggItem)itemstack.getItem(); - Optional optional = spawneggitem.spawnOffspringFromSpawnEgg( -- p_21500_, this, this.getType(), (ServerLevel)this.level(), this.position(), itemstack -+ p_21500_, this, (EntityType)this.getType(), (ServerLevel)this.level(), this.position(), itemstack - ); - optional.ifPresent(p_21476_ -> this.onOffspringSpawnedFromEgg(p_21500_, p_21476_)); - return optional.isPresent() ? InteractionResult.SUCCESS : InteractionResult.PASS; + if (this.level() instanceof ServerLevel) { + SpawnEggItem spawneggitem = (SpawnEggItem)itemstack.getItem(); + Optional optional = spawneggitem.spawnOffspringFromSpawnEgg( +- p_21500_, this, this.getType(), (ServerLevel)this.level(), this.position(), itemstack ++ p_21500_, this, (EntityType)this.getType(), (ServerLevel)this.level(), this.position(), itemstack + ); + optional.ifPresent(p_21476_ -> this.onOffspringSpawnedFromEgg(p_21500_, p_21476_)); + return optional.isPresent() ? InteractionResult.SUCCESS : InteractionResult.PASS; diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/SpawnPlacements.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/SpawnPlacements.java.patch index 97ef0ac9..6d90ccf7 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/SpawnPlacements.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/SpawnPlacements.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/world/entity/SpawnPlacements.java +++ b/net/minecraft/world/entity/SpawnPlacements.java @@ -65,7 +65,7 @@ - EntityType p_217075_, ServerLevelAccessor p_217076_, MobSpawnType p_217077_, BlockPos p_217078_, RandomSource p_217079_ - ) { - SpawnPlacements.Data spawnplacements$data = DATA_BY_TYPE.get(p_217075_); -- return spawnplacements$data == null || spawnplacements$data.predicate.test(p_217075_, p_217076_, p_217077_, p_217078_, p_217079_); -+ return spawnplacements$data == null || ((SpawnPredicate)spawnplacements$data.predicate).test(p_217075_, p_217076_, p_217077_, p_217078_, p_217079_); - } + EntityType p_217075_, ServerLevelAccessor p_217076_, MobSpawnType p_217077_, BlockPos p_217078_, RandomSource p_217079_ + ) { + SpawnPlacements.Data spawnplacements$data = DATA_BY_TYPE.get(p_217075_); +- return spawnplacements$data == null || spawnplacements$data.predicate.test(p_217075_, p_217076_, p_217077_, p_217078_, p_217079_); ++ return spawnplacements$data == null || ((SpawnPredicate)spawnplacements$data.predicate).test(p_217075_, p_217076_, p_217077_, p_217078_, p_217079_); + } - static { + static { diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/Brain.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/Brain.java.patch index 5f0cc1eb..a74aaa09 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/Brain.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/Brain.java.patch @@ -1,28 +1,28 @@ --- a/net/minecraft/world/entity/ai/Brain.java +++ b/net/minecraft/world/entity/ai/Brain.java -@@ -194,14 +194,14 @@ - if (optional == null) { - throw new IllegalStateException("Unregistered memory fetched: " + p_21953_); - } else { -- return optional.map(ExpirableValue::getValue); -+ return (Optional)optional.map(ExpirableValue::getValue); - } - } +@@ -196,14 +196,14 @@ + if (optional == null) { + throw new IllegalStateException("Unregistered memory fetched: " + p_21953_); + } else { +- return optional.map(ExpirableValue::getValue); ++ return (Optional)optional.map(ExpirableValue::getValue); + } + } - @Nullable - public Optional getMemoryInternal(MemoryModuleType p_259344_) { - Optional> optional = this.memories.get(p_259344_); -- return optional == null ? null : optional.map(ExpirableValue::getValue); -+ return optional == null ? null : (Optional)optional.map(ExpirableValue::getValue); - } + @Nullable + public Optional getMemoryInternal(MemoryModuleType p_259344_) { + Optional> optional = this.memories.get(p_259344_); +- return optional == null ? null : optional.map(ExpirableValue::getValue); ++ return optional == null ? null : (Optional)optional.map(ExpirableValue::getValue); + } - public long getTimeUntilExpiry(MemoryModuleType p_147342_) { -@@ -495,7 +495,7 @@ - private final Optional> value; + public long getTimeUntilExpiry(MemoryModuleType p_147342_) { +@@ -497,7 +497,7 @@ + private final Optional> value; - static Brain.MemoryValue createUnchecked(MemoryModuleType p_22060_, Optional> p_22061_) { -- return new Brain.MemoryValue<>(p_22060_, p_22061_); -+ return new Brain.MemoryValue(p_22060_, (Optional>)p_22061_); - } + static Brain.MemoryValue createUnchecked(MemoryModuleType p_22060_, Optional> p_22061_) { +- return new Brain.MemoryValue<>(p_22060_, p_22061_); ++ return new Brain.MemoryValue(p_22060_, (Optional>)p_22061_); + } - MemoryValue(MemoryModuleType p_22033_, Optional> p_22034_) { + MemoryValue(MemoryModuleType p_22033_, Optional> p_22034_) { diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/AcquirePoi.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/AcquirePoi.java.patch index 9b39d430..fb241c5a 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/AcquirePoi.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/AcquirePoi.java.patch @@ -1,20 +1,20 @@ --- a/net/minecraft/world/entity/ai/behavior/AcquirePoi.java +++ b/net/minecraft/world/entity/ai/behavior/AcquirePoi.java @@ -47,7 +47,7 @@ - MutableLong mutablelong = new MutableLong(0L); - Long2ObjectMap long2objectmap = new Long2ObjectOpenHashMap<>(); - OneShot oneshot = BehaviorBuilder.create( -- p_258276_ -> p_258276_.group(p_258276_.absent(p_260194_)) -+ p_258276_ -> p_258276_.group(p_258276_.absent(p_260194_)) - .apply( - p_258276_, - p_258300_ -> (p_258292_, p_258293_, p_258294_) -> { + MutableLong mutablelong = new MutableLong(0L); + Long2ObjectMap long2objectmap = new Long2ObjectOpenHashMap<>(); + OneShot oneshot = BehaviorBuilder.create( +- p_258276_ -> p_258276_.group(p_258276_.absent(p_260194_)) ++ p_258276_ -> p_258276_.group(p_258276_.absent(p_260194_)) + .apply( + p_258276_, + p_258300_ -> (p_258292_, p_258293_, p_258294_) -> { @@ -103,7 +103,7 @@ - ); - return p_260194_ == p_259129_ - ? oneshot -- : BehaviorBuilder.create(p_258269_ -> p_258269_.group(p_258269_.absent(p_259129_)).apply(p_258269_, p_258302_ -> oneshot)); -+ : BehaviorBuilder.create(p_258269_ -> p_258269_.group(p_258269_.absent(p_259129_)).apply(p_258269_, p_258302_ -> oneshot)); - } + ); + return p_260194_ == p_259129_ + ? oneshot +- : BehaviorBuilder.create(p_258269_ -> p_258269_.group(p_258269_.absent(p_259129_)).apply(p_258269_, p_258302_ -> oneshot)); ++ : BehaviorBuilder.create(p_258269_ -> p_258269_.group(p_258269_.absent(p_259129_)).apply(p_258269_, p_258302_ -> oneshot)); + } - @Nullable + @Nullable diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/AssignProfessionFromJobSite.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/AssignProfessionFromJobSite.java.patch index 54df9783..118cc433 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/AssignProfessionFromJobSite.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/AssignProfessionFromJobSite.java.patch @@ -2,10 +2,10 @@ +++ b/net/minecraft/world/entity/ai/behavior/AssignProfessionFromJobSite.java @@ -15,7 +15,7 @@ public class AssignProfessionFromJobSite { - public static BehaviorControl create() { - return BehaviorBuilder.create( -- p_258312_ -> p_258312_.group( -+ p_258312_ -> p_258312_.group( - p_258312_.present(MemoryModuleType.POTENTIAL_JOB_SITE), p_258312_.registered(MemoryModuleType.JOB_SITE) - ) - .apply( + public static BehaviorControl create() { + return BehaviorBuilder.create( +- p_258312_ -> p_258312_.group( ++ p_258312_ -> p_258312_.group( + p_258312_.present(MemoryModuleType.POTENTIAL_JOB_SITE), p_258312_.registered(MemoryModuleType.JOB_SITE) + ) + .apply( diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/BabyFollowAdult.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/BabyFollowAdult.java.patch index df3eb429..15106e59 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/BabyFollowAdult.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/BabyFollowAdult.java.patch @@ -2,10 +2,10 @@ +++ b/net/minecraft/world/entity/ai/behavior/BabyFollowAdult.java @@ -17,7 +17,7 @@ - public static OneShot create(UniformInt p_259321_, Function p_259190_) { - return BehaviorBuilder.create( -- p_258331_ -> p_258331_.group( -+ p_258331_ -> p_258331_.group( - p_258331_.present(MemoryModuleType.NEAREST_VISIBLE_ADULT), - p_258331_.registered(MemoryModuleType.LOOK_TARGET), - p_258331_.absent(MemoryModuleType.WALK_TARGET) + public static OneShot create(UniformInt p_259321_, Function p_259190_) { + return BehaviorBuilder.create( +- p_258331_ -> p_258331_.group( ++ p_258331_ -> p_258331_.group( + p_258331_.present(MemoryModuleType.NEAREST_VISIBLE_ADULT), + p_258331_.registered(MemoryModuleType.LOOK_TARGET), + p_258331_.absent(MemoryModuleType.WALK_TARGET) diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/BackUpIfTooClose.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/BackUpIfTooClose.java.patch index 9948d899..031908ad 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/BackUpIfTooClose.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/BackUpIfTooClose.java.patch @@ -2,10 +2,10 @@ +++ b/net/minecraft/world/entity/ai/behavior/BackUpIfTooClose.java @@ -12,7 +12,7 @@ public class BackUpIfTooClose { - public static OneShot create(int p_259782_, float p_259071_) { - return BehaviorBuilder.create( -- p_260278_ -> p_260278_.group( -+ p_260278_ -> p_260278_.group( - p_260278_.absent(MemoryModuleType.WALK_TARGET), - p_260278_.registered(MemoryModuleType.LOOK_TARGET), - p_260278_.present(MemoryModuleType.ATTACK_TARGET), + public static OneShot create(int p_259782_, float p_259071_) { + return BehaviorBuilder.create( +- p_260278_ -> p_260278_.group( ++ p_260278_ -> p_260278_.group( + p_260278_.absent(MemoryModuleType.WALK_TARGET), + p_260278_.registered(MemoryModuleType.LOOK_TARGET), + p_260278_.present(MemoryModuleType.ATTACK_TARGET), diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/BecomePassiveIfMemoryPresent.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/BecomePassiveIfMemoryPresent.java.patch index 50b458d8..74a3ac05 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/BecomePassiveIfMemoryPresent.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/BecomePassiveIfMemoryPresent.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/world/entity/ai/behavior/BecomePassiveIfMemoryPresent.java +++ b/net/minecraft/world/entity/ai/behavior/BecomePassiveIfMemoryPresent.java @@ -18,7 +18,7 @@ - p_259944_, - p_259944_.point( - () -> "[BecomePassive if " + p_259988_ + " present]", -- (Function3>)(p_260120_, p_259674_, p_259822_) -> (p_260328_, p_259412_, p_259725_) -> { -+ (p_260120_, p_259674_, p_259822_) -> (p_260328_, p_259412_, p_259725_) -> { - p_259674_.setWithExpiry(true, (long)p_260143_); - p_260120_.erase(); - return true; + p_259944_, + p_259944_.point( + () -> "[BecomePassive if " + p_259988_ + " present]", +- (Function3>)(p_260120_, p_259674_, p_259822_) -> (p_260328_, p_259412_, p_259725_) -> { ++ (p_260120_, p_259674_, p_259822_) -> (p_260328_, p_259412_, p_259725_) -> { + p_259674_.setWithExpiry(true, (long)p_260143_); + p_260120_.erase(); + return true; diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/CopyMemoryWithExpiry.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/CopyMemoryWithExpiry.java.patch index 36bef43d..15beb7aa 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/CopyMemoryWithExpiry.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/CopyMemoryWithExpiry.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/world/entity/ai/behavior/CopyMemoryWithExpiry.java +++ b/net/minecraft/world/entity/ai/behavior/CopyMemoryWithExpiry.java @@ -13,7 +13,7 @@ - Predicate p_260270_, MemoryModuleType p_260344_, MemoryModuleType p_260014_, UniformInt p_259596_ - ) { - return BehaviorBuilder.create( -- p_260141_ -> p_260141_.group(p_260141_.present(p_260344_), p_260141_.absent(p_260014_)) -+ p_260141_ -> p_260141_.group(p_260141_.present(p_260344_), p_260141_.absent(p_260014_)) - .apply(p_260141_, (p_259306_, p_259907_) -> (p_264887_, p_264888_, p_264889_) -> { - if (!p_260270_.test(p_264888_)) { - return false; + Predicate p_260270_, MemoryModuleType p_260344_, MemoryModuleType p_260014_, UniformInt p_259596_ + ) { + return BehaviorBuilder.create( +- p_260141_ -> p_260141_.group(p_260141_.present(p_260344_), p_260141_.absent(p_260014_)) ++ p_260141_ -> p_260141_.group(p_260141_.present(p_260344_), p_260141_.absent(p_260014_)) + .apply(p_260141_, (p_259306_, p_259907_) -> (p_264887_, p_264888_, p_264889_) -> { + if (!p_260270_.test(p_264888_)) { + return false; diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/DismountOrSkipMounting.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/DismountOrSkipMounting.java.patch index 7ec6c667..6d6f5b3f 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/DismountOrSkipMounting.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/DismountOrSkipMounting.java.patch @@ -2,10 +2,10 @@ +++ b/net/minecraft/world/entity/ai/behavior/DismountOrSkipMounting.java @@ -11,7 +11,7 @@ public class DismountOrSkipMounting { - public static BehaviorControl create(int p_259945_, BiPredicate p_259837_) { - return BehaviorBuilder.create( -- p_259780_ -> p_259780_.group(p_259780_.registered(MemoryModuleType.RIDE_TARGET)) -+ p_259780_ -> p_259780_.group(p_259780_.registered(MemoryModuleType.RIDE_TARGET)) - .apply(p_259780_, p_259326_ -> (p_259287_, p_259246_, p_259462_) -> { - Entity entity = p_259246_.getVehicle(); - Entity entity1 = p_259780_.tryGet(p_259326_).orElse(null); + public static BehaviorControl create(int p_259945_, BiPredicate p_259837_) { + return BehaviorBuilder.create( +- p_259780_ -> p_259780_.group(p_259780_.registered(MemoryModuleType.RIDE_TARGET)) ++ p_259780_ -> p_259780_.group(p_259780_.registered(MemoryModuleType.RIDE_TARGET)) + .apply(p_259780_, p_259326_ -> (p_259287_, p_259246_, p_259462_) -> { + Entity entity = p_259246_.getVehicle(); + Entity entity1 = p_259780_.tryGet(p_259326_).orElse(null); diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/EraseMemoryIf.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/EraseMemoryIf.java.patch index db9cf309..507d4c13 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/EraseMemoryIf.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/EraseMemoryIf.java.patch @@ -2,10 +2,10 @@ +++ b/net/minecraft/world/entity/ai/behavior/EraseMemoryIf.java @@ -10,7 +10,7 @@ public class EraseMemoryIf { - public static BehaviorControl create(Predicate p_260241_, MemoryModuleType p_259406_) { - return BehaviorBuilder.create( -- p_260008_ -> p_260008_.group(p_260008_.present(p_259406_)).apply(p_260008_, p_259127_ -> (p_259033_, p_259929_, p_260086_) -> { -+ p_260008_ -> p_260008_.group(p_260008_.present(p_259406_)).apply(p_260008_, p_259127_ -> (p_259033_, p_259929_, p_260086_) -> { - if (p_260241_.test(p_259929_)) { - p_259127_.erase(); - return true; + public static BehaviorControl create(Predicate p_260241_, MemoryModuleType p_259406_) { + return BehaviorBuilder.create( +- p_260008_ -> p_260008_.group(p_260008_.present(p_259406_)).apply(p_260008_, p_259127_ -> (p_259033_, p_259929_, p_260086_) -> { ++ p_260008_ -> p_260008_.group(p_260008_.present(p_259406_)).apply(p_260008_, p_259127_ -> (p_259033_, p_259929_, p_260086_) -> { + if (p_260241_.test(p_259929_)) { + p_259127_.erase(); + return true; diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/GoToClosestVillage.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/GoToClosestVillage.java.patch index 74732a7f..6f8cde02 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/GoToClosestVillage.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/GoToClosestVillage.java.patch @@ -2,10 +2,10 @@ +++ b/net/minecraft/world/entity/ai/behavior/GoToClosestVillage.java @@ -15,7 +15,7 @@ public class GoToClosestVillage { - public static BehaviorControl create(float p_260342_, int p_259691_) { - return BehaviorBuilder.create( -- p_258357_ -> p_258357_.group(p_258357_.absent(MemoryModuleType.WALK_TARGET)) -+ p_258357_ -> p_258357_.group(p_258357_.absent(MemoryModuleType.WALK_TARGET)) - .apply(p_258357_, p_258366_ -> (p_274970_, p_274971_, p_274972_) -> { - if (p_274970_.isVillage(p_274971_.blockPosition())) { - return false; + public static BehaviorControl create(float p_260342_, int p_259691_) { + return BehaviorBuilder.create( +- p_258357_ -> p_258357_.group(p_258357_.absent(MemoryModuleType.WALK_TARGET)) ++ p_258357_ -> p_258357_.group(p_258357_.absent(MemoryModuleType.WALK_TARGET)) + .apply( + p_258357_, + p_258366_ -> (p_274970_, p_274971_, p_274972_) -> { diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/GoToTargetLocation.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/GoToTargetLocation.java.patch index 1f32dd8b..0527bcad 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/GoToTargetLocation.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/GoToTargetLocation.java.patch @@ -2,10 +2,10 @@ +++ b/net/minecraft/world/entity/ai/behavior/GoToTargetLocation.java @@ -20,7 +20,7 @@ - public static OneShot create(MemoryModuleType p_259938_, int p_259740_, float p_259957_) { - return BehaviorBuilder.create( -- p_259997_ -> p_259997_.group( -+ p_259997_ -> p_259997_.group( - p_259997_.present(p_259938_), - p_259997_.absent(MemoryModuleType.ATTACK_TARGET), - p_259997_.absent(MemoryModuleType.WALK_TARGET), + public static OneShot create(MemoryModuleType p_259938_, int p_259740_, float p_259957_) { + return BehaviorBuilder.create( +- p_259997_ -> p_259997_.group( ++ p_259997_ -> p_259997_.group( + p_259997_.present(p_259938_), + p_259997_.absent(MemoryModuleType.ATTACK_TARGET), + p_259997_.absent(MemoryModuleType.WALK_TARGET), diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/InsideBrownianWalk.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/InsideBrownianWalk.java.patch index 14db775f..313050f5 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/InsideBrownianWalk.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/InsideBrownianWalk.java.patch @@ -2,10 +2,10 @@ +++ b/net/minecraft/world/entity/ai/behavior/InsideBrownianWalk.java @@ -14,7 +14,7 @@ public class InsideBrownianWalk { - public static BehaviorControl create(float p_259775_) { - return BehaviorBuilder.create( -- p_258399_ -> p_258399_.group(p_258399_.absent(MemoryModuleType.WALK_TARGET)) -+ p_258399_ -> p_258399_.group(p_258399_.absent(MemoryModuleType.WALK_TARGET)) - .apply( - p_258399_, - p_258397_ -> (p_258393_, p_258394_, p_258395_) -> { + public static BehaviorControl create(float p_259775_) { + return BehaviorBuilder.create( +- p_258399_ -> p_258399_.group(p_258399_.absent(MemoryModuleType.WALK_TARGET)) ++ p_258399_ -> p_258399_.group(p_258399_.absent(MemoryModuleType.WALK_TARGET)) + .apply( + p_258399_, + p_258397_ -> (p_258393_, p_258394_, p_258395_) -> { diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/InteractWith.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/InteractWith.java.patch index 202ae46c..24ae5f74 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/InteractWith.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/InteractWith.java.patch @@ -1,20 +1,20 @@ --- a/net/minecraft/world/entity/ai/behavior/InteractWith.java +++ b/net/minecraft/world/entity/ai/behavior/InteractWith.java @@ -30,7 +30,7 @@ - int i = p_259564_ * p_259564_; - Predicate predicate = p_308599_ -> p_259366_.equals(p_308599_.getType()) && p_260254_.test((T)p_308599_); - return BehaviorBuilder.create( -- p_258426_ -> p_258426_.group( -+ p_258426_ -> p_258426_.group( - p_258426_.registered(p_260229_), - p_258426_.registered(MemoryModuleType.LOOK_TARGET), - p_258426_.absent(MemoryModuleType.WALK_TARGET), + int i = p_259564_ * p_259564_; + Predicate predicate = p_308599_ -> p_259366_.equals(p_308599_.getType()) && p_260254_.test((T)p_308599_); + return BehaviorBuilder.create( +- p_258426_ -> p_258426_.group( ++ p_258426_ -> p_258426_.group( + p_258426_.registered(p_260229_), + p_258426_.registered(MemoryModuleType.LOOK_TARGET), + p_258426_.absent(MemoryModuleType.WALK_TARGET), @@ -45,7 +45,7 @@ - p_258419_ -> p_258419_.distanceToSqr(p_258414_) <= (double)i && predicate.test(p_258419_) - ); - optional.ifPresent(p_258432_ -> { -- p_258439_.set(p_258432_); -+ p_258439_.set((T)p_258432_); - p_258440_.set(new EntityTracker(p_258432_, true)); - p_258441_.set(new WalkTarget(new EntityTracker(p_258432_, false), p_259369_, p_259065_)); - }); + p_258419_ -> p_258419_.distanceToSqr(p_258414_) <= (double)i && predicate.test(p_258419_) + ); + optional.ifPresent(p_258432_ -> { +- p_258439_.set(p_258432_); ++ p_258439_.set((T)p_258432_); + p_258440_.set(new EntityTracker(p_258432_, true)); + p_258441_.set(new WalkTarget(new EntityTracker(p_258432_, false), p_259369_, p_259065_)); + }); diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/InteractWithDoor.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/InteractWithDoor.java.patch index abc0ae2c..834ef592 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/InteractWithDoor.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/InteractWithDoor.java.patch @@ -1,20 +1,20 @@ --- a/net/minecraft/world/entity/ai/behavior/InteractWithDoor.java +++ b/net/minecraft/world/entity/ai/behavior/InteractWithDoor.java @@ -35,7 +35,7 @@ - MutableObject mutableobject = new MutableObject<>(null); - MutableInt mutableint = new MutableInt(0); - return BehaviorBuilder.create( -- p_258474_ -> p_258474_.group( -+ p_258474_ -> p_258474_.group( - p_258474_.present(MemoryModuleType.PATH), - p_258474_.registered(MemoryModuleType.DOORS_TO_CLOSE), - p_258474_.registered(MemoryModuleType.NEAREST_LIVING_ENTITIES) -@@ -161,7 +161,7 @@ - MemoryAccessor> p_262178_, Optional> p_261639_, ServerLevel p_261528_, BlockPos p_261874_ - ) { - GlobalPos globalpos = GlobalPos.of(p_261528_.dimension(), p_261874_); -- return Optional.of(p_261639_.map((Function, ? extends Set>)(p_261437_ -> { -+ return Optional.of(p_261639_.map((p_261437_ -> { - p_261437_.add(globalpos); - return p_261437_; - })).orElseGet(() -> { + MutableObject mutableobject = new MutableObject<>(null); + MutableInt mutableint = new MutableInt(0); + return BehaviorBuilder.create( +- p_258474_ -> p_258474_.group( ++ p_258474_ -> p_258474_.group( + p_258474_.present(MemoryModuleType.PATH), + p_258474_.registered(MemoryModuleType.DOORS_TO_CLOSE), + p_258474_.registered(MemoryModuleType.NEAREST_LIVING_ENTITIES) +@@ -163,7 +163,7 @@ + MemoryAccessor> p_262178_, Optional> p_261639_, ServerLevel p_261528_, BlockPos p_261874_ + ) { + GlobalPos globalpos = GlobalPos.of(p_261528_.dimension(), p_261874_); +- return Optional.of(p_261639_.map((Function, ? extends Set>)(p_261437_ -> { ++ return Optional.of(p_261639_.map((p_261437_ -> { + p_261437_.add(globalpos); + return p_261437_; + })).orElseGet(() -> { diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/LocateHidingPlace.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/LocateHidingPlace.java.patch index 7242fbc5..c319e1ba 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/LocateHidingPlace.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/LocateHidingPlace.java.patch @@ -2,10 +2,10 @@ +++ b/net/minecraft/world/entity/ai/behavior/LocateHidingPlace.java @@ -15,7 +15,7 @@ public class LocateHidingPlace { - public static OneShot create(int p_259202_, float p_259881_, int p_259982_) { - return BehaviorBuilder.create( -- p_258505_ -> p_258505_.group( -+ p_258505_ -> p_258505_.group( - p_258505_.absent(MemoryModuleType.WALK_TARGET), - p_258505_.registered(MemoryModuleType.HOME), - p_258505_.registered(MemoryModuleType.HIDING_PLACE), + public static OneShot create(int p_259202_, float p_259881_, int p_259982_) { + return BehaviorBuilder.create( +- p_258505_ -> p_258505_.group( ++ p_258505_ -> p_258505_.group( + p_258505_.absent(MemoryModuleType.WALK_TARGET), + p_258505_.registered(MemoryModuleType.HOME), + p_258505_.registered(MemoryModuleType.HIDING_PLACE), diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/MeleeAttack.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/MeleeAttack.java.patch index 6b7173c7..ad06b1de 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/MeleeAttack.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/MeleeAttack.java.patch @@ -2,10 +2,10 @@ +++ b/net/minecraft/world/entity/ai/behavior/MeleeAttack.java @@ -15,7 +15,7 @@ public class MeleeAttack { - public static OneShot create(int p_259758_) { - return BehaviorBuilder.create( -- p_258526_ -> p_258526_.group( -+ p_258526_ -> p_258526_.group( - p_258526_.registered(MemoryModuleType.LOOK_TARGET), - p_258526_.present(MemoryModuleType.ATTACK_TARGET), - p_258526_.absent(MemoryModuleType.ATTACK_COOLING_DOWN), + public static OneShot create(int p_259758_) { + return BehaviorBuilder.create( +- p_258526_ -> p_258526_.group( ++ p_258526_ -> p_258526_.group( + p_258526_.registered(MemoryModuleType.LOOK_TARGET), + p_258526_.present(MemoryModuleType.ATTACK_TARGET), + p_258526_.absent(MemoryModuleType.ATTACK_COOLING_DOWN), diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/Mount.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/Mount.java.patch index 4155a7c0..c7ddf95c 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/Mount.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/Mount.java.patch @@ -2,10 +2,10 @@ +++ b/net/minecraft/world/entity/ai/behavior/Mount.java @@ -13,7 +13,7 @@ - public static BehaviorControl create(float p_259363_) { - return BehaviorBuilder.create( -- p_259880_ -> p_259880_.group( -+ p_259880_ -> p_259880_.group( - p_259880_.registered(MemoryModuleType.LOOK_TARGET), - p_259880_.absent(MemoryModuleType.WALK_TARGET), - p_259880_.present(MemoryModuleType.RIDE_TARGET) + public static BehaviorControl create(float p_259363_) { + return BehaviorBuilder.create( +- p_259880_ -> p_259880_.group( ++ p_259880_ -> p_259880_.group( + p_259880_.registered(MemoryModuleType.LOOK_TARGET), + p_259880_.absent(MemoryModuleType.WALK_TARGET), + p_259880_.present(MemoryModuleType.RIDE_TARGET) diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/MoveToSkySeeingSpot.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/MoveToSkySeeingSpot.java.patch index 567b6d64..f98f822f 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/MoveToSkySeeingSpot.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/MoveToSkySeeingSpot.java.patch @@ -2,10 +2,10 @@ +++ b/net/minecraft/world/entity/ai/behavior/MoveToSkySeeingSpot.java @@ -16,7 +16,7 @@ public class MoveToSkySeeingSpot { - public static OneShot create(float p_259860_) { - return BehaviorBuilder.create( -- p_258543_ -> p_258543_.group(p_258543_.absent(MemoryModuleType.WALK_TARGET)) -+ p_258543_ -> p_258543_.group(p_258543_.absent(MemoryModuleType.WALK_TARGET)) - .apply(p_258543_, p_258545_ -> (p_308637_, p_308638_, p_308639_) -> { - if (p_308637_.canSeeSky(p_308638_.blockPosition())) { - return false; + public static OneShot create(float p_259860_) { + return BehaviorBuilder.create( +- p_258543_ -> p_258543_.group(p_258543_.absent(MemoryModuleType.WALK_TARGET)) ++ p_258543_ -> p_258543_.group(p_258543_.absent(MemoryModuleType.WALK_TARGET)) + .apply(p_258543_, p_258545_ -> (p_308637_, p_308638_, p_308639_) -> { + if (p_308637_.canSeeSky(p_308638_.blockPosition())) { + return false; diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/PlayTagWithOtherKids.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/PlayTagWithOtherKids.java.patch index bf9228a2..0e170a33 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/PlayTagWithOtherKids.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/PlayTagWithOtherKids.java.patch @@ -2,10 +2,10 @@ +++ b/net/minecraft/world/entity/ai/behavior/PlayTagWithOtherKids.java @@ -27,7 +27,7 @@ - public static BehaviorControl create() { - return BehaviorBuilder.create( -- p_258563_ -> p_258563_.group( -+ p_258563_ -> p_258563_.group( - p_258563_.present(MemoryModuleType.VISIBLE_VILLAGER_BABIES), - p_258563_.absent(MemoryModuleType.WALK_TARGET), - p_258563_.registered(MemoryModuleType.LOOK_TARGET), + public static BehaviorControl create() { + return BehaviorBuilder.create( +- p_258563_ -> p_258563_.group( ++ p_258563_ -> p_258563_.group( + p_258563_.present(MemoryModuleType.VISIBLE_VILLAGER_BABIES), + p_258563_.absent(MemoryModuleType.WALK_TARGET), + p_258563_.registered(MemoryModuleType.LOOK_TARGET), diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/PoiCompetitorScan.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/PoiCompetitorScan.java.patch index df8008ab..9908b911 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/PoiCompetitorScan.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/PoiCompetitorScan.java.patch @@ -2,10 +2,10 @@ +++ b/net/minecraft/world/entity/ai/behavior/PoiCompetitorScan.java @@ -16,7 +16,7 @@ public class PoiCompetitorScan { - public static BehaviorControl create() { - return BehaviorBuilder.create( -- p_258576_ -> p_258576_.group( -+ p_258576_ -> p_258576_.group( - p_258576_.present(MemoryModuleType.JOB_SITE), p_258576_.present(MemoryModuleType.NEAREST_LIVING_ENTITIES) - ) - .apply( + public static BehaviorControl create() { + return BehaviorBuilder.create( +- p_258576_ -> p_258576_.group( ++ p_258576_ -> p_258576_.group( + p_258576_.present(MemoryModuleType.JOB_SITE), p_258576_.present(MemoryModuleType.NEAREST_LIVING_ENTITIES) + ) + .apply( diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/RandomStroll.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/RandomStroll.java.patch index 486ff275..9a6558f8 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/RandomStroll.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/RandomStroll.java.patch @@ -2,10 +2,10 @@ +++ b/net/minecraft/world/entity/ai/behavior/RandomStroll.java @@ -45,7 +45,7 @@ - private static OneShot strollFlyOrSwim(float p_260030_, Function p_259912_, Predicate p_259088_) { - return BehaviorBuilder.create( -- p_258620_ -> p_258620_.group(p_258620_.absent(MemoryModuleType.WALK_TARGET)) -+ p_258620_ -> p_258620_.group(p_258620_.absent(MemoryModuleType.WALK_TARGET)) - .apply(p_258620_, p_258600_ -> (p_258610_, p_258611_, p_258612_) -> { - if (!p_259088_.test(p_258611_)) { - return false; + private static OneShot strollFlyOrSwim(float p_260030_, Function p_259912_, Predicate p_259088_) { + return BehaviorBuilder.create( +- p_258620_ -> p_258620_.group(p_258620_.absent(MemoryModuleType.WALK_TARGET)) ++ p_258620_ -> p_258620_.group(p_258620_.absent(MemoryModuleType.WALK_TARGET)) + .apply(p_258620_, p_258600_ -> (p_258610_, p_258611_, p_258612_) -> { + if (!p_259088_.test(p_258611_)) { + return false; diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/ReactToBell.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/ReactToBell.java.patch index f089583c..b9795b19 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/ReactToBell.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/ReactToBell.java.patch @@ -2,10 +2,10 @@ +++ b/net/minecraft/world/entity/ai/behavior/ReactToBell.java @@ -11,7 +11,7 @@ public class ReactToBell { - public static BehaviorControl create() { - return BehaviorBuilder.create( -- p_259349_ -> p_259349_.group(p_259349_.present(MemoryModuleType.HEARD_BELL_TIME)) -+ p_259349_ -> p_259349_.group(p_259349_.present(MemoryModuleType.HEARD_BELL_TIME)) - .apply(p_259349_, p_259472_ -> (p_308643_, p_308644_, p_308645_) -> { - Raid raid = p_308643_.getRaidAt(p_308644_.blockPosition()); - if (raid == null) { + public static BehaviorControl create() { + return BehaviorBuilder.create( +- p_259349_ -> p_259349_.group(p_259349_.present(MemoryModuleType.HEARD_BELL_TIME)) ++ p_259349_ -> p_259349_.group(p_259349_.present(MemoryModuleType.HEARD_BELL_TIME)) + .apply(p_259349_, p_259472_ -> (p_308643_, p_308644_, p_308645_) -> { + Raid raid = p_308643_.getRaidAt(p_308644_.blockPosition()); + if (raid == null) { diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/ResetProfession.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/ResetProfession.java.patch index 3a8e0ff0..7ede3c16 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/ResetProfession.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/ResetProfession.java.patch @@ -2,10 +2,10 @@ +++ b/net/minecraft/world/entity/ai/behavior/ResetProfession.java @@ -11,7 +11,7 @@ public class ResetProfession { - public static BehaviorControl create() { - return BehaviorBuilder.create( -- p_259684_ -> p_259684_.group(p_259684_.absent(MemoryModuleType.JOB_SITE)) -+ p_259684_ -> p_259684_.group(p_259684_.absent(MemoryModuleType.JOB_SITE)) - .apply( - p_259684_, - p_260035_ -> (p_260244_, p_260084_, p_259597_) -> { + public static BehaviorControl create() { + return BehaviorBuilder.create( +- p_259684_ -> p_259684_.group(p_259684_.absent(MemoryModuleType.JOB_SITE)) ++ p_259684_ -> p_259684_.group(p_259684_.absent(MemoryModuleType.JOB_SITE)) + .apply( + p_259684_, + p_260035_ -> (p_260244_, p_260084_, p_259597_) -> { diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/RingBell.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/RingBell.java.patch index e7dab16c..bc4d94d4 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/RingBell.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/RingBell.java.patch @@ -2,10 +2,10 @@ +++ b/net/minecraft/world/entity/ai/behavior/RingBell.java @@ -17,7 +17,7 @@ - public static BehaviorControl create() { - return BehaviorBuilder.create( -- p_259094_ -> p_259094_.group(p_259094_.present(MemoryModuleType.MEETING_POINT)) -+ p_259094_ -> p_259094_.group(p_259094_.present(MemoryModuleType.MEETING_POINT)) - .apply(p_259094_, p_259028_ -> (p_259026_, p_260317_, p_260205_) -> { - if (p_259026_.random.nextFloat() <= 0.95F) { - return false; + public static BehaviorControl create() { + return BehaviorBuilder.create( +- p_259094_ -> p_259094_.group(p_259094_.present(MemoryModuleType.MEETING_POINT)) ++ p_259094_ -> p_259094_.group(p_259094_.present(MemoryModuleType.MEETING_POINT)) + .apply(p_259094_, p_259028_ -> (p_259026_, p_260317_, p_260205_) -> { + if (p_259026_.random.nextFloat() <= 0.95F) { + return false; diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/SetClosestHomeAsWalkTarget.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/SetClosestHomeAsWalkTarget.java.patch index 7fc6de84..b5332960 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/SetClosestHomeAsWalkTarget.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/SetClosestHomeAsWalkTarget.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/world/entity/ai/behavior/SetClosestHomeAsWalkTarget.java +++ b/net/minecraft/world/entity/ai/behavior/SetClosestHomeAsWalkTarget.java @@ -34,7 +34,7 @@ - Long2LongMap long2longmap = new Long2LongOpenHashMap(); - MutableLong mutablelong = new MutableLong(0L); - return BehaviorBuilder.create( -- p_258633_ -> p_258633_.group(p_258633_.absent(MemoryModuleType.WALK_TARGET), p_258633_.absent(MemoryModuleType.HOME)) -+ p_258633_ -> p_258633_.group(p_258633_.absent(MemoryModuleType.WALK_TARGET), p_258633_.absent(MemoryModuleType.HOME)) - .apply( - p_258633_, - (p_258626_, p_258627_) -> (p_258638_, p_258639_, p_258640_) -> { + Long2LongMap long2longmap = new Long2LongOpenHashMap(); + MutableLong mutablelong = new MutableLong(0L); + return BehaviorBuilder.create( +- p_258633_ -> p_258633_.group( ++ p_258633_ -> p_258633_.group( + p_258633_.absent(MemoryModuleType.WALK_TARGET), p_258633_.absent(MemoryModuleType.HOME) + ) + .apply( diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/SetEntityLookTarget.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/SetEntityLookTarget.java.patch index 18b5620f..0e543b65 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/SetEntityLookTarget.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/SetEntityLookTarget.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/world/entity/ai/behavior/SetEntityLookTarget.java +++ b/net/minecraft/world/entity/ai/behavior/SetEntityLookTarget.java @@ -27,7 +27,7 @@ - public static OneShot create(Predicate p_260088_, float p_259747_) { - float f = p_259747_ * p_259747_; - return BehaviorBuilder.create( -- p_258663_ -> p_258663_.group( -+ p_258663_ -> p_258663_.group( - p_258663_.absent(MemoryModuleType.LOOK_TARGET), p_258663_.present(MemoryModuleType.NEAREST_VISIBLE_LIVING_ENTITIES) - ) - .apply( + public static OneShot create(Predicate p_260088_, float p_259747_) { + float f = p_259747_ * p_259747_; + return BehaviorBuilder.create( +- p_258663_ -> p_258663_.group( ++ p_258663_ -> p_258663_.group( + p_258663_.absent(MemoryModuleType.LOOK_TARGET), p_258663_.present(MemoryModuleType.NEAREST_VISIBLE_LIVING_ENTITIES) + ) + .apply( diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/SetEntityLookTargetSometimes.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/SetEntityLookTargetSometimes.java.patch index 2c024993..8c6e0362 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/SetEntityLookTargetSometimes.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/SetEntityLookTargetSometimes.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/world/entity/ai/behavior/SetEntityLookTargetSometimes.java +++ b/net/minecraft/world/entity/ai/behavior/SetEntityLookTargetSometimes.java @@ -26,7 +26,7 @@ - float f = p_260336_ * p_260336_; - SetEntityLookTargetSometimes.Ticker setentitylooktargetsometimes$ticker = new SetEntityLookTargetSometimes.Ticker(p_259266_); - return BehaviorBuilder.create( -- p_259288_ -> p_259288_.group( -+ p_259288_ -> p_259288_.group( - p_259288_.absent(MemoryModuleType.LOOK_TARGET), p_259288_.present(MemoryModuleType.NEAREST_VISIBLE_LIVING_ENTITIES) - ) - .apply( + float f = p_260336_ * p_260336_; + SetEntityLookTargetSometimes.Ticker setentitylooktargetsometimes$ticker = new SetEntityLookTargetSometimes.Ticker(p_259266_); + return BehaviorBuilder.create( +- p_259288_ -> p_259288_.group( ++ p_259288_ -> p_259288_.group( + p_259288_.absent(MemoryModuleType.LOOK_TARGET), p_259288_.present(MemoryModuleType.NEAREST_VISIBLE_LIVING_ENTITIES) + ) + .apply( diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/SetHiddenState.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/SetHiddenState.java.patch index 1696c168..c1342aab 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/SetHiddenState.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/SetHiddenState.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/world/entity/ai/behavior/SetHiddenState.java +++ b/net/minecraft/world/entity/ai/behavior/SetHiddenState.java @@ -16,7 +16,7 @@ - int i = p_259244_ * 20; - MutableInt mutableint = new MutableInt(0); - return BehaviorBuilder.create( -- p_259055_ -> p_259055_.group( -+ p_259055_ -> p_259055_.group( - p_259055_.present(MemoryModuleType.HIDING_PLACE), p_259055_.present(MemoryModuleType.HEARD_BELL_TIME) - ) - .apply(p_259055_, (p_260296_, p_260145_) -> (p_308661_, p_308662_, p_308663_) -> { + int i = p_259244_ * 20; + MutableInt mutableint = new MutableInt(0); + return BehaviorBuilder.create( +- p_259055_ -> p_259055_.group( ++ p_259055_ -> p_259055_.group( + p_259055_.present(MemoryModuleType.HIDING_PLACE), p_259055_.present(MemoryModuleType.HEARD_BELL_TIME) + ) + .apply(p_259055_, (p_260296_, p_260145_) -> (p_308661_, p_308662_, p_308663_) -> { diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/SetLookAndInteract.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/SetLookAndInteract.java.patch index 62df72a6..1236cead 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/SetLookAndInteract.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/SetLookAndInteract.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/world/entity/ai/behavior/SetLookAndInteract.java +++ b/net/minecraft/world/entity/ai/behavior/SetLookAndInteract.java @@ -13,7 +13,7 @@ - public static BehaviorControl create(EntityType p_259642_, int p_259805_) { - int i = p_259805_ * p_259805_; - return BehaviorBuilder.create( -- p_258685_ -> p_258685_.group( -+ p_258685_ -> p_258685_.group( - p_258685_.registered(MemoryModuleType.LOOK_TARGET), - p_258685_.absent(MemoryModuleType.INTERACTION_TARGET), - p_258685_.present(MemoryModuleType.NEAREST_VISIBLE_LIVING_ENTITIES) + public static BehaviorControl create(EntityType p_259642_, int p_259805_) { + int i = p_259805_ * p_259805_; + return BehaviorBuilder.create( +- p_258685_ -> p_258685_.group( ++ p_258685_ -> p_258685_.group( + p_258685_.registered(MemoryModuleType.LOOK_TARGET), + p_258685_.absent(MemoryModuleType.INTERACTION_TARGET), + p_258685_.present(MemoryModuleType.NEAREST_VISIBLE_LIVING_ENTITIES) diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/SetWalkTargetAwayFrom.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/SetWalkTargetAwayFrom.java.patch index 4fe44444..96f1f138 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/SetWalkTargetAwayFrom.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/SetWalkTargetAwayFrom.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/world/entity/ai/behavior/SetWalkTargetAwayFrom.java +++ b/net/minecraft/world/entity/ai/behavior/SetWalkTargetAwayFrom.java @@ -26,7 +26,7 @@ - MemoryModuleType p_260057_, float p_259672_, int p_259866_, boolean p_259232_, Function p_259355_ - ) { - return BehaviorBuilder.create( -- p_259292_ -> p_259292_.group(p_259292_.registered(MemoryModuleType.WALK_TARGET), p_259292_.present(p_260057_)) -+ p_259292_ -> p_259292_.group(p_259292_.registered(MemoryModuleType.WALK_TARGET), p_259292_.present(p_260057_)) - .apply(p_259292_, (p_260063_, p_260053_) -> (p_259973_, p_259323_, p_259275_) -> { - Optional optional = p_259292_.tryGet(p_260063_); - if (optional.isPresent() && !p_259232_) { + MemoryModuleType p_260057_, float p_259672_, int p_259866_, boolean p_259232_, Function p_259355_ + ) { + return BehaviorBuilder.create( +- p_259292_ -> p_259292_.group(p_259292_.registered(MemoryModuleType.WALK_TARGET), p_259292_.present(p_260057_)) ++ p_259292_ -> p_259292_.group(p_259292_.registered(MemoryModuleType.WALK_TARGET), p_259292_.present(p_260057_)) + .apply(p_259292_, (p_260063_, p_260053_) -> (p_259973_, p_259323_, p_259275_) -> { + Optional optional = p_259292_.tryGet(p_260063_); + if (optional.isPresent() && !p_259232_) { diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/SetWalkTargetFromAttackTargetIfTargetOutOfReach.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/SetWalkTargetFromAttackTargetIfTargetOutOfReach.java.patch index fa03ff4c..e4911e7b 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/SetWalkTargetFromAttackTargetIfTargetOutOfReach.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/SetWalkTargetFromAttackTargetIfTargetOutOfReach.java.patch @@ -2,10 +2,10 @@ +++ b/net/minecraft/world/entity/ai/behavior/SetWalkTargetFromAttackTargetIfTargetOutOfReach.java @@ -20,7 +20,7 @@ - public static BehaviorControl create(Function p_259507_) { - return BehaviorBuilder.create( -- p_258687_ -> p_258687_.group( -+ p_258687_ -> p_258687_.group( - p_258687_.registered(MemoryModuleType.WALK_TARGET), - p_258687_.registered(MemoryModuleType.LOOK_TARGET), - p_258687_.present(MemoryModuleType.ATTACK_TARGET), + public static BehaviorControl create(Function p_259507_) { + return BehaviorBuilder.create( +- p_258687_ -> p_258687_.group( ++ p_258687_ -> p_258687_.group( + p_258687_.registered(MemoryModuleType.WALK_TARGET), + p_258687_.registered(MemoryModuleType.LOOK_TARGET), + p_258687_.present(MemoryModuleType.ATTACK_TARGET), diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/SetWalkTargetFromBlockMemory.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/SetWalkTargetFromBlockMemory.java.patch index 58f4ad1e..951990a6 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/SetWalkTargetFromBlockMemory.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/SetWalkTargetFromBlockMemory.java.patch @@ -2,10 +2,10 @@ +++ b/net/minecraft/world/entity/ai/behavior/SetWalkTargetFromBlockMemory.java @@ -15,7 +15,7 @@ public class SetWalkTargetFromBlockMemory { - public static OneShot create(MemoryModuleType p_259685_, float p_259842_, int p_259530_, int p_260360_, int p_259504_) { - return BehaviorBuilder.create( -- p_258717_ -> p_258717_.group( -+ p_258717_ -> p_258717_.group( - p_258717_.registered(MemoryModuleType.CANT_REACH_WALK_TARGET_SINCE), - p_258717_.absent(MemoryModuleType.WALK_TARGET), - p_258717_.present(p_259685_) + public static OneShot create(MemoryModuleType p_259685_, float p_259842_, int p_259530_, int p_260360_, int p_259504_) { + return BehaviorBuilder.create( +- p_258717_ -> p_258717_.group( ++ p_258717_ -> p_258717_.group( + p_258717_.registered(MemoryModuleType.CANT_REACH_WALK_TARGET_SINCE), + p_258717_.absent(MemoryModuleType.WALK_TARGET), + p_258717_.present(p_259685_) diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/SetWalkTargetFromLookTarget.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/SetWalkTargetFromLookTarget.java.patch index 0d24384e..9332c247 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/SetWalkTargetFromLookTarget.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/SetWalkTargetFromLookTarget.java.patch @@ -2,10 +2,10 @@ +++ b/net/minecraft/world/entity/ai/behavior/SetWalkTargetFromLookTarget.java @@ -16,7 +16,7 @@ - public static OneShot create(Predicate p_260341_, Function p_260269_, int p_259192_) { - return BehaviorBuilder.create( -- p_258748_ -> p_258748_.group( -+ p_258748_ -> p_258748_.group( - p_258748_.absent(MemoryModuleType.WALK_TARGET), p_258748_.present(MemoryModuleType.LOOK_TARGET) - ) - .apply(p_258748_, (p_258743_, p_258744_) -> (p_258736_, p_258737_, p_258738_) -> { + public static OneShot create(Predicate p_260341_, Function p_260269_, int p_259192_) { + return BehaviorBuilder.create( +- p_258748_ -> p_258748_.group( ++ p_258748_ -> p_258748_.group( + p_258748_.absent(MemoryModuleType.WALK_TARGET), p_258748_.present(MemoryModuleType.LOOK_TARGET) + ) + .apply(p_258748_, (p_258743_, p_258744_) -> (p_258736_, p_258737_, p_258738_) -> { diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/SocializeAtBell.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/SocializeAtBell.java.patch index 24737295..7cc55ab3 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/SocializeAtBell.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/SocializeAtBell.java.patch @@ -2,10 +2,10 @@ +++ b/net/minecraft/world/entity/ai/behavior/SocializeAtBell.java @@ -15,7 +15,7 @@ - public static OneShot create() { - return BehaviorBuilder.create( -- p_258755_ -> p_258755_.group( -+ p_258755_ -> p_258755_.group( - p_258755_.registered(MemoryModuleType.WALK_TARGET), - p_258755_.registered(MemoryModuleType.LOOK_TARGET), - p_258755_.present(MemoryModuleType.MEETING_POINT), + public static OneShot create() { + return BehaviorBuilder.create( +- p_258755_ -> p_258755_.group( ++ p_258755_ -> p_258755_.group( + p_258755_.registered(MemoryModuleType.WALK_TARGET), + p_258755_.registered(MemoryModuleType.LOOK_TARGET), + p_258755_.present(MemoryModuleType.MEETING_POINT), diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/StartAttacking.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/StartAttacking.java.patch index c704eb87..57cafa7a 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/StartAttacking.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/StartAttacking.java.patch @@ -2,10 +2,10 @@ +++ b/net/minecraft/world/entity/ai/behavior/StartAttacking.java @@ -17,7 +17,7 @@ - public static BehaviorControl create(Predicate p_259618_, Function> p_259435_) { - return BehaviorBuilder.create( -- p_258782_ -> p_258782_.group( -+ p_258782_ -> p_258782_.group( - p_258782_.absent(MemoryModuleType.ATTACK_TARGET), p_258782_.registered(MemoryModuleType.CANT_REACH_WALK_TARGET_SINCE) - ) - .apply(p_258782_, (p_258778_, p_258779_) -> (p_258773_, p_258774_, p_258775_) -> { + public static BehaviorControl create(Predicate p_259618_, Function> p_259435_) { + return BehaviorBuilder.create( +- p_258782_ -> p_258782_.group( ++ p_258782_ -> p_258782_.group( + p_258782_.absent(MemoryModuleType.ATTACK_TARGET), p_258782_.registered(MemoryModuleType.CANT_REACH_WALK_TARGET_SINCE) + ) + .apply(p_258782_, (p_258778_, p_258779_) -> (p_258773_, p_258774_, p_258775_) -> { diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/StartCelebratingIfTargetDead.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/StartCelebratingIfTargetDead.java.patch index 32b1b2d3..d5dcd240 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/StartCelebratingIfTargetDead.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/StartCelebratingIfTargetDead.java.patch @@ -2,10 +2,10 @@ +++ b/net/minecraft/world/entity/ai/behavior/StartCelebratingIfTargetDead.java @@ -12,7 +12,7 @@ public class StartCelebratingIfTargetDead { - public static BehaviorControl create(int p_259238_, BiPredicate p_259102_) { - return BehaviorBuilder.create( -- p_259600_ -> p_259600_.group( -+ p_259600_ -> p_259600_.group( - p_259600_.present(MemoryModuleType.ATTACK_TARGET), - p_259600_.registered(MemoryModuleType.ANGRY_AT), - p_259600_.absent(MemoryModuleType.CELEBRATE_LOCATION), + public static BehaviorControl create(int p_259238_, BiPredicate p_259102_) { + return BehaviorBuilder.create( +- p_259600_ -> p_259600_.group( ++ p_259600_ -> p_259600_.group( + p_259600_.present(MemoryModuleType.ATTACK_TARGET), + p_259600_.registered(MemoryModuleType.ANGRY_AT), + p_259600_.absent(MemoryModuleType.CELEBRATE_LOCATION), diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/StayCloseToTarget.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/StayCloseToTarget.java.patch index 792571dd..30c20721 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/StayCloseToTarget.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/StayCloseToTarget.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/world/entity/ai/behavior/StayCloseToTarget.java +++ b/net/minecraft/world/entity/ai/behavior/StayCloseToTarget.java @@ -15,7 +15,7 @@ - Function> p_272871_, Predicate p_273150_, int p_273536_, int p_273107_, float p_273745_ - ) { - return BehaviorBuilder.create( -- p_272460_ -> p_272460_.group( -+ p_272460_ -> p_272460_.group( - p_272460_.registered(MemoryModuleType.LOOK_TARGET), p_272460_.registered(MemoryModuleType.WALK_TARGET) - ) - .apply(p_272460_, (p_272466_, p_272467_) -> (p_260054_, p_260069_, p_259517_) -> { + Function> p_272871_, Predicate p_273150_, int p_273536_, int p_273107_, float p_273745_ + ) { + return BehaviorBuilder.create( +- p_272460_ -> p_272460_.group( ++ p_272460_ -> p_272460_.group( + p_272460_.registered(MemoryModuleType.LOOK_TARGET), p_272460_.registered(MemoryModuleType.WALK_TARGET) + ) + .apply(p_272460_, (p_272466_, p_272467_) -> (p_260054_, p_260069_, p_259517_) -> { diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/StopAttackingIfTargetInvalid.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/StopAttackingIfTargetInvalid.java.patch index a5477893..fa5b7591 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/StopAttackingIfTargetInvalid.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/StopAttackingIfTargetInvalid.java.patch @@ -2,10 +2,10 @@ +++ b/net/minecraft/world/entity/ai/behavior/StopAttackingIfTargetInvalid.java @@ -29,7 +29,7 @@ - public static BehaviorControl create(Predicate p_260357_, BiConsumer p_259568_, boolean p_260319_) { - return BehaviorBuilder.create( -- p_258801_ -> p_258801_.group( -+ p_258801_ -> p_258801_.group( - p_258801_.present(MemoryModuleType.ATTACK_TARGET), p_258801_.registered(MemoryModuleType.CANT_REACH_WALK_TARGET_SINCE) - ) - .apply( + public static BehaviorControl create(Predicate p_260357_, BiConsumer p_259568_, boolean p_260319_) { + return BehaviorBuilder.create( +- p_258801_ -> p_258801_.group( ++ p_258801_ -> p_258801_.group( + p_258801_.present(MemoryModuleType.ATTACK_TARGET), p_258801_.registered(MemoryModuleType.CANT_REACH_WALK_TARGET_SINCE) + ) + .apply( diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/StopBeingAngryIfTargetDead.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/StopBeingAngryIfTargetDead.java.patch index e6df544a..84d5c3bf 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/StopBeingAngryIfTargetDead.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/StopBeingAngryIfTargetDead.java.patch @@ -2,10 +2,10 @@ +++ b/net/minecraft/world/entity/ai/behavior/StopBeingAngryIfTargetDead.java @@ -13,7 +13,7 @@ public class StopBeingAngryIfTargetDead { - public static BehaviorControl create() { - return BehaviorBuilder.create( -- p_258814_ -> p_258814_.group(p_258814_.present(MemoryModuleType.ANGRY_AT)) -+ p_258814_ -> p_258814_.group(p_258814_.present(MemoryModuleType.ANGRY_AT)) - .apply( - p_258814_, - p_258813_ -> (p_258807_, p_258808_, p_258809_) -> { + public static BehaviorControl create() { + return BehaviorBuilder.create( +- p_258814_ -> p_258814_.group(p_258814_.present(MemoryModuleType.ANGRY_AT)) ++ p_258814_ -> p_258814_.group(p_258814_.present(MemoryModuleType.ANGRY_AT)) + .apply( + p_258814_, + p_258813_ -> (p_258807_, p_258808_, p_258809_) -> { diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/StrollAroundPoi.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/StrollAroundPoi.java.patch index c4c7d825..0c104697 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/StrollAroundPoi.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/StrollAroundPoi.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/world/entity/ai/behavior/StrollAroundPoi.java +++ b/net/minecraft/world/entity/ai/behavior/StrollAroundPoi.java @@ -20,7 +20,7 @@ - public static OneShot create(MemoryModuleType p_259159_, float p_260182_, int p_260102_) { - MutableLong mutablelong = new MutableLong(0L); - return BehaviorBuilder.create( -- p_258827_ -> p_258827_.group(p_258827_.registered(MemoryModuleType.WALK_TARGET), p_258827_.present(p_259159_)) -+ p_258827_ -> p_258827_.group(p_258827_.registered(MemoryModuleType.WALK_TARGET), p_258827_.present(p_259159_)) - .apply(p_258827_, (p_258821_, p_258822_) -> (p_258834_, p_258835_, p_258836_) -> { - GlobalPos globalpos = p_258827_.get(p_258822_); - if (p_258834_.dimension() != globalpos.dimension() || !globalpos.pos().closerToCenterThan(p_258835_.position(), (double)p_260102_)) { + public static OneShot create(MemoryModuleType p_259159_, float p_260182_, int p_260102_) { + MutableLong mutablelong = new MutableLong(0L); + return BehaviorBuilder.create( +- p_258827_ -> p_258827_.group(p_258827_.registered(MemoryModuleType.WALK_TARGET), p_258827_.present(p_259159_)) ++ p_258827_ -> p_258827_.group(p_258827_.registered(MemoryModuleType.WALK_TARGET), p_258827_.present(p_259159_)) + .apply(p_258827_, (p_258821_, p_258822_) -> (p_258834_, p_258835_, p_258836_) -> { + GlobalPos globalpos = p_258827_.get(p_258822_); + if (p_258834_.dimension() != globalpos.dimension() || !globalpos.pos().closerToCenterThan(p_258835_.position(), (double)p_260102_)) { diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/StrollToPoi.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/StrollToPoi.java.patch index a34a8b9a..e3f4c973 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/StrollToPoi.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/StrollToPoi.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/world/entity/ai/behavior/StrollToPoi.java +++ b/net/minecraft/world/entity/ai/behavior/StrollToPoi.java @@ -13,7 +13,7 @@ - public static BehaviorControl create(MemoryModuleType p_259919_, float p_259285_, int p_259332_, int p_259904_) { - MutableLong mutablelong = new MutableLong(0L); - return BehaviorBuilder.create( -- p_258859_ -> p_258859_.group(p_258859_.registered(MemoryModuleType.WALK_TARGET), p_258859_.present(p_259919_)) -+ p_258859_ -> p_258859_.group(p_258859_.registered(MemoryModuleType.WALK_TARGET), p_258859_.present(p_259919_)) - .apply(p_258859_, (p_258842_, p_258843_) -> (p_258851_, p_258852_, p_258853_) -> { - GlobalPos globalpos = p_258859_.get(p_258843_); - if (p_258851_.dimension() != globalpos.dimension() || !globalpos.pos().closerToCenterThan(p_258852_.position(), (double)p_259904_)) { + public static BehaviorControl create(MemoryModuleType p_259919_, float p_259285_, int p_259332_, int p_259904_) { + MutableLong mutablelong = new MutableLong(0L); + return BehaviorBuilder.create( +- p_258859_ -> p_258859_.group(p_258859_.registered(MemoryModuleType.WALK_TARGET), p_258859_.present(p_259919_)) ++ p_258859_ -> p_258859_.group(p_258859_.registered(MemoryModuleType.WALK_TARGET), p_258859_.present(p_259919_)) + .apply(p_258859_, (p_258842_, p_258843_) -> (p_258851_, p_258852_, p_258853_) -> { + GlobalPos globalpos = p_258859_.get(p_258843_); + if (p_258851_.dimension() != globalpos.dimension() || !globalpos.pos().closerToCenterThan(p_258852_.position(), (double)p_259904_)) { diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/StrollToPoiList.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/StrollToPoiList.java.patch index 1208f939..fe0f1480 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/StrollToPoiList.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/StrollToPoiList.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/world/entity/ai/behavior/StrollToPoiList.java +++ b/net/minecraft/world/entity/ai/behavior/StrollToPoiList.java @@ -16,7 +16,7 @@ - ) { - MutableLong mutablelong = new MutableLong(0L); - return BehaviorBuilder.create( -- p_259612_ -> p_259612_.group( -+ p_259612_ -> p_259612_.group( - p_259612_.registered(MemoryModuleType.WALK_TARGET), p_259612_.present(p_259573_), p_259612_.present(p_259706_) - ) - .apply( + ) { + MutableLong mutablelong = new MutableLong(0L); + return BehaviorBuilder.create( +- p_259612_ -> p_259612_.group( ++ p_259612_ -> p_259612_.group( + p_259612_.registered(MemoryModuleType.WALK_TARGET), p_259612_.present(p_259573_), p_259612_.present(p_259706_) + ) + .apply( diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/TryFindLand.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/TryFindLand.java.patch index cc042739..4d3ad0bf 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/TryFindLand.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/TryFindLand.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/world/entity/ai/behavior/TryFindLand.java +++ b/net/minecraft/world/entity/ai/behavior/TryFindLand.java @@ -20,7 +20,7 @@ - public static BehaviorControl create(int p_259889_, float p_259302_) { - MutableLong mutablelong = new MutableLong(0L); - return BehaviorBuilder.create( -- p_259851_ -> p_259851_.group( -+ p_259851_ -> p_259851_.group( - p_259851_.absent(MemoryModuleType.ATTACK_TARGET), - p_259851_.absent(MemoryModuleType.WALK_TARGET), - p_259851_.registered(MemoryModuleType.LOOK_TARGET) + public static BehaviorControl create(int p_259889_, float p_259302_) { + MutableLong mutablelong = new MutableLong(0L); + return BehaviorBuilder.create( +- p_259851_ -> p_259851_.group( ++ p_259851_ -> p_259851_.group( + p_259851_.absent(MemoryModuleType.ATTACK_TARGET), + p_259851_.absent(MemoryModuleType.WALK_TARGET), + p_259851_.registered(MemoryModuleType.LOOK_TARGET) diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/TryFindLandNearWater.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/TryFindLandNearWater.java.patch index 0f2c472c..12f0e20a 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/TryFindLandNearWater.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/TryFindLandNearWater.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/world/entity/ai/behavior/TryFindLandNearWater.java +++ b/net/minecraft/world/entity/ai/behavior/TryFindLandNearWater.java @@ -17,7 +17,7 @@ - public static BehaviorControl create(int p_259739_, float p_259118_) { - MutableLong mutablelong = new MutableLong(0L); - return BehaviorBuilder.create( -- p_260348_ -> p_260348_.group( -+ p_260348_ -> p_260348_.group( - p_260348_.absent(MemoryModuleType.ATTACK_TARGET), - p_260348_.absent(MemoryModuleType.WALK_TARGET), - p_260348_.registered(MemoryModuleType.LOOK_TARGET) + public static BehaviorControl create(int p_259739_, float p_259118_) { + MutableLong mutablelong = new MutableLong(0L); + return BehaviorBuilder.create( +- p_260348_ -> p_260348_.group( ++ p_260348_ -> p_260348_.group( + p_260348_.absent(MemoryModuleType.ATTACK_TARGET), + p_260348_.absent(MemoryModuleType.WALK_TARGET), + p_260348_.registered(MemoryModuleType.LOOK_TARGET) diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/TryFindWater.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/TryFindWater.java.patch index 54241003..fb52cdb6 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/TryFindWater.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/TryFindWater.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/world/entity/ai/behavior/TryFindWater.java +++ b/net/minecraft/world/entity/ai/behavior/TryFindWater.java @@ -16,7 +16,7 @@ - public static BehaviorControl create(int p_259298_, float p_259140_) { - MutableLong mutablelong = new MutableLong(0L); - return BehaviorBuilder.create( -- p_260101_ -> p_260101_.group( -+ p_260101_ -> p_260101_.group( - p_260101_.absent(MemoryModuleType.ATTACK_TARGET), - p_260101_.absent(MemoryModuleType.WALK_TARGET), - p_260101_.registered(MemoryModuleType.LOOK_TARGET) + public static BehaviorControl create(int p_259298_, float p_259140_) { + MutableLong mutablelong = new MutableLong(0L); + return BehaviorBuilder.create( +- p_260101_ -> p_260101_.group( ++ p_260101_ -> p_260101_.group( + p_260101_.absent(MemoryModuleType.ATTACK_TARGET), + p_260101_.absent(MemoryModuleType.WALK_TARGET), + p_260101_.registered(MemoryModuleType.LOOK_TARGET) diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/TryLaySpawnOnWaterNearLand.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/TryLaySpawnOnWaterNearLand.java.patch index f437f6df..b59d4f7f 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/TryLaySpawnOnWaterNearLand.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/TryLaySpawnOnWaterNearLand.java.patch @@ -2,10 +2,10 @@ +++ b/net/minecraft/world/entity/ai/behavior/TryLaySpawnOnWaterNearLand.java @@ -17,7 +17,7 @@ public class TryLaySpawnOnWaterNearLand { - public static BehaviorControl create(Block p_259207_) { - return BehaviorBuilder.create( -- p_259781_ -> p_259781_.group( -+ p_259781_ -> p_259781_.group( - p_259781_.absent(MemoryModuleType.ATTACK_TARGET), - p_259781_.present(MemoryModuleType.WALK_TARGET), - p_259781_.present(MemoryModuleType.IS_PREGNANT) + public static BehaviorControl create(Block p_259207_) { + return BehaviorBuilder.create( +- p_259781_ -> p_259781_.group( ++ p_259781_ -> p_259781_.group( + p_259781_.absent(MemoryModuleType.ATTACK_TARGET), + p_259781_.present(MemoryModuleType.WALK_TARGET), + p_259781_.present(MemoryModuleType.IS_PREGNANT) diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/ValidateNearbyPoi.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/ValidateNearbyPoi.java.patch index acbabcea..72072440 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/ValidateNearbyPoi.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/ValidateNearbyPoi.java.patch @@ -2,10 +2,10 @@ +++ b/net/minecraft/world/entity/ai/behavior/ValidateNearbyPoi.java @@ -20,7 +20,7 @@ - public static BehaviorControl create(Predicate> p_259460_, MemoryModuleType p_259635_) { - return BehaviorBuilder.create( -- p_259215_ -> p_259215_.group(p_259215_.present(p_259635_)).apply(p_259215_, p_259498_ -> (p_259843_, p_259259_, p_260036_) -> { -+ p_259215_ -> p_259215_.group(p_259215_.present(p_259635_)).apply(p_259215_, p_259498_ -> (p_259843_, p_259259_, p_260036_) -> { - GlobalPos globalpos = p_259215_.get(p_259498_); - BlockPos blockpos = globalpos.pos(); - if (p_259843_.dimension() == globalpos.dimension() && blockpos.closerToCenterThan(p_259259_.position(), 16.0)) { + public static BehaviorControl create(Predicate> p_259460_, MemoryModuleType p_259635_) { + return BehaviorBuilder.create( +- p_259215_ -> p_259215_.group(p_259215_.present(p_259635_)).apply(p_259215_, p_259498_ -> (p_259843_, p_259259_, p_260036_) -> { ++ p_259215_ -> p_259215_.group(p_259215_.present(p_259635_)).apply(p_259215_, p_259498_ -> (p_259843_, p_259259_, p_260036_) -> { + GlobalPos globalpos = p_259215_.get(p_259498_); + BlockPos blockpos = globalpos.pos(); + if (p_259843_.dimension() == globalpos.dimension() && blockpos.closerToCenterThan(p_259259_.position(), 16.0)) { diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/VillageBoundRandomStroll.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/VillageBoundRandomStroll.java.patch index d0dbdb66..4aa84b4a 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/VillageBoundRandomStroll.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/VillageBoundRandomStroll.java.patch @@ -2,10 +2,10 @@ +++ b/net/minecraft/world/entity/ai/behavior/VillageBoundRandomStroll.java @@ -23,7 +23,7 @@ - public static OneShot create(float p_259320_, int p_259708_, int p_259311_) { - return BehaviorBuilder.create( -- p_258869_ -> p_258869_.group(p_258869_.absent(MemoryModuleType.WALK_TARGET)) -+ p_258869_ -> p_258869_.group(p_258869_.absent(MemoryModuleType.WALK_TARGET)) - .apply( - p_258869_, - p_258863_ -> (p_258874_, p_258875_, p_258876_) -> { + public static OneShot create(float p_259320_, int p_259708_, int p_259311_) { + return BehaviorBuilder.create( +- p_258869_ -> p_258869_.group(p_258869_.absent(MemoryModuleType.WALK_TARGET)) ++ p_258869_ -> p_258869_.group(p_258869_.absent(MemoryModuleType.WALK_TARGET)) + .apply( + p_258869_, + p_258863_ -> (p_258874_, p_258875_, p_258876_) -> { diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/VillagerCalmDown.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/VillagerCalmDown.java.patch index 682abb09..ce567292 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/VillagerCalmDown.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/VillagerCalmDown.java.patch @@ -2,10 +2,10 @@ +++ b/net/minecraft/world/entity/ai/behavior/VillagerCalmDown.java @@ -11,7 +11,7 @@ - public static BehaviorControl create() { - return BehaviorBuilder.create( -- p_258884_ -> p_258884_.group( -+ p_258884_ -> p_258884_.group( - p_258884_.registered(MemoryModuleType.HURT_BY), - p_258884_.registered(MemoryModuleType.HURT_BY_ENTITY), - p_258884_.registered(MemoryModuleType.NEAREST_HOSTILE) + public static BehaviorControl create() { + return BehaviorBuilder.create( +- p_258884_ -> p_258884_.group( ++ p_258884_ -> p_258884_.group( + p_258884_.registered(MemoryModuleType.HURT_BY), + p_258884_.registered(MemoryModuleType.HURT_BY_ENTITY), + p_258884_.registered(MemoryModuleType.NEAREST_HOSTILE) diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/YieldJobSite.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/YieldJobSite.java.patch index 28371432..2298e771 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/YieldJobSite.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/YieldJobSite.java.patch @@ -2,10 +2,10 @@ +++ b/net/minecraft/world/entity/ai/behavior/YieldJobSite.java @@ -20,7 +20,7 @@ public class YieldJobSite { - public static BehaviorControl create(float p_259768_) { - return BehaviorBuilder.create( -- p_258916_ -> p_258916_.group( -+ p_258916_ -> p_258916_.group( - p_258916_.present(MemoryModuleType.POTENTIAL_JOB_SITE), - p_258916_.absent(MemoryModuleType.JOB_SITE), - p_258916_.present(MemoryModuleType.NEAREST_LIVING_ENTITIES), + public static BehaviorControl create(float p_259768_) { + return BehaviorBuilder.create( +- p_258916_ -> p_258916_.group( ++ p_258916_ -> p_258916_.group( + p_258916_.present(MemoryModuleType.POTENTIAL_JOB_SITE), + p_258916_.absent(MemoryModuleType.JOB_SITE), + p_258916_.present(MemoryModuleType.NEAREST_LIVING_ENTITIES), diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/warden/SetRoarTarget.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/warden/SetRoarTarget.java.patch index d1dc4848..874569f7 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/warden/SetRoarTarget.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/warden/SetRoarTarget.java.patch @@ -2,10 +2,10 @@ +++ b/net/minecraft/world/entity/ai/behavior/warden/SetRoarTarget.java @@ -13,7 +13,7 @@ public class SetRoarTarget { - public static BehaviorControl create(Function> p_260275_) { - return BehaviorBuilder.create( -- p_258921_ -> p_258921_.group( -+ p_258921_ -> p_258921_.group( - p_258921_.absent(MemoryModuleType.ROAR_TARGET), - p_258921_.absent(MemoryModuleType.ATTACK_TARGET), - p_258921_.registered(MemoryModuleType.CANT_REACH_WALK_TARGET_SINCE) + public static BehaviorControl create(Function> p_260275_) { + return BehaviorBuilder.create( +- p_258921_ -> p_258921_.group( ++ p_258921_ -> p_258921_.group( + p_258921_.absent(MemoryModuleType.ROAR_TARGET), + p_258921_.absent(MemoryModuleType.ATTACK_TARGET), + p_258921_.registered(MemoryModuleType.CANT_REACH_WALK_TARGET_SINCE) diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/warden/SetWardenLookTarget.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/warden/SetWardenLookTarget.java.patch index 4f44b84a..5ff97d33 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/warden/SetWardenLookTarget.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/warden/SetWardenLookTarget.java.patch @@ -2,10 +2,10 @@ +++ b/net/minecraft/world/entity/ai/behavior/warden/SetWardenLookTarget.java @@ -14,7 +14,7 @@ public class SetWardenLookTarget { - public static BehaviorControl create() { - return BehaviorBuilder.create( -- p_258946_ -> p_258946_.group( -+ p_258946_ -> p_258946_.group( - p_258946_.registered(MemoryModuleType.LOOK_TARGET), - p_258946_.registered(MemoryModuleType.DISTURBANCE_LOCATION), - p_258946_.registered(MemoryModuleType.ROAR_TARGET), + public static BehaviorControl create() { + return BehaviorBuilder.create( +- p_258946_ -> p_258946_.group( ++ p_258946_ -> p_258946_.group( + p_258946_.registered(MemoryModuleType.LOOK_TARGET), + p_258946_.registered(MemoryModuleType.DISTURBANCE_LOCATION), + p_258946_.registered(MemoryModuleType.ROAR_TARGET), diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/warden/TryToSniff.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/warden/TryToSniff.java.patch index 1049b2cd..12c62621 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/warden/TryToSniff.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/behavior/warden/TryToSniff.java.patch @@ -2,10 +2,10 @@ +++ b/net/minecraft/world/entity/ai/behavior/warden/TryToSniff.java @@ -16,7 +16,7 @@ - public static BehaviorControl create() { - return BehaviorBuilder.create( -- p_259979_ -> p_259979_.group( -+ p_259979_ -> p_259979_.group( - p_259979_.registered(MemoryModuleType.IS_SNIFFING), - p_259979_.registered(MemoryModuleType.WALK_TARGET), - p_259979_.absent(MemoryModuleType.SNIFF_COOLDOWN), + public static BehaviorControl create() { + return BehaviorBuilder.create( +- p_259979_ -> p_259979_.group( ++ p_259979_ -> p_259979_.group( + p_259979_.registered(MemoryModuleType.IS_SNIFFING), + p_259979_.registered(MemoryModuleType.WALK_TARGET), + p_259979_.absent(MemoryModuleType.SNIFF_COOLDOWN), diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/gossip/GossipContainer.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/gossip/GossipContainer.java.patch index 0330c1b4..46cd1261 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/gossip/GossipContainer.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/ai/gossip/GossipContainer.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/world/entity/ai/gossip/GossipContainer.java +++ b/net/minecraft/world/entity/ai/gossip/GossipContainer.java -@@ -161,7 +161,7 @@ - .decode(p_26178_) - .resultOrPartial(p_262901_ -> LOGGER.warn("Failed to deserialize gossips: {}", p_262901_)) - .stream() -- .flatMap(p_262899_ -> ((List)p_262899_.getFirst()).stream()) -+ .flatMap(p_262899_ -> (p_262899_.getFirst()).stream()) - .forEach(p_26162_ -> this.getOrCreate(p_26162_.target).entries.put(p_26162_.type, p_26162_.value)); - } +@@ -162,7 +162,7 @@ + .decode(p_26178_) + .resultOrPartial(p_262901_ -> LOGGER.warn("Failed to deserialize gossips: {}", p_262901_)) + .stream() +- .flatMap(p_262899_ -> ((List)p_262899_.getFirst()).stream()) ++ .flatMap(p_262899_ -> (p_262899_.getFirst()).stream()) + .forEach(p_26162_ -> this.getOrCreate(p_26162_.target).entries.put(p_26162_.type, p_26162_.value)); + } diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/animal/Sheep.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/animal/Sheep.java.patch index 0216273e..4ce73d97 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/animal/Sheep.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/animal/Sheep.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/world/entity/animal/Sheep.java +++ b/net/minecraft/world/entity/animal/Sheep.java @@ -86,7 +86,7 @@ - p_29841_.put(DyeColor.RED, Blocks.RED_WOOL); - p_29841_.put(DyeColor.BLACK, Blocks.BLACK_WOOL); - }); -- private static final Map COLORARRAY_BY_COLOR = Maps.newEnumMap( -+ private static final Map COLORARRAY_BY_COLOR = Maps.newEnumMap( - Arrays.stream(DyeColor.values()).collect(Collectors.toMap(p_29868_ -> p_29868_, Sheep::createSheepColor)) - ); - private int eatAnimationTick; + p_29841_.put(DyeColor.RED, Blocks.RED_WOOL); + p_29841_.put(DyeColor.BLACK, Blocks.BLACK_WOOL); + }); +- private static final Map COLORARRAY_BY_COLOR = Maps.newEnumMap( ++ private static final Map COLORARRAY_BY_COLOR = Maps.newEnumMap( + Arrays.stream(DyeColor.values()).collect(Collectors.toMap(p_29868_ -> p_29868_, Sheep::createSheepColor)) + ); + private int eatAnimationTick; diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/animal/allay/Allay.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/animal/allay/Allay.java.patch index cfe42e8e..76e1bf44 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/animal/allay/Allay.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/animal/allay/Allay.java.patch @@ -2,10 +2,10 @@ +++ b/net/minecraft/world/entity/animal/allay/Allay.java @@ -137,7 +137,7 @@ - @Override - public Brain getBrain() { -- return super.getBrain(); -+ return (Brain)super.getBrain(); - } + @Override + public Brain getBrain() { +- return super.getBrain(); ++ return (Brain)super.getBrain(); + } - public static AttributeSupplier.Builder createAttributes() { + public static AttributeSupplier.Builder createAttributes() { diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/animal/axolotl/Axolotl.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/animal/axolotl/Axolotl.java.patch index 022867e3..46270f54 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/animal/axolotl/Axolotl.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/animal/axolotl/Axolotl.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/world/entity/animal/axolotl/Axolotl.java +++ b/net/minecraft/world/entity/animal/axolotl/Axolotl.java -@@ -466,7 +466,7 @@ +@@ -472,7 +472,7 @@ - @Override - public Brain getBrain() { -- return super.getBrain(); -+ return (Brain)super.getBrain(); - } + @Override + public Brain getBrain() { +- return super.getBrain(); ++ return (Brain)super.getBrain(); + } - @Override + @Override diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/animal/axolotl/AxolotlAi.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/animal/axolotl/AxolotlAi.java.patch index ed228100..fcf0310d 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/animal/axolotl/AxolotlAi.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/animal/axolotl/AxolotlAi.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/world/entity/animal/axolotl/AxolotlAi.java +++ b/net/minecraft/world/entity/animal/axolotl/AxolotlAi.java @@ -72,7 +72,7 @@ - Activity.FIGHT, - 0, - ImmutableList.of( -- StopAttackingIfTargetInvalid.create(Axolotl::onStopAttacking), -+ StopAttackingIfTargetInvalid.create(Axolotl::onStopAttacking), - SetWalkTargetFromAttackTargetIfTargetOutOfReach.create(AxolotlAi::getSpeedModifierChasing), - MeleeAttack.create(20), - EraseMemoryIf.create(BehaviorUtils::isBreeding, MemoryModuleType.ATTACK_TARGET) + Activity.FIGHT, + 0, + ImmutableList.of( +- StopAttackingIfTargetInvalid.create(Axolotl::onStopAttacking), ++ StopAttackingIfTargetInvalid.create(Axolotl::onStopAttacking), + SetWalkTargetFromAttackTargetIfTargetOutOfReach.create(AxolotlAi::getSpeedModifierChasing), + MeleeAttack.create(20), + EraseMemoryIf.create(BehaviorUtils::isBreeding, MemoryModuleType.ATTACK_TARGET) diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/animal/axolotl/ValidatePlayDead.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/animal/axolotl/ValidatePlayDead.java.patch index 52fad2e8..017e0202 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/animal/axolotl/ValidatePlayDead.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/animal/axolotl/ValidatePlayDead.java.patch @@ -2,10 +2,10 @@ +++ b/net/minecraft/world/entity/animal/axolotl/ValidatePlayDead.java @@ -10,7 +10,7 @@ public class ValidatePlayDead { - public static BehaviorControl create() { - return BehaviorBuilder.create( -- p_259464_ -> p_259464_.group( -+ p_259464_ -> p_259464_.group( - p_259464_.present(MemoryModuleType.PLAY_DEAD_TICKS), p_259464_.registered(MemoryModuleType.HURT_BY_ENTITY) - ) - .apply(p_259464_, (p_259173_, p_259591_) -> (p_260159_, p_259720_, p_259523_) -> { + public static BehaviorControl create() { + return BehaviorBuilder.create( +- p_259464_ -> p_259464_.group( ++ p_259464_ -> p_259464_.group( + p_259464_.present(MemoryModuleType.PLAY_DEAD_TICKS), p_259464_.registered(MemoryModuleType.HURT_BY_ENTITY) + ) + .apply(p_259464_, (p_259173_, p_259591_) -> (p_260159_, p_259720_, p_259523_) -> { diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/animal/camel/Camel.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/animal/camel/Camel.java.patch index d4c352c9..b6d93cfe 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/animal/camel/Camel.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/animal/camel/Camel.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/world/entity/animal/camel/Camel.java +++ b/net/minecraft/world/entity/animal/camel/Camel.java -@@ -151,7 +151,7 @@ - protected void customServerAiStep() { - this.level().getProfiler().push("camelBrain"); - Brain brain = this.getBrain(); -- brain.tick((ServerLevel)this.level(), this); -+ ((Brain)brain).tick((ServerLevel)this.level(), this); - this.level().getProfiler().pop(); - this.level().getProfiler().push("camelActivityUpdate"); - CamelAi.updateActivity(this); +@@ -155,7 +155,7 @@ + protected void customServerAiStep() { + this.level().getProfiler().push("camelBrain"); + Brain brain = this.getBrain(); +- brain.tick((ServerLevel)this.level(), this); ++ ((Brain)brain).tick((ServerLevel)this.level(), this); + this.level().getProfiler().pop(); + this.level().getProfiler().push("camelActivityUpdate"); + CamelAi.updateActivity(this); diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/animal/frog/Frog.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/animal/frog/Frog.java.patch index 64c22138..3fcbb858 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/animal/frog/Frog.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/animal/frog/Frog.java.patch @@ -2,10 +2,10 @@ +++ b/net/minecraft/world/entity/animal/frog/Frog.java @@ -126,7 +126,7 @@ - @Override - public Brain getBrain() { -- return super.getBrain(); -+ return (Brain)super.getBrain(); - } + @Override + public Brain getBrain() { +- return super.getBrain(); ++ return (Brain)super.getBrain(); + } - @Override + @Override diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/animal/frog/Tadpole.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/animal/frog/Tadpole.java.patch index f29d3a9f..37b39fdd 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/animal/frog/Tadpole.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/animal/frog/Tadpole.java.patch @@ -2,10 +2,10 @@ +++ b/net/minecraft/world/entity/animal/frog/Tadpole.java @@ -80,7 +80,7 @@ - @Override - public Brain getBrain() { -- return super.getBrain(); -+ return (Brain)super.getBrain(); - } + @Override + public Brain getBrain() { +- return super.getBrain(); ++ return (Brain)super.getBrain(); + } - @Override + @Override diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/animal/goat/Goat.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/animal/goat/Goat.java.patch index 40cecf4c..890b1ca9 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/animal/goat/Goat.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/animal/goat/Goat.java.patch @@ -2,10 +2,10 @@ +++ b/net/minecraft/world/entity/animal/goat/Goat.java @@ -176,7 +176,7 @@ - @Override - public Brain getBrain() { -- return super.getBrain(); -+ return (Brain)super.getBrain(); - } + @Override + public Brain getBrain() { +- return super.getBrain(); ++ return (Brain)super.getBrain(); + } - @Override + @Override diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/animal/sniffer/Sniffer.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/animal/sniffer/Sniffer.java.patch index 4c0a4620..d77d6313 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/animal/sniffer/Sniffer.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/animal/sniffer/Sniffer.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/world/entity/animal/sniffer/Sniffer.java +++ b/net/minecraft/world/entity/animal/sniffer/Sniffer.java -@@ -454,7 +454,7 @@ +@@ -456,7 +456,7 @@ - @Override - public Brain getBrain() { -- return super.getBrain(); -+ return (Brain)super.getBrain(); - } + @Override + public Brain getBrain() { +- return super.getBrain(); ++ return (Brain)super.getBrain(); + } - @Override + @Override diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/monster/Slime.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/monster/Slime.java.patch index 616dd89b..7f493b26 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/monster/Slime.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/monster/Slime.java.patch @@ -2,10 +2,10 @@ +++ b/net/minecraft/world/entity/monster/Slime.java @@ -187,7 +187,7 @@ - @Override - public EntityType getType() { -- return super.getType(); -+ return (EntityType)super.getType(); - } + @Override + public EntityType getType() { +- return super.getType(); ++ return (EntityType)super.getType(); + } - @Override + @Override diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/monster/Zoglin.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/monster/Zoglin.java.patch index dc1c25b8..d8a0eb3e 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/monster/Zoglin.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/monster/Zoglin.java.patch @@ -2,10 +2,10 @@ +++ b/net/minecraft/world/entity/monster/Zoglin.java @@ -224,7 +224,7 @@ - @Override - public Brain getBrain() { -- return super.getBrain(); -+ return (Brain)super.getBrain(); - } + @Override + public Brain getBrain() { +- return super.getBrain(); ++ return (Brain)super.getBrain(); + } - protected void updateActivity() { + protected void updateActivity() { diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/monster/hoglin/Hoglin.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/monster/hoglin/Hoglin.java.patch index ad7e75ac..308cb304 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/monster/hoglin/Hoglin.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/monster/hoglin/Hoglin.java.patch @@ -2,10 +2,10 @@ +++ b/net/minecraft/world/entity/monster/hoglin/Hoglin.java @@ -152,7 +152,7 @@ - @Override - public Brain getBrain() { -- return super.getBrain(); -+ return (Brain)super.getBrain(); - } + @Override + public Brain getBrain() { +- return super.getBrain(); ++ return (Brain)super.getBrain(); + } - @Override + @Override diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/monster/hoglin/HoglinAi.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/monster/hoglin/HoglinAi.java.patch index 0024c547..4fca7f47 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/monster/hoglin/HoglinAi.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/monster/hoglin/HoglinAi.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/world/entity/monster/hoglin/HoglinAi.java +++ b/net/minecraft/world/entity/monster/hoglin/HoglinAi.java @@ -111,7 +111,7 @@ - SetWalkTargetAwayFrom.entity(MemoryModuleType.AVOID_TARGET, 1.3F, 15, false), - createIdleMovementBehaviors(), - SetEntityLookTargetSometimes.create(8.0F, UniformInt.of(30, 60)), -- EraseMemoryIf.create(HoglinAi::wantsToStopFleeing, MemoryModuleType.AVOID_TARGET) -+ EraseMemoryIf.create(HoglinAi::wantsToStopFleeing, MemoryModuleType.AVOID_TARGET) - ), - MemoryModuleType.AVOID_TARGET - ); + SetWalkTargetAwayFrom.entity(MemoryModuleType.AVOID_TARGET, 1.3F, 15, false), + createIdleMovementBehaviors(), + SetEntityLookTargetSometimes.create(8.0F, UniformInt.of(30, 60)), +- EraseMemoryIf.create(HoglinAi::wantsToStopFleeing, MemoryModuleType.AVOID_TARGET) ++ EraseMemoryIf.create(HoglinAi::wantsToStopFleeing, MemoryModuleType.AVOID_TARGET) + ), + MemoryModuleType.AVOID_TARGET + ); diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/monster/piglin/Piglin.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/monster/piglin/Piglin.java.patch index b43918b7..1a08e284 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/monster/piglin/Piglin.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/monster/piglin/Piglin.java.patch @@ -2,10 +2,10 @@ +++ b/net/minecraft/world/entity/monster/piglin/Piglin.java @@ -257,7 +257,7 @@ - @Override - public Brain getBrain() { -- return super.getBrain(); -+ return (Brain)super.getBrain(); - } + @Override + public Brain getBrain() { +- return super.getBrain(); ++ return (Brain)super.getBrain(); + } - @Override + @Override diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/monster/piglin/PiglinAi.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/monster/piglin/PiglinAi.java.patch index 3e6f593c..d07a6364 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/monster/piglin/PiglinAi.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/monster/piglin/PiglinAi.java.patch @@ -1,49 +1,49 @@ --- a/net/minecraft/world/entity/monster/piglin/PiglinAi.java +++ b/net/minecraft/world/entity/monster/piglin/PiglinAi.java @@ -169,8 +169,8 @@ - p_34905_.addActivityAndRemoveMemoryWhenStopped( - Activity.FIGHT, - 10, -- ImmutableList.of( -- StopAttackingIfTargetInvalid.create(p_34981_ -> !isNearestValidAttackTarget(p_34904_, p_34981_)), -+ ImmutableList.>of( -+ StopAttackingIfTargetInvalid.create(p_34981_ -> !isNearestValidAttackTarget(p_34904_, p_34981_)), - BehaviorBuilder.triggerIf(PiglinAi::hasCrossbow, BackUpIfTooClose.create(5, 0.75F)), - SetWalkTargetFromAttackTargetIfTargetOutOfReach.create(1.0F), - MeleeAttack.create(20), + p_34905_.addActivityAndRemoveMemoryWhenStopped( + Activity.FIGHT, + 10, +- ImmutableList.of( +- StopAttackingIfTargetInvalid.create(p_34981_ -> !isNearestValidAttackTarget(p_34904_, p_34981_)), ++ ImmutableList.>of( ++ StopAttackingIfTargetInvalid.create(p_34981_ -> !isNearestValidAttackTarget(p_34904_, p_34981_)), + BehaviorBuilder.triggerIf(PiglinAi::hasCrossbow, BackUpIfTooClose.create(5, 0.75F)), + SetWalkTargetFromAttackTargetIfTargetOutOfReach.create(1.0F), + MeleeAttack.create(20), @@ -186,13 +186,13 @@ - p_34921_.addActivityAndRemoveMemoryWhenStopped( - Activity.CELEBRATE, - 10, -- ImmutableList.of( -+ ImmutableList.>of( - avoidRepellent(), - SetEntityLookTarget.create(PiglinAi::isPlayerHoldingLovedItem, 14.0F), - StartAttacking.create(AbstractPiglin::isAdult, PiglinAi::findNearestValidAttackTarget), -- BehaviorBuilder.triggerIf(p_34804_ -> !p_34804_.isDancing(), GoToTargetLocation.create(MemoryModuleType.CELEBRATE_LOCATION, 2, 1.0F)), -- BehaviorBuilder.triggerIf(Piglin::isDancing, GoToTargetLocation.create(MemoryModuleType.CELEBRATE_LOCATION, 4, 0.6F)), -- new RunOne( -+ BehaviorBuilder.triggerIf(p_34804_ -> !p_34804_.isDancing(), GoToTargetLocation.create(MemoryModuleType.CELEBRATE_LOCATION, 2, 1.0F)), -+ BehaviorBuilder.triggerIf(Piglin::isDancing, GoToTargetLocation.create(MemoryModuleType.CELEBRATE_LOCATION, 4, 0.6F)), -+ new RunOne( - ImmutableList.of( - Pair.of(SetEntityLookTarget.create(EntityType.PIGLIN, 8.0F), 1), - Pair.of(RandomStroll.stroll(0.6F, 2, 1), 1), + p_34921_.addActivityAndRemoveMemoryWhenStopped( + Activity.CELEBRATE, + 10, +- ImmutableList.of( ++ ImmutableList.>of( + avoidRepellent(), + SetEntityLookTarget.create(PiglinAi::isPlayerHoldingLovedItem, 14.0F), + StartAttacking.create(AbstractPiglin::isAdult, PiglinAi::findNearestValidAttackTarget), +- BehaviorBuilder.triggerIf(p_34804_ -> !p_34804_.isDancing(), GoToTargetLocation.create(MemoryModuleType.CELEBRATE_LOCATION, 2, 1.0F)), +- BehaviorBuilder.triggerIf(Piglin::isDancing, GoToTargetLocation.create(MemoryModuleType.CELEBRATE_LOCATION, 4, 0.6F)), +- new RunOne( ++ BehaviorBuilder.triggerIf(p_34804_ -> !p_34804_.isDancing(), GoToTargetLocation.create(MemoryModuleType.CELEBRATE_LOCATION, 2, 1.0F)), ++ BehaviorBuilder.triggerIf(Piglin::isDancing, GoToTargetLocation.create(MemoryModuleType.CELEBRATE_LOCATION, 4, 0.6F)), ++ new RunOne( + ImmutableList.of( + Pair.of(SetEntityLookTarget.create(EntityType.PIGLIN, 8.0F), 1), + Pair.of(RandomStroll.stroll(0.6F, 2, 1), 1), @@ -225,7 +225,7 @@ - SetWalkTargetAwayFrom.entity(MemoryModuleType.AVOID_TARGET, 1.0F, 12, true), - createIdleLookBehaviors(), - createIdleMovementBehaviors(), -- EraseMemoryIf.create(PiglinAi::wantsToStopFleeing, MemoryModuleType.AVOID_TARGET) -+ EraseMemoryIf.create(PiglinAi::wantsToStopFleeing, MemoryModuleType.AVOID_TARGET) - ), - MemoryModuleType.AVOID_TARGET - ); + SetWalkTargetAwayFrom.entity(MemoryModuleType.AVOID_TARGET, 1.0F, 12, true), + createIdleLookBehaviors(), + createIdleMovementBehaviors(), +- EraseMemoryIf.create(PiglinAi::wantsToStopFleeing, MemoryModuleType.AVOID_TARGET) ++ EraseMemoryIf.create(PiglinAi::wantsToStopFleeing, MemoryModuleType.AVOID_TARGET) + ), + MemoryModuleType.AVOID_TARGET + ); @@ -247,7 +247,7 @@ - .build() - ) + .build() + ) + ), +- DismountOrSkipMounting.create(8, PiglinAi::wantsToStopRiding) ++ DismountOrSkipMounting.create(8, PiglinAi::wantsToStopRiding) ), -- DismountOrSkipMounting.create(8, PiglinAi::wantsToStopRiding) -+ DismountOrSkipMounting.create(8, PiglinAi::wantsToStopRiding) - ), - MemoryModuleType.RIDE_TARGET - ); + MemoryModuleType.RIDE_TARGET + ); diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/monster/piglin/PiglinBrute.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/monster/piglin/PiglinBrute.java.patch index 7aeec873..b0c71926 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/monster/piglin/PiglinBrute.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/monster/piglin/PiglinBrute.java.patch @@ -2,10 +2,10 @@ +++ b/net/minecraft/world/entity/monster/piglin/PiglinBrute.java @@ -94,7 +94,7 @@ - @Override - public Brain getBrain() { -- return super.getBrain(); -+ return (Brain)super.getBrain(); - } + @Override + public Brain getBrain() { +- return super.getBrain(); ++ return (Brain)super.getBrain(); + } - @Override + @Override diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/monster/piglin/RememberIfHoglinWasKilled.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/monster/piglin/RememberIfHoglinWasKilled.java.patch index 61427b33..520e7914 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/monster/piglin/RememberIfHoglinWasKilled.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/monster/piglin/RememberIfHoglinWasKilled.java.patch @@ -2,10 +2,10 @@ +++ b/net/minecraft/world/entity/monster/piglin/RememberIfHoglinWasKilled.java @@ -11,7 +11,7 @@ public class RememberIfHoglinWasKilled { - public static BehaviorControl create() { - return BehaviorBuilder.create( -- p_260168_ -> p_260168_.group( -+ p_260168_ -> p_260168_.group( - p_260168_.present(MemoryModuleType.ATTACK_TARGET), p_260168_.registered(MemoryModuleType.HUNTED_RECENTLY) - ) - .apply(p_260168_, (p_259214_, p_260031_) -> (p_308768_, p_308769_, p_308770_) -> { + public static BehaviorControl create() { + return BehaviorBuilder.create( +- p_260168_ -> p_260168_.group( ++ p_260168_ -> p_260168_.group( + p_260168_.present(MemoryModuleType.ATTACK_TARGET), p_260168_.registered(MemoryModuleType.HUNTED_RECENTLY) + ) + .apply(p_260168_, (p_259214_, p_260031_) -> (p_308768_, p_308769_, p_308770_) -> { diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/monster/piglin/StartAdmiringItemIfSeen.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/monster/piglin/StartAdmiringItemIfSeen.java.patch index e6a0f386..34909374 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/monster/piglin/StartAdmiringItemIfSeen.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/monster/piglin/StartAdmiringItemIfSeen.java.patch @@ -2,10 +2,10 @@ +++ b/net/minecraft/world/entity/monster/piglin/StartAdmiringItemIfSeen.java @@ -11,7 +11,7 @@ public class StartAdmiringItemIfSeen { - public static BehaviorControl create(int p_259418_) { - return BehaviorBuilder.create( -- p_259264_ -> p_259264_.group( -+ p_259264_ -> p_259264_.group( - p_259264_.present(MemoryModuleType.NEAREST_VISIBLE_WANTED_ITEM), - p_259264_.absent(MemoryModuleType.ADMIRING_ITEM), - p_259264_.absent(MemoryModuleType.ADMIRING_DISABLED), + public static BehaviorControl create(int p_259418_) { + return BehaviorBuilder.create( +- p_259264_ -> p_259264_.group( ++ p_259264_ -> p_259264_.group( + p_259264_.present(MemoryModuleType.NEAREST_VISIBLE_WANTED_ITEM), + p_259264_.absent(MemoryModuleType.ADMIRING_ITEM), + p_259264_.absent(MemoryModuleType.ADMIRING_DISABLED), diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/monster/piglin/StartHuntingHoglin.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/monster/piglin/StartHuntingHoglin.java.patch index d80bc74a..1a75a55c 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/monster/piglin/StartHuntingHoglin.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/monster/piglin/StartHuntingHoglin.java.patch @@ -2,27 +2,27 @@ +++ b/net/minecraft/world/entity/monster/piglin/StartHuntingHoglin.java @@ -11,7 +11,7 @@ public class StartHuntingHoglin { - public static OneShot create() { - return BehaviorBuilder.create( -- p_259791_ -> p_259791_.group( -+ p_259791_ -> p_259791_.group( - p_259791_.present(MemoryModuleType.NEAREST_VISIBLE_HUNTABLE_HOGLIN), - p_259791_.absent(MemoryModuleType.ANGRY_AT), - p_259791_.absent(MemoryModuleType.HUNTED_RECENTLY), + public static OneShot create() { + return BehaviorBuilder.create( +- p_259791_ -> p_259791_.group( ++ p_259791_ -> p_259791_.group( + p_259791_.present(MemoryModuleType.NEAREST_VISIBLE_HUNTABLE_HOGLIN), + p_259791_.absent(MemoryModuleType.ANGRY_AT), + p_259791_.absent(MemoryModuleType.HUNTED_RECENTLY), @@ -21,14 +21,14 @@ - p_259791_, - (p_259255_, p_260214_, p_259562_, p_259156_) -> (p_259918_, p_259191_, p_259772_) -> { - if (!p_259191_.isBaby() -- && !p_259791_.tryGet(p_259156_) -+ && !p_259791_.tryGet(p_259156_) - .map(p_259958_ -> p_259958_.stream().anyMatch(StartHuntingHoglin::hasHuntedRecently)) - .isPresent()) { - Hoglin hoglin = p_259791_.get(p_259255_); - PiglinAi.setAngerTarget(p_259191_, hoglin); - PiglinAi.dontKillAnyMoreHoglinsForAWhile(p_259191_); - PiglinAi.broadcastAngerTarget(p_259191_, hoglin); -- p_259791_.tryGet(p_259156_).ifPresent(p_259760_ -> p_259760_.forEach(PiglinAi::dontKillAnyMoreHoglinsForAWhile)); -+ p_259791_.tryGet(p_259156_).ifPresent(p_259760_ -> p_259760_.forEach(PiglinAi::dontKillAnyMoreHoglinsForAWhile)); - return true; - } else { - return false; + p_259791_, + (p_259255_, p_260214_, p_259562_, p_259156_) -> (p_259918_, p_259191_, p_259772_) -> { + if (!p_259191_.isBaby() +- && !p_259791_.tryGet(p_259156_) ++ && !p_259791_.tryGet(p_259156_) + .map(p_259958_ -> p_259958_.stream().anyMatch(StartHuntingHoglin::hasHuntedRecently)) + .isPresent()) { + Hoglin hoglin = p_259791_.get(p_259255_); + PiglinAi.setAngerTarget(p_259191_, hoglin); + PiglinAi.dontKillAnyMoreHoglinsForAWhile(p_259191_); + PiglinAi.broadcastAngerTarget(p_259191_, hoglin); +- p_259791_.tryGet(p_259156_).ifPresent(p_259760_ -> p_259760_.forEach(PiglinAi::dontKillAnyMoreHoglinsForAWhile)); ++ p_259791_.tryGet(p_259156_).ifPresent(p_259760_ -> p_259760_.forEach(PiglinAi::dontKillAnyMoreHoglinsForAWhile)); + return true; + } else { + return false; diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/monster/piglin/StopAdmiringIfItemTooFarAway.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/monster/piglin/StopAdmiringIfItemTooFarAway.java.patch index 94d741c8..f3a5d88c 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/monster/piglin/StopAdmiringIfItemTooFarAway.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/monster/piglin/StopAdmiringIfItemTooFarAway.java.patch @@ -2,10 +2,10 @@ +++ b/net/minecraft/world/entity/monster/piglin/StopAdmiringIfItemTooFarAway.java @@ -12,7 +12,7 @@ public class StopAdmiringIfItemTooFarAway { - public static BehaviorControl create(int p_259415_) { - return BehaviorBuilder.create( -- p_259152_ -> p_259152_.group( -+ p_259152_ -> p_259152_.group( - p_259152_.present(MemoryModuleType.ADMIRING_ITEM), p_259152_.registered(MemoryModuleType.NEAREST_VISIBLE_WANTED_ITEM) - ) - .apply(p_259152_, (p_260178_, p_259241_) -> (p_259613_, p_259304_, p_259748_) -> { + public static BehaviorControl create(int p_259415_) { + return BehaviorBuilder.create( +- p_259152_ -> p_259152_.group( ++ p_259152_ -> p_259152_.group( + p_259152_.present(MemoryModuleType.ADMIRING_ITEM), p_259152_.registered(MemoryModuleType.NEAREST_VISIBLE_WANTED_ITEM) + ) + .apply(p_259152_, (p_260178_, p_259241_) -> (p_259613_, p_259304_, p_259748_) -> { diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/monster/piglin/StopAdmiringIfTiredOfTryingToReachItem.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/monster/piglin/StopAdmiringIfTiredOfTryingToReachItem.java.patch index f0c2b932..e157c959 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/monster/piglin/StopAdmiringIfTiredOfTryingToReachItem.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/monster/piglin/StopAdmiringIfTiredOfTryingToReachItem.java.patch @@ -2,10 +2,10 @@ +++ b/net/minecraft/world/entity/monster/piglin/StopAdmiringIfTiredOfTryingToReachItem.java @@ -11,7 +11,7 @@ public class StopAdmiringIfTiredOfTryingToReachItem { - public static BehaviorControl create(int p_259110_, int p_259200_) { - return BehaviorBuilder.create( -- p_260320_ -> p_260320_.group( -+ p_260320_ -> p_260320_.group( - p_260320_.present(MemoryModuleType.ADMIRING_ITEM), - p_260320_.present(MemoryModuleType.NEAREST_VISIBLE_WANTED_ITEM), - p_260320_.registered(MemoryModuleType.TIME_TRYING_TO_REACH_ADMIRE_ITEM), + public static BehaviorControl create(int p_259110_, int p_259200_) { + return BehaviorBuilder.create( +- p_260320_ -> p_260320_.group( ++ p_260320_ -> p_260320_.group( + p_260320_.present(MemoryModuleType.ADMIRING_ITEM), + p_260320_.present(MemoryModuleType.NEAREST_VISIBLE_WANTED_ITEM), + p_260320_.registered(MemoryModuleType.TIME_TRYING_TO_REACH_ADMIRE_ITEM), diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/monster/piglin/StopHoldingItemIfNoLongerAdmiring.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/monster/piglin/StopHoldingItemIfNoLongerAdmiring.java.patch index e8497023..a07dd45d 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/monster/piglin/StopHoldingItemIfNoLongerAdmiring.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/monster/piglin/StopHoldingItemIfNoLongerAdmiring.java.patch @@ -2,10 +2,10 @@ +++ b/net/minecraft/world/entity/monster/piglin/StopHoldingItemIfNoLongerAdmiring.java @@ -10,7 +10,7 @@ public class StopHoldingItemIfNoLongerAdmiring { - public static BehaviorControl create() { - return BehaviorBuilder.create( -- p_259197_ -> p_259197_.group(p_259197_.absent(MemoryModuleType.ADMIRING_ITEM)) -+ p_259197_ -> p_259197_.group(p_259197_.absent(MemoryModuleType.ADMIRING_ITEM)) - .apply(p_259197_, p_259512_ -> (p_308771_, p_308772_, p_308773_) -> { - if (!p_308772_.getOffhandItem().isEmpty() && !p_308772_.getOffhandItem().is(Items.SHIELD)) { - PiglinAi.stopHoldingOffHandItem(p_308772_, true); + public static BehaviorControl create() { + return BehaviorBuilder.create( +- p_259197_ -> p_259197_.group(p_259197_.absent(MemoryModuleType.ADMIRING_ITEM)) ++ p_259197_ -> p_259197_.group(p_259197_.absent(MemoryModuleType.ADMIRING_ITEM)) + .apply(p_259197_, p_259512_ -> (p_308771_, p_308772_, p_308773_) -> { + if (!p_308772_.getOffhandItem().isEmpty() && !p_308772_.getOffhandItem().is(Items.SHIELD)) { + PiglinAi.stopHoldingOffHandItem(p_308772_, true); diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/monster/warden/Warden.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/monster/warden/Warden.java.patch index 2f6e6d1c..e3f49927 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/monster/warden/Warden.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/monster/warden/Warden.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/world/entity/monster/warden/Warden.java +++ b/net/minecraft/world/entity/monster/warden/Warden.java -@@ -368,7 +368,7 @@ +@@ -370,7 +370,7 @@ - @Override - public Brain getBrain() { -- return super.getBrain(); -+ return (Brain)super.getBrain(); - } + @Override + public Brain getBrain() { +- return super.getBrain(); ++ return (Brain)super.getBrain(); + } - @Override + @Override diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/monster/warden/WardenAi.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/monster/warden/WardenAi.java.patch index 3eb18db9..58a37779 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/monster/warden/WardenAi.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/monster/warden/WardenAi.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/world/entity/monster/warden/WardenAi.java +++ b/net/minecraft/world/entity/monster/warden/WardenAi.java @@ -84,7 +84,7 @@ - MemoryModuleType.SONIC_BOOM_SOUND_DELAY - ); - private static final BehaviorControl DIG_COOLDOWN_SETTER = BehaviorBuilder.create( -- p_258953_ -> p_258953_.group(p_258953_.registered(MemoryModuleType.DIG_COOLDOWN)) -+ p_258953_ -> p_258953_.group(p_258953_.registered(MemoryModuleType.DIG_COOLDOWN)) - .apply(p_258953_, p_258960_ -> (p_258956_, p_258957_, p_258958_) -> { - if (p_258953_.tryGet(p_258960_).isPresent()) { - p_258960_.setWithExpiry(Unit.INSTANCE, 1200L); + MemoryModuleType.SONIC_BOOM_SOUND_DELAY + ); + private static final BehaviorControl DIG_COOLDOWN_SETTER = BehaviorBuilder.create( +- p_258953_ -> p_258953_.group(p_258953_.registered(MemoryModuleType.DIG_COOLDOWN)) ++ p_258953_ -> p_258953_.group(p_258953_.registered(MemoryModuleType.DIG_COOLDOWN)) + .apply(p_258953_, p_258960_ -> (p_258956_, p_258957_, p_258958_) -> { + if (p_258953_.tryGet(p_258960_).isPresent()) { + p_258960_.setWithExpiry(Unit.INSTANCE, 1200L); diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/npc/Villager.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/npc/Villager.java.patch index 64758346..fb5eef8d 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/npc/Villager.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/entity/npc/Villager.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/world/entity/npc/Villager.java +++ b/net/minecraft/world/entity/npc/Villager.java -@@ -191,7 +191,7 @@ +@@ -199,7 +199,7 @@ - @Override - public Brain getBrain() { -- return super.getBrain(); -+ return (Brain)super.getBrain(); - } + @Override + public Brain getBrain() { +- return super.getBrain(); ++ return (Brain)super.getBrain(); + } - @Override + @Override diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/flag/FeatureFlags.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/flag/FeatureFlags.java.patch index 7aeac1e8..7b4eda09 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/flag/FeatureFlags.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/flag/FeatureFlags.java.patch @@ -1,24 +1,24 @@ --- a/net/minecraft/world/flag/FeatureFlags.java +++ b/net/minecraft/world/flag/FeatureFlags.java @@ -11,9 +11,9 @@ - public static final FeatureFlag UPDATE_1_21; - public static final FeatureFlag TRADE_REBALANCE; - public static final FeatureFlagRegistry REGISTRY; -- public static final Codec CODEC = REGISTRY.codec(); -- public static final FeatureFlagSet VANILLA_SET = FeatureFlagSet.of(VANILLA); -- public static final FeatureFlagSet DEFAULT_FLAGS = VANILLA_SET; -+ public static final Codec CODEC; -+ public static final FeatureFlagSet VANILLA_SET; -+ public static final FeatureFlagSet DEFAULT_FLAGS; + public static final FeatureFlag UPDATE_1_21; + public static final FeatureFlag TRADE_REBALANCE; + public static final FeatureFlagRegistry REGISTRY; +- public static final Codec CODEC = REGISTRY.codec(); +- public static final FeatureFlagSet VANILLA_SET = FeatureFlagSet.of(VANILLA); +- public static final FeatureFlagSet DEFAULT_FLAGS = VANILLA_SET; ++ public static final Codec CODEC; ++ public static final FeatureFlagSet VANILLA_SET; ++ public static final FeatureFlagSet DEFAULT_FLAGS; - public static String printMissingFlags(FeatureFlagSet p_250581_, FeatureFlagSet p_250326_) { - return printMissingFlags(REGISTRY, p_250581_, p_250326_); + public static String printMissingFlags(FeatureFlagSet p_250581_, FeatureFlagSet p_250326_) { + return printMissingFlags(REGISTRY, p_250581_, p_250326_); @@ -36,5 +36,8 @@ - TRADE_REBALANCE = featureflagregistry$builder.createVanilla("trade_rebalance"); - UPDATE_1_21 = featureflagregistry$builder.createVanilla("update_1_21"); - REGISTRY = featureflagregistry$builder.build(); -+ CODEC = REGISTRY.codec(); -+ VANILLA_SET = FeatureFlagSet.of(VANILLA); -+ DEFAULT_FLAGS = VANILLA_SET; - } + TRADE_REBALANCE = featureflagregistry$builder.createVanilla("trade_rebalance"); + UPDATE_1_21 = featureflagregistry$builder.createVanilla("update_1_21"); + REGISTRY = featureflagregistry$builder.build(); ++ CODEC = REGISTRY.codec(); ++ VANILLA_SET = FeatureFlagSet.of(VANILLA); ++ DEFAULT_FLAGS = VANILLA_SET; + } } diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/inventory/AbstractFurnaceMenu.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/inventory/AbstractFurnaceMenu.java.patch index 3d9bcb5e..a6d64ed5 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/inventory/AbstractFurnaceMenu.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/inventory/AbstractFurnaceMenu.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/world/inventory/AbstractFurnaceMenu.java +++ b/net/minecraft/world/inventory/AbstractFurnaceMenu.java @@ -163,7 +163,7 @@ - } + } - protected boolean canSmelt(ItemStack p_38978_) { -- return this.level.getRecipeManager().getRecipeFor(this.recipeType, new SimpleContainer(p_38978_), this.level).isPresent(); -+ return this.level.getRecipeManager().getRecipeFor((RecipeType)this.recipeType, new SimpleContainer(p_38978_), this.level).isPresent(); - } + protected boolean canSmelt(ItemStack p_38978_) { +- return this.level.getRecipeManager().getRecipeFor(this.recipeType, new SimpleContainer(p_38978_), this.level).isPresent(); ++ return this.level.getRecipeManager().getRecipeFor((RecipeType)this.recipeType, new SimpleContainer(p_38978_), this.level).isPresent(); + } - protected boolean isFuel(ItemStack p_38989_) { + protected boolean isFuel(ItemStack p_38989_) { diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/inventory/RecipeBookMenu.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/inventory/RecipeBookMenu.java.patch index d38a60db..26f94fd2 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/inventory/RecipeBookMenu.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/inventory/RecipeBookMenu.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/world/inventory/RecipeBookMenu.java +++ b/net/minecraft/world/inventory/RecipeBookMenu.java @@ -13,7 +13,7 @@ - } + } - public void handlePlacement(boolean p_40119_, RecipeHolder p_300860_, ServerPlayer p_40121_) { -- new ServerPlaceRecipe<>(this).recipeClicked(p_40121_, p_300860_, p_40119_); -+ new ServerPlaceRecipe<>(this).recipeClicked(p_40121_, (RecipeHolder>)p_300860_, p_40119_); - } + public void handlePlacement(boolean p_40119_, RecipeHolder p_300860_, ServerPlayer p_40121_) { +- new ServerPlaceRecipe<>(this).recipeClicked(p_40121_, p_300860_, p_40119_); ++ new ServerPlaceRecipe<>(this).recipeClicked(p_40121_, (RecipeHolder>)p_300860_, p_40119_); + } - public abstract void fillCraftSlotsStackedContents(StackedContents p_40117_); + public abstract void fillCraftSlotsStackedContents(StackedContents p_40117_); diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/item/BucketItem.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/item/BucketItem.java.patch index d61fc26d..fb3959b5 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/item/BucketItem.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/item/BucketItem.java.patch @@ -1,10 +1,10 @@ --- a/net/minecraft/world/item/BucketItem.java +++ b/net/minecraft/world/item/BucketItem.java @@ -107,6 +107,7 @@ - Block $$7; - boolean $$8; - boolean flag2; -+ BlockState blockstate; - label82: { - flowingfluid = (FlowingFluid)$$6; - blockstate = p_150717_.getBlockState(p_150718_); + Block $$7; + boolean $$8; + boolean flag2; ++ BlockState blockstate; + label82: { + flowingfluid = (FlowingFluid)$$6; + blockstate = p_150717_.getBlockState(p_150718_); diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/item/crafting/RecipeManager.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/item/crafting/RecipeManager.java.patch index 2ff9b559..19c7cfc9 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/item/crafting/RecipeManager.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/item/crafting/RecipeManager.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/world/item/crafting/RecipeManager.java +++ b/net/minecraft/world/item/crafting/RecipeManager.java @@ -109,7 +109,7 @@ - } + } - private > Map> byType(RecipeType p_44055_) { -- return this.recipes.getOrDefault(p_44055_, Collections.emptyMap()); -+ return (Map>)(Map)this.recipes.getOrDefault(p_44055_, Collections.emptyMap()); - } + private > Map> byType(RecipeType p_44055_) { +- return this.recipes.getOrDefault(p_44055_, Collections.emptyMap()); ++ return (Map>)(Map)this.recipes.getOrDefault(p_44055_, Collections.emptyMap()); + } - public > NonNullList getRemainingItemsFor(RecipeType p_44070_, C p_44071_, Level p_44072_) { + public > NonNullList getRemainingItemsFor(RecipeType p_44070_, C p_44071_, Level p_44072_) { diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/level/GameRules.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/level/GameRules.java.patch index cab11228..4c3f7ee8 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/level/GameRules.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/level/GameRules.java.patch @@ -1,13 +1,13 @@ --- a/net/minecraft/world/level/GameRules.java +++ b/net/minecraft/world/level/GameRules.java @@ -247,8 +247,8 @@ - private static > void callVisitorCap( - GameRules.GameRuleTypeVisitor p_46167_, GameRules.Key p_46168_, GameRules.Type p_46169_ - ) { -- p_46167_.visit(p_46168_, p_46169_); -- p_46169_.callVisitor(p_46167_, p_46168_); -+ p_46167_.visit((GameRules.Key)p_46168_, (GameRules.Type)p_46169_); -+ ((GameRules.Type)p_46169_).callVisitor(p_46167_, (GameRules.Key)p_46168_); - } + private static > void callVisitorCap( + GameRules.GameRuleTypeVisitor p_46167_, GameRules.Key p_46168_, GameRules.Type p_46169_ + ) { +- p_46167_.visit(p_46168_, p_46169_); +- p_46169_.callVisitor(p_46167_, p_46168_); ++ p_46167_.visit((GameRules.Key)p_46168_, (GameRules.Type)p_46169_); ++ ((GameRules.Type)p_46169_).callVisitor(p_46167_, (GameRules.Key)p_46168_); + } - public void assignFrom(GameRules p_46177_, @Nullable MinecraftServer p_46178_) { + public void assignFrom(GameRules p_46177_, @Nullable MinecraftServer p_46178_) { diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/level/biome/Climate.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/level/biome/Climate.java.patch index 2663ca9a..f3fec747 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/level/biome/Climate.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/level/biome/Climate.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/world/level/biome/Climate.java +++ b/net/minecraft/world/level/biome/Climate.java -@@ -260,7 +260,7 @@ - throw new IllegalStateException("Expecting parameter space to be 7, got " + i); - } else { - List> list = p_186936_.stream() -- .map(p_186934_ -> new Climate.RTree.Leaf(p_186934_.getFirst(), p_186934_.getSecond())) -+ .map(p_186934_ -> new Climate.RTree.Leaf(p_186934_.getFirst(), p_186934_.getSecond())) - .collect(Collectors.toCollection(ArrayList::new)); - return new Climate.RTree<>(build(i, list)); - } +@@ -266,7 +266,7 @@ + throw new IllegalStateException("Expecting parameter space to be 7, got " + i); + } else { + List> list = p_186936_.stream() +- .map(p_186934_ -> new Climate.RTree.Leaf(p_186934_.getFirst(), p_186934_.getSecond())) ++ .map(p_186934_ -> new Climate.RTree.Leaf(p_186934_.getFirst(), p_186934_.getSecond())) + .collect(Collectors.toCollection(ArrayList::new)); + return new Climate.RTree<>(build(i, list)); + } diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/level/block/BaseEntityBlock.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/level/block/BaseEntityBlock.java.patch index d56a4bfe..8592b302 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/level/block/BaseEntityBlock.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/level/block/BaseEntityBlock.java.patch @@ -1,10 +1,10 @@ --- a/net/minecraft/world/level/block/BaseEntityBlock.java +++ b/net/minecraft/world/level/block/BaseEntityBlock.java @@ -42,6 +42,6 @@ - protected static BlockEntityTicker createTickerHelper( - BlockEntityType p_152133_, BlockEntityType p_152134_, BlockEntityTicker p_152135_ - ) { -- return p_152134_ == p_152133_ ? p_152135_ : null; -+ return p_152134_ == p_152133_ ? (BlockEntityTicker)p_152135_ : null; - } + protected static BlockEntityTicker createTickerHelper( + BlockEntityType p_152133_, BlockEntityType p_152134_, BlockEntityTicker p_152135_ + ) { +- return p_152134_ == p_152133_ ? p_152135_ : null; ++ return p_152134_ == p_152133_ ? (BlockEntityTicker)p_152135_ : null; + } } diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java.patch index d6ddf4b4..27d4d1b8 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java +++ b/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java @@ -110,7 +110,7 @@ - BlockEntityType p_154991_, BlockPos p_154992_, BlockState p_154993_, RecipeType p_154994_ - ) { - super(p_154991_, p_154992_, p_154993_); -- this.quickCheck = RecipeManager.createCheck(p_154994_); -+ this.quickCheck = RecipeManager.createCheck((RecipeType)p_154994_); - } + BlockEntityType p_154991_, BlockPos p_154992_, BlockState p_154993_, RecipeType p_154994_ + ) { + super(p_154991_, p_154992_, p_154993_); +- this.quickCheck = RecipeManager.createCheck(p_154994_); ++ this.quickCheck = RecipeManager.createCheck((RecipeType)p_154994_); + } - public static Map getFuel() { + public static Map getFuel() { diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/level/chunk/LevelChunk.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/level/chunk/LevelChunk.java.patch index 082ad2b7..2777a07c 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/level/chunk/LevelChunk.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/level/chunk/LevelChunk.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/world/level/chunk/LevelChunk.java +++ b/net/minecraft/world/level/chunk/LevelChunk.java -@@ -614,7 +614,7 @@ +@@ -616,7 +616,7 @@ - private void updateBlockEntityTicker(T p_156407_) { - BlockState blockstate = p_156407_.getBlockState(); -- BlockEntityTicker blockentityticker = blockstate.getTicker(this.level, p_156407_.getType()); -+ BlockEntityTicker blockentityticker = (BlockEntityTicker)blockstate.getTicker(this.level, p_156407_.getType()); - if (blockentityticker == null) { - this.removeBlockEntityTicker(p_156407_.getBlockPos()); - } else { + private void updateBlockEntityTicker(T p_156407_) { + BlockState blockstate = p_156407_.getBlockState(); +- BlockEntityTicker blockentityticker = blockstate.getTicker(this.level, p_156407_.getType()); ++ BlockEntityTicker blockentityticker = (BlockEntityTicker)blockstate.getTicker(this.level, p_156407_.getType()); + if (blockentityticker == null) { + this.removeBlockEntityTicker(p_156407_.getBlockPos()); + } else { diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/level/chunk/PalettedContainer.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/level/chunk/PalettedContainer.java.patch index ca7d4693..dbafd187 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/level/chunk/PalettedContainer.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/level/chunk/PalettedContainer.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/world/level/chunk/PalettedContainer.java +++ b/net/minecraft/world/level/chunk/PalettedContainer.java @@ -57,7 +57,7 @@ - private static > Codec codec( - IdMap p_238428_, Codec p_238429_, PalettedContainer.Strategy p_238430_, T p_238431_, PalettedContainerRO.Unpacker p_238432_ - ) { -- return RecordCodecBuilder.create( -+ return RecordCodecBuilder.>create( - p_188047_ -> p_188047_.group( - p_238429_.mapResult(ExtraCodecs.orElsePartial(p_238431_)) - .listOf() + private static > Codec codec( + IdMap p_238428_, Codec p_238429_, PalettedContainer.Strategy p_238430_, T p_238431_, PalettedContainerRO.Unpacker p_238432_ + ) { +- return RecordCodecBuilder.create( ++ return RecordCodecBuilder.>create( + p_188047_ -> p_188047_.group( + p_238429_.mapResult(ExtraCodecs.orElsePartial(p_238431_)) + .listOf() diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/level/gameevent/PositionSourceType.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/level/gameevent/PositionSourceType.java.patch index e69c6957..96ee944b 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/level/gameevent/PositionSourceType.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/level/gameevent/PositionSourceType.java.patch @@ -2,9 +2,9 @@ +++ b/net/minecraft/world/level/gameevent/PositionSourceType.java @@ -30,6 +30,6 @@ - static void toNetwork(T p_157875_, FriendlyByteBuf p_157876_) { - p_157876_.writeResourceLocation(BuiltInRegistries.POSITION_SOURCE_TYPE.getKey(p_157875_.getType())); -- p_157875_.getType().write(p_157876_, p_157875_); -+ ((PositionSourceType)p_157875_.getType()).write(p_157876_, p_157875_); - } + static void toNetwork(T p_157875_, FriendlyByteBuf p_157876_) { + p_157876_.writeResourceLocation(BuiltInRegistries.POSITION_SOURCE_TYPE.getKey(p_157875_.getType())); +- p_157875_.getType().write(p_157876_, p_157875_); ++ ((PositionSourceType)p_157875_.getType()).write(p_157876_, p_157875_); + } } diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/level/levelgen/SurfaceRules.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/level/levelgen/SurfaceRules.java.patch index 671f7080..2b921aa0 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/level/levelgen/SurfaceRules.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/level/levelgen/SurfaceRules.java.patch @@ -1,22 +1,22 @@ --- a/net/minecraft/world/level/levelgen/SurfaceRules.java +++ b/net/minecraft/world/level/levelgen/SurfaceRules.java -@@ -752,14 +752,14 @@ +@@ -753,14 +753,14 @@ - @Override - protected boolean compute() { -- int i = this.context.blockY; -- if (i <= i) { -+ int k = this.context.blockY; -+ if (k <= i) { - return true; -- } else if (i >= j) { -+ } else if (k >= j) { - return false; - } else { -- double d0 = Mth.map((double)i, (double)i, (double)j, 1.0, 0.0); -- RandomSource randomsource = positionalrandomfactory.at(this.context.blockX, i, this.context.blockZ); -+ double d0 = Mth.map((double)k, (double)i, (double)j, 1.0, 0.0); -+ RandomSource randomsource = positionalrandomfactory.at(this.context.blockX, k, this.context.blockZ); - return (double)randomsource.nextFloat() < d0; - } - } + @Override + protected boolean compute() { +- int i = this.context.blockY; +- if (i <= i) { ++ int k = this.context.blockY; ++ if (k <= i) { + return true; +- } else if (i >= j) { ++ } else if (k >= j) { + return false; + } else { +- double d0 = Mth.map((double)i, (double)i, (double)j, 1.0, 0.0); +- RandomSource randomsource = positionalrandomfactory.at(this.context.blockX, i, this.context.blockZ); ++ double d0 = Mth.map((double)k, (double)i, (double)j, 1.0, 0.0); ++ RandomSource randomsource = positionalrandomfactory.at(this.context.blockX, k, this.context.blockZ); + return (double)randomsource.nextFloat() < d0; + } + } diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/level/storage/loot/functions/EnchantRandomlyFunction.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/level/storage/loot/functions/EnchantRandomlyFunction.java.patch index ad6d0244..28a46057 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/level/storage/loot/functions/EnchantRandomlyFunction.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/level/storage/loot/functions/EnchantRandomlyFunction.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/world/level/storage/loot/functions/EnchantRandomlyFunction.java +++ b/net/minecraft/world/level/storage/loot/functions/EnchantRandomlyFunction.java @@ -50,7 +50,7 @@ - public ItemStack run(ItemStack p_80429_, LootContext p_80430_) { - RandomSource randomsource = p_80430_.getRandom(); - Optional> optional = this.enchantments -- .>flatMap(p_298077_ -> p_298077_.getRandomElement(randomsource)) -+ .flatMap(p_298077_ -> p_298077_.getRandomElement(randomsource)) - .or( - () -> { - boolean flag = p_80429_.is(Items.BOOK); + public ItemStack run(ItemStack p_80429_, LootContext p_80430_) { + RandomSource randomsource = p_80430_.getRandom(); + Optional> optional = this.enchantments +- .>flatMap(p_298077_ -> p_298077_.getRandomElement(randomsource)) ++ .flatMap(p_298077_ -> p_298077_.getRandomElement(randomsource)) + .or( + () -> { + boolean flag = p_80429_.is(Items.BOOK); diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/level/storage/loot/predicates/LootItemBlockStatePropertyCondition.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/level/storage/loot/predicates/LootItemBlockStatePropertyCondition.java.patch index 43d5395e..5897afa6 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/level/storage/loot/predicates/LootItemBlockStatePropertyCondition.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/level/storage/loot/predicates/LootItemBlockStatePropertyCondition.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/world/level/storage/loot/predicates/LootItemBlockStatePropertyCondition.java +++ b/net/minecraft/world/level/storage/loot/predicates/LootItemBlockStatePropertyCondition.java -@@ -31,7 +31,7 @@ - private static DataResult validate(LootItemBlockStatePropertyCondition p_298471_) { - return p_298471_.properties() - .flatMap(p_298822_ -> p_298822_.checkState(p_298471_.block().value().getStateDefinition())) -- .map(p_299129_ -> DataResult.error(() -> "Block " + p_298471_.block() + " has no property" + p_299129_)) -+ .map(p_299129_ -> DataResult.error(() -> "Block " + p_298471_.block() + " has no property" + p_299129_)) - .orElse(DataResult.success(p_298471_)); - } +@@ -32,7 +32,7 @@ + private static DataResult validate(LootItemBlockStatePropertyCondition p_298471_) { + return p_298471_.properties() + .flatMap(p_298822_ -> p_298822_.checkState(p_298471_.block().value().getStateDefinition())) +- .map(p_299129_ -> DataResult.error(() -> "Block " + p_298471_.block() + " has no property" + p_299129_)) ++ .map(p_299129_ -> DataResult.error(() -> "Block " + p_298471_.block() + " has no property" + p_299129_)) + .orElse(DataResult.success(p_298471_)); + } diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/ticks/BlackholeTickAccess.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/ticks/BlackholeTickAccess.java.patch index ef762d8b..53c8f909 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/ticks/BlackholeTickAccess.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/ticks/BlackholeTickAccess.java.patch @@ -1,15 +1,15 @@ --- a/net/minecraft/world/ticks/BlackholeTickAccess.java +++ b/net/minecraft/world/ticks/BlackholeTickAccess.java @@ -40,10 +40,10 @@ - }; + }; - public static TickContainerAccess emptyContainer() { -- return CONTAINER_BLACKHOLE; -+ return (TickContainerAccess)CONTAINER_BLACKHOLE; - } + public static TickContainerAccess emptyContainer() { +- return CONTAINER_BLACKHOLE; ++ return (TickContainerAccess)CONTAINER_BLACKHOLE; + } - public static LevelTickAccess emptyLevelList() { -- return LEVEL_BLACKHOLE; -+ return (LevelTickAccess)LEVEL_BLACKHOLE; - } + public static LevelTickAccess emptyLevelList() { +- return LEVEL_BLACKHOLE; ++ return (LevelTickAccess)LEVEL_BLACKHOLE; + } } diff --git a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/ticks/SavedTick.java.patch b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/ticks/SavedTick.java.patch index 1df45934..5f9cacb0 100644 --- a/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/ticks/SavedTick.java.patch +++ b/versions/snapshot/1.20/23w44a/patches/shared/net/minecraft/world/ticks/SavedTick.java.patch @@ -1,11 +1,11 @@ --- a/net/minecraft/world/ticks/SavedTick.java +++ b/net/minecraft/world/ticks/SavedTick.java @@ -73,7 +73,7 @@ - } + } - public ScheduledTick unpack(long p_193329_, long p_193330_) { -- return new ScheduledTick<>(this.type, this.pos, p_193329_ + (long)this.delay, this.priority, p_193330_); -+ return new ScheduledTick(this.type, this.pos, p_193329_ + (long)this.delay, this.priority, p_193330_); - } + public ScheduledTick unpack(long p_193329_, long p_193330_) { +- return new ScheduledTick<>(this.type, this.pos, p_193329_ + (long)this.delay, this.priority, p_193330_); ++ return new ScheduledTick(this.type, this.pos, p_193329_ + (long)this.delay, this.priority, p_193330_); + } - public static SavedTick probe(T p_193336_, BlockPos p_193337_) { + public static SavedTick probe(T p_193336_, BlockPos p_193337_) {