diff --git a/Blueberry-API/src/main/java/net/blueberrymc/common/bml/event/EventManager.java b/Blueberry-API/src/main/java/net/blueberrymc/common/bml/event/EventManager.java index d69cc94e..35cfea16 100644 --- a/Blueberry-API/src/main/java/net/blueberrymc/common/bml/event/EventManager.java +++ b/Blueberry-API/src/main/java/net/blueberrymc/common/bml/event/EventManager.java @@ -100,7 +100,7 @@ public void registerEvents(@NotNull BlueberryMod mod, @NotNull Object listener) * @param the event type */ @SuppressWarnings("unchecked") - public void registerEvent(@NotNull Class clazz, @NotNull BlueberryMod mod, @NotNull EventPriority priority, @NotNull ThrowableConsumer consumer) { + public void registerEvent(@NotNull Class clazz, @NotNull BlueberryMod mod, @NotNull EventPriority priority, @NotNull ThrowableConsumer<@NotNull T> consumer) { Nag.deprecatedEvent(clazz, mod); // notify the mod authors if event is deprecated getHandlerList(clazz).add(event -> consumer.accept((T) event), priority, (Object) null, mod); } diff --git a/MagmaCube b/MagmaCube index 2a0cec41..1855d36e 160000 --- a/MagmaCube +++ b/MagmaCube @@ -1 +1 @@ -Subproject commit 2a0cec41aed8f761ccc2eb6a2ba55383513628bf +Subproject commit 1855d36e8ba86ea7433a25f2574590ca21077429 diff --git a/MagmaCube-Patches/0001-POM-Changes.patch b/MagmaCube-Patches/0001-POM-Changes.patch index 99a0a22b..cabfa757 100644 --- a/MagmaCube-Patches/0001-POM-Changes.patch +++ b/MagmaCube-Patches/0001-POM-Changes.patch @@ -27,7 +27,7 @@ index fb84bbcd532981037e97b33e7b8bdef539dbbd2c..871ca99691b10950eeeb6d4b7630708f @DontObfuscate public static String getClientModName() { diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index f631124b85fb375c6375d595aa5a635b371734d1..608f29b206581bbf31b1ab1561c02c54ebcf1b0e 100644 +index a8478cb007b26ef2c2bcdcd99419f5173f724593..3d5d90b083b96f64d88062dc7b3d687126d48f9d 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -920,7 +920,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop implements +@@ -728,7 +728,7 @@ public class Minecraft extends ReentrantBlockableEventLoop implements } public String getLaunchedVersion() { diff --git a/MagmaCube-Patches/0004-Mods-support.patch b/MagmaCube-Patches/0004-Mods-support.patch index ebe9489e..a0f3b0a3 100644 --- a/MagmaCube-Patches/0004-Mods-support.patch +++ b/MagmaCube-Patches/0004-Mods-support.patch @@ -99,10 +99,10 @@ index da5ac7b22dd629ec1fffcdabc35743c161c5d611..89ff780da13eb16eb1a06fa4652c8604 public void setDetail(String s, String s2) { diff --git a/src/main/java/net/minecraft/client/Minecraft.java b/src/main/java/net/minecraft/client/Minecraft.java -index 334c25a4127f6dddda3c966f25800e2b1c102a04..e79b97b31579b95bca90981a8a47f2463d1cb2e9 100644 +index 914872b02766cc6822491c2ca230b3fb03d949fc..e8682313699cb2199bc365ef43b3006c748f6a4b 100644 --- a/src/main/java/net/minecraft/client/Minecraft.java +++ b/src/main/java/net/minecraft/client/Minecraft.java -@@ -458,7 +458,9 @@ public class Minecraft extends ReentrantBlockableEventLoop implements +@@ -461,7 +461,9 @@ public class Minecraft extends ReentrantBlockableEventLoop implements this.mainRenderTarget = new MainTarget(this.window.getWidth(), this.window.getHeight()); this.mainRenderTarget.setClearColor(0.0F, 0.0F, 0.0F, 0.0F); this.mainRenderTarget.clear(ON_OSX); @@ -112,7 +112,7 @@ index 334c25a4127f6dddda3c966f25800e2b1c102a04..e79b97b31579b95bca90981a8a47f246 this.resourcePackRepository.reload(); this.options.loadSelectedResourcePacks(this.resourcePackRepository); this.languageManager = new LanguageManager(this.options.languageCode); -@@ -472,6 +474,7 @@ public class Minecraft extends ReentrantBlockableEventLoop implements +@@ -475,6 +477,7 @@ public class Minecraft extends ReentrantBlockableEventLoop implements this.splashManager = new SplashManager(this.user); this.resourceManager.registerReloadListener(this.splashManager); this.musicManager = new MusicManager(this); @@ -120,7 +120,7 @@ index 334c25a4127f6dddda3c966f25800e2b1c102a04..e79b97b31579b95bca90981a8a47f246 this.fontManager = new FontManager(this.textureManager); this.font = this.fontManager.createFont(); this.resourceManager.registerReloadListener(this.fontManager.getReloadListener()); -@@ -490,6 +493,7 @@ public class Minecraft extends ReentrantBlockableEventLoop implements +@@ -493,6 +496,7 @@ public class Minecraft extends ReentrantBlockableEventLoop implements this.blockEntityRenderDispatcher = new BlockEntityRenderDispatcher(this.font, this.entityModels, this::getBlockRenderer, this::getItemRenderer, this::getEntityRenderDispatcher); this.resourceManager.registerReloadListener(this.blockEntityRenderDispatcher); BlockEntityWithoutLevelRenderer blockEntityWithoutLevelRenderer = new BlockEntityWithoutLevelRenderer(this.blockEntityRenderDispatcher, this.entityModels); @@ -128,7 +128,7 @@ index 334c25a4127f6dddda3c966f25800e2b1c102a04..e79b97b31579b95bca90981a8a47f246 this.resourceManager.registerReloadListener(blockEntityWithoutLevelRenderer); this.itemRenderer = new ItemRenderer(this.textureManager, this.modelManager, this.itemColors, blockEntityWithoutLevelRenderer); this.resourceManager.registerReloadListener(this.itemRenderer); -@@ -543,6 +547,7 @@ public class Minecraft extends ReentrantBlockableEventLoop implements +@@ -548,6 +552,7 @@ public class Minecraft extends ReentrantBlockableEventLoop implements this.reportingContext = ReportingContext.create(ReportEnvironment.local(), this.userApiService); LoadingOverlay.registerTextures(this); List list = this.resourcePackRepository.openAllSelected(); @@ -136,7 +136,7 @@ index 334c25a4127f6dddda3c966f25800e2b1c102a04..e79b97b31579b95bca90981a8a47f246 this.reloadStateTracker.startReload(ResourceLoadStateTracker.ReloadReason.INITIAL, list); this.setOverlay(new LoadingOverlay(this, this.resourceManager.createReload(Util.backgroundExecutor(), this, RESOURCE_RELOAD_INITIAL_TASK, list), (optional) -> Util.ifElse(optional, this::rollbackResourcePacks, () -> { if (SharedConstants.IS_RUNNING_IN_IDE) { -@@ -552,8 +557,9 @@ public class Minecraft extends ReentrantBlockableEventLoop implements +@@ -557,8 +562,9 @@ public class Minecraft extends ReentrantBlockableEventLoop implements this.reloadStateTracker.finishReload(); }), false)); if (s != null) { @@ -147,7 +147,7 @@ index 334c25a4127f6dddda3c966f25800e2b1c102a04..e79b97b31579b95bca90981a8a47f246 this.setScreen(BanNoticeScreen.create((flag) -> { if (flag) { Util.getPlatform().openUri("https://aka.ms/mcjavamoderation"); -@@ -561,8 +567,9 @@ public class Minecraft extends ReentrantBlockableEventLoop implements +@@ -566,8 +572,9 @@ public class Minecraft extends ReentrantBlockableEventLoop implements this.setScreen(new TitleScreen(true)); }, this.multiplayerBan())); @@ -158,7 +158,7 @@ index 334c25a4127f6dddda3c966f25800e2b1c102a04..e79b97b31579b95bca90981a8a47f246 } } -@@ -739,9 +746,10 @@ public class Minecraft extends ReentrantBlockableEventLoop implements +@@ -744,9 +751,10 @@ public class Minecraft extends ReentrantBlockableEventLoop implements } public static void crash(CrashReport crashReport) { @@ -170,7 +170,7 @@ index 334c25a4127f6dddda3c966f25800e2b1c102a04..e79b97b31579b95bca90981a8a47f246 if (crashReport.getSaveFile() != null) { Bootstrap.realStdoutPrintln("#@!@# Game crashed! Crash report saved to: #@!@# " + crashReport.getSaveFile()); System.exit(-1); -@@ -894,6 +902,7 @@ public class Minecraft extends ReentrantBlockableEventLoop implements +@@ -899,6 +907,7 @@ public class Minecraft extends ReentrantBlockableEventLoop implements this.screen = screen; BufferUploader.reset(); @@ -178,7 +178,7 @@ index 334c25a4127f6dddda3c966f25800e2b1c102a04..e79b97b31579b95bca90981a8a47f246 if (screen != null) { this.mouseHandler.releaseMouse(); KeyMapping.releaseAll(); -@@ -909,6 +918,7 @@ public class Minecraft extends ReentrantBlockableEventLoop implements +@@ -914,6 +923,7 @@ public class Minecraft extends ReentrantBlockableEventLoop implements public void setOverlay(@Nullable Overlay overlay) { this.overlay = overlay; @@ -186,7 +186,7 @@ index 334c25a4127f6dddda3c966f25800e2b1c102a04..e79b97b31579b95bca90981a8a47f246 } public void destroy() { -@@ -933,6 +943,7 @@ public class Minecraft extends ReentrantBlockableEventLoop implements +@@ -938,6 +948,7 @@ public class Minecraft extends ReentrantBlockableEventLoop implements this.screen.removed(); } @@ -194,7 +194,7 @@ index 334c25a4127f6dddda3c966f25800e2b1c102a04..e79b97b31579b95bca90981a8a47f246 this.close(); } finally { Util.timeSource = System::nanoTime; -@@ -1717,6 +1728,10 @@ public class Minecraft extends ReentrantBlockableEventLoop implements +@@ -1722,6 +1733,10 @@ public class Minecraft extends ReentrantBlockableEventLoop implements this.pendingConnection.tick(); } @@ -206,10 +206,10 @@ index 334c25a4127f6dddda3c966f25800e2b1c102a04..e79b97b31579b95bca90981a8a47f246 this.keyboardHandler.tick(); this.profiler.pop(); diff --git a/src/main/java/net/minecraft/client/gui/components/ChatComponent.java b/src/main/java/net/minecraft/client/gui/components/ChatComponent.java -index d625340ebe571852dee8f27f2b21a94d165098bc..9ec59c1de0aeb17cec0824d71bfbf8e55855031c 100644 +index 59964c89323957ab357f1a19292502de3a47737e..2ba792735a9635a20e269ab99b5654f0ebf4a0d6 100644 --- a/src/main/java/net/minecraft/client/gui/components/ChatComponent.java +++ b/src/main/java/net/minecraft/client/gui/components/ChatComponent.java -@@ -287,15 +287,27 @@ public class ChatComponent extends GuiComponent { +@@ -365,15 +365,27 @@ public class ChatComponent extends GuiComponent { } public static int getWidth(double d) { @@ -414,11 +414,11 @@ index 6813cc831731506dedf18d0b475918c149ffb8b8..12d7e2656e89ead6bd08958757328d76 String s = parseArgument(optionSet, optionSpec7); Proxy proxy = Proxy.NO_PROXY; diff --git a/src/main/java/net/minecraft/client/multiplayer/ClientPacketListener.java b/src/main/java/net/minecraft/client/multiplayer/ClientPacketListener.java -index c589d9593e66062d7c3f85e0e1decae30bf6ed79..3a62e6d250f076e92a3dd2682847392f79206567 100644 +index dadd91f0e1c9369385d29207bb1a5482a3465924..a4081163c75dfb6fb7507a7652c4ff22abbeef37 100644 --- a/src/main/java/net/minecraft/client/multiplayer/ClientPacketListener.java +++ b/src/main/java/net/minecraft/client/multiplayer/ClientPacketListener.java -@@ -288,7 +288,7 @@ import net.minecraft.world.scores.criteria.ObjectiveCriteria; - import org.apache.commons.lang3.StringUtils; +@@ -281,7 +281,7 @@ import net.minecraft.world.scores.Team; + import net.minecraft.world.scores.criteria.ObjectiveCriteria; import org.slf4j.Logger; -public class ClientPacketListener implements ClientGamePacketListener { @@ -426,7 +426,7 @@ index c589d9593e66062d7c3f85e0e1decae30bf6ed79..3a62e6d250f076e92a3dd2682847392f private static final Logger LOGGER = LogUtils.getLogger(); private static final Component GENERIC_DISCONNECT_MESSAGE = Component.translatable("disconnect.lost"); private final Connection connection; -@@ -1658,6 +1658,7 @@ public class ClientPacketListener implements ClientGamePacketListener { +@@ -1606,6 +1606,7 @@ public class ClientPacketListener implements ClientGamePacketListener { try { friendlyByteBuf = clientboundCustomPayloadPacket.getData(); @@ -774,7 +774,7 @@ index 3ef4b97f18968f75213c7d3ce9276d91b46e26c9..3dddac41cf3163217f932217c90e6f21 CrashReport.preload(); if (optionSet.has(optionSpec14)) { diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 608f29b206581bbf31b1ab1561c02c54ebcf1b0e..a9569e5116b8d8f6acf64b6c5a418712f5037076 100644 +index 3d5d90b083b96f64d88062dc7b3d687126d48f9d..7799398738a35933afda336fc91ebb2b898883c3 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -265,6 +265,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop