Skip to content

Commit

Permalink
Update to 1.19.1 Pre-release 4
Browse files Browse the repository at this point in the history
  • Loading branch information
acrylic-style committed Jul 10, 2022
1 parent 68b4d08 commit b6ea109
Show file tree
Hide file tree
Showing 11 changed files with 55 additions and 55 deletions.
4 changes: 2 additions & 2 deletions MagmaCube-Patches/0001-POM-Changes.patch
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ 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 a8478cb007b26ef2c2bcdcd99419f5173f724593..3d5d90b083b96f64d88062dc7b3d687126d48f9d 100644
index 40971e87b03fd4689bd41e3bebf03e76ab8ae43e..a670a2abd8d8849bf59a0c4d63d03af729c3ab46 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<TickTa
@@ -918,7 +918,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa

@DontObfuscate
public String getServerModName() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Subject: [PATCH] Get our version instead of magmacube's


diff --git a/src/main/java/net/minecraft/DetectedVersion.java b/src/main/java/net/minecraft/DetectedVersion.java
index 0599a17f3240b79ac70b1317553ff1584e4f4ead..9671e0ad8da0b010c6ac0109b38a14565fdb3366 100644
index 679c78c0978cf0f7f179cb307e9534e7d099f92a..56d391597231c998894c052c2cb3e2dc892b1714 100644
--- a/src/main/java/net/minecraft/DetectedVersion.java
+++ b/src/main/java/net/minecraft/DetectedVersion.java
@@ -26,7 +26,7 @@ public class DetectedVersion implements WorldVersion {
Expand Down Expand Up @@ -36,10 +36,10 @@ index 0599a17f3240b79ac70b1317553ff1584e4f4ead..9671e0ad8da0b010c6ac0109b38a1456

public static WorldVersion tryDetectVersion() {
diff --git a/src/main/java/net/minecraft/client/Minecraft.java b/src/main/java/net/minecraft/client/Minecraft.java
index 18058417adad03d06c61e5f711db46f1966548f1..914872b02766cc6822491c2ca230b3fb03d949fc 100644
index e6008cf5a14f4612e712d1db3e5978f71bacc852..7172210edb203a2bbc1d45a76189c1d666ed7adf 100644
--- a/src/main/java/net/minecraft/client/Minecraft.java
+++ b/src/main/java/net/minecraft/client/Minecraft.java
@@ -728,7 +728,7 @@ public class Minecraft extends ReentrantBlockableEventLoop<Runnable> implements
@@ -729,7 +729,7 @@ public class Minecraft extends ReentrantBlockableEventLoop<Runnable> implements
}

public String getLaunchedVersion() {
Expand Down
46 changes: 23 additions & 23 deletions MagmaCube-Patches/0004-Mods-support.patch
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ 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 914872b02766cc6822491c2ca230b3fb03d949fc..e8682313699cb2199bc365ef43b3006c748f6a4b 100644
index 7172210edb203a2bbc1d45a76189c1d666ed7adf..f6fbebbac5f45fa11c29fb0f48d19b6b9e1d48f9 100644
--- a/src/main/java/net/minecraft/client/Minecraft.java
+++ b/src/main/java/net/minecraft/client/Minecraft.java
@@ -461,7 +461,9 @@ public class Minecraft extends ReentrantBlockableEventLoop<Runnable> implements
Expand Down Expand Up @@ -128,15 +128,15 @@ index 914872b02766cc6822491c2ca230b3fb03d949fc..e8682313699cb2199bc365ef43b3006c
this.resourceManager.registerReloadListener(blockEntityWithoutLevelRenderer);
this.itemRenderer = new ItemRenderer(this.textureManager, this.modelManager, this.itemColors, blockEntityWithoutLevelRenderer);
this.resourceManager.registerReloadListener(this.itemRenderer);
@@ -548,6 +552,7 @@ public class Minecraft extends ReentrantBlockableEventLoop<Runnable> implements
@@ -549,6 +553,7 @@ public class Minecraft extends ReentrantBlockableEventLoop<Runnable> implements
this.reportingContext = ReportingContext.create(ReportEnvironment.local(), this.userApiService);
LoadingOverlay.registerTextures(this);
List<PackResources> list = this.resourcePackRepository.openAllSelected();
+ net.blueberrymc.common.Blueberry.getModLoader().callInit(); // Blueberry
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) {
@@ -557,8 +562,9 @@ public class Minecraft extends ReentrantBlockableEventLoop<Runnable> implements
@@ -558,8 +563,9 @@ public class Minecraft extends ReentrantBlockableEventLoop<Runnable> implements
this.reloadStateTracker.finishReload();
}), false));
if (s != null) {
Expand All @@ -147,7 +147,7 @@ index 914872b02766cc6822491c2ca230b3fb03d949fc..e8682313699cb2199bc365ef43b3006c
this.setScreen(BanNoticeScreen.create((flag) -> {
if (flag) {
Util.getPlatform().openUri("https://aka.ms/mcjavamoderation");
@@ -566,8 +572,9 @@ public class Minecraft extends ReentrantBlockableEventLoop<Runnable> implements
@@ -567,8 +573,9 @@ public class Minecraft extends ReentrantBlockableEventLoop<Runnable> implements

this.setScreen(new TitleScreen(true));
}, this.multiplayerBan()));
Expand All @@ -158,7 +158,7 @@ index 914872b02766cc6822491c2ca230b3fb03d949fc..e8682313699cb2199bc365ef43b3006c
}

}
@@ -744,9 +751,10 @@ public class Minecraft extends ReentrantBlockableEventLoop<Runnable> implements
@@ -745,9 +752,10 @@ public class Minecraft extends ReentrantBlockableEventLoop<Runnable> implements
}

public static void crash(CrashReport crashReport) {
Expand All @@ -170,31 +170,31 @@ index 914872b02766cc6822491c2ca230b3fb03d949fc..e8682313699cb2199bc365ef43b3006c
if (crashReport.getSaveFile() != null) {
Bootstrap.realStdoutPrintln("#@!@# Game crashed! Crash report saved to: #@!@# " + crashReport.getSaveFile());
System.exit(-1);
@@ -899,6 +907,7 @@ public class Minecraft extends ReentrantBlockableEventLoop<Runnable> implements
@@ -900,6 +908,7 @@ public class Minecraft extends ReentrantBlockableEventLoop<Runnable> implements

this.screen = screen;
BufferUploader.reset();
+ net.blueberrymc.client.event.ClientEventFactory.callScreenChangedEvent(this.screen); // Blueberry
if (screen != null) {
this.mouseHandler.releaseMouse();
KeyMapping.releaseAll();
@@ -914,6 +923,7 @@ public class Minecraft extends ReentrantBlockableEventLoop<Runnable> implements
@@ -915,6 +924,7 @@ public class Minecraft extends ReentrantBlockableEventLoop<Runnable> implements

public void setOverlay(@Nullable Overlay overlay) {
this.overlay = overlay;
+ net.blueberrymc.client.event.ClientEventFactory.callOverlayChangedEvent(overlay); // Blueberry
}

public void destroy() {
@@ -938,6 +948,7 @@ public class Minecraft extends ReentrantBlockableEventLoop<Runnable> implements
@@ -939,6 +949,7 @@ public class Minecraft extends ReentrantBlockableEventLoop<Runnable> implements
this.screen.removed();
}

+ net.blueberrymc.common.Blueberry.shutdown();
this.close();
} finally {
Util.timeSource = System::nanoTime;
@@ -1722,6 +1733,10 @@ public class Minecraft extends ReentrantBlockableEventLoop<Runnable> implements
@@ -1724,6 +1735,10 @@ public class Minecraft extends ReentrantBlockableEventLoop<Runnable> implements
this.pendingConnection.tick();
}

Expand All @@ -206,10 +206,10 @@ index 914872b02766cc6822491c2ca230b3fb03d949fc..e8682313699cb2199bc365ef43b3006c
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 59964c89323957ab357f1a19292502de3a47737e..2ba792735a9635a20e269ab99b5654f0ebf4a0d6 100644
index 0311dee00a3f408ca403ea2f4b0d66dfd262eaaf..1e3d12c9fd96dd0bb5d295acea1ade5ff6aae474 100644
--- a/src/main/java/net/minecraft/client/gui/components/ChatComponent.java
+++ b/src/main/java/net/minecraft/client/gui/components/ChatComponent.java
@@ -365,15 +365,27 @@ public class ChatComponent extends GuiComponent {
@@ -390,15 +390,27 @@ public class ChatComponent extends GuiComponent {
}

public static int getWidth(double d) {
Expand Down Expand Up @@ -414,10 +414,10 @@ 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 dadd91f0e1c9369385d29207bb1a5482a3465924..a4081163c75dfb6fb7507a7652c4ff22abbeef37 100644
index ca338f2133d2f2db6735e7beb2eed5ffa73ac46b..46066a5795a3acaa25b6a4f57ea16bd1ea9e549d 100644
--- a/src/main/java/net/minecraft/client/multiplayer/ClientPacketListener.java
+++ b/src/main/java/net/minecraft/client/multiplayer/ClientPacketListener.java
@@ -281,7 +281,7 @@ import net.minecraft.world.scores.Team;
@@ -284,7 +284,7 @@ import net.minecraft.world.scores.Team;
import net.minecraft.world.scores.criteria.ObjectiveCriteria;
import org.slf4j.Logger;

Expand All @@ -426,7 +426,7 @@ index dadd91f0e1c9369385d29207bb1a5482a3465924..a4081163c75dfb6fb7507a7652c4ff22
private static final Logger LOGGER = LogUtils.getLogger();
private static final Component GENERIC_DISCONNECT_MESSAGE = Component.translatable("disconnect.lost");
private final Connection connection;
@@ -1606,6 +1606,7 @@ public class ClientPacketListener implements ClientGamePacketListener {
@@ -1626,6 +1626,7 @@ public class ClientPacketListener implements ClientGamePacketListener {

try {
friendlyByteBuf = clientboundCustomPayloadPacket.getData();
Expand Down Expand Up @@ -697,10 +697,10 @@ index 5e5e868e9b4f4610187e03e107c6372bac8eaa20..59f194cba20fe2dd958b5afb97d23c09
int i = this.nextModelGroup++;
iterable.forEach((blockState) -> this.modelGroups.put(blockState, i));
diff --git a/src/main/java/net/minecraft/network/ConnectionProtocol.java b/src/main/java/net/minecraft/network/ConnectionProtocol.java
index 5b3610cf386b10b12c4d7f8d6c08346df450bc70..83fc14c27b1d99c63b801cbb390a0b5720b7caa7 100644
index 413c19a0bf732cc52e8ae4976baf1b032a494eb9..db2670d493492823c6d81a8652eeb088b841952e 100644
--- a/src/main/java/net/minecraft/network/ConnectionProtocol.java
+++ b/src/main/java/net/minecraft/network/ConnectionProtocol.java
@@ -195,6 +195,12 @@ public enum ConnectionProtocol {
@@ -198,6 +198,12 @@ public enum ConnectionProtocol {
STATUS(1, protocol().addFlow(PacketFlow.SERVERBOUND, (new ConnectionProtocol.PacketSet<ServerStatusPacketListener>()).addPacket(ServerboundStatusRequestPacket.class, ServerboundStatusRequestPacket::new).addPacket(ServerboundPingRequestPacket.class, ServerboundPingRequestPacket::new)).addFlow(PacketFlow.CLIENTBOUND, (new ConnectionProtocol.PacketSet<ClientStatusPacketListener>()).addPacket(ClientboundStatusResponsePacket.class, ClientboundStatusResponsePacket::new).addPacket(ClientboundPongResponsePacket.class, ClientboundPongResponsePacket::new))),
LOGIN(2, protocol().addFlow(PacketFlow.CLIENTBOUND, (new ConnectionProtocol.PacketSet<ClientLoginPacketListener>()).addPacket(ClientboundLoginDisconnectPacket.class, ClientboundLoginDisconnectPacket::new).addPacket(ClientboundHelloPacket.class, ClientboundHelloPacket::new).addPacket(ClientboundGameProfilePacket.class, ClientboundGameProfilePacket::new).addPacket(ClientboundLoginCompressionPacket.class, ClientboundLoginCompressionPacket::new).addPacket(ClientboundCustomQueryPacket.class, ClientboundCustomQueryPacket::new)).addFlow(PacketFlow.SERVERBOUND, (new ConnectionProtocol.PacketSet<ServerLoginPacketListener>()).addPacket(ServerboundHelloPacket.class, ServerboundHelloPacket::new).addPacket(ServerboundKeyPacket.class, ServerboundKeyPacket::new).addPacket(ServerboundCustomQueryPacket.class, ServerboundCustomQueryPacket::new)));

Expand Down Expand Up @@ -774,10 +774,10 @@ 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 3d5d90b083b96f64d88062dc7b3d687126d48f9d..7799398738a35933afda336fc91ebb2b898883c3 100644
index a670a2abd8d8849bf59a0c4d63d03af729c3ab46..89c7b88bd8f5d0af76fa3db8228a95bc79ba342f 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<TickTa
@@ -263,6 +263,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.proxy = proxy;
this.packRepository = packRepository;
this.resources = new MinecraftServer.ReloadableResources(worldStem.resourceManager(), worldStem.dataPackResources());
Expand All @@ -790,23 +790,23 @@ index 3d5d90b083b96f64d88062dc7b3d687126d48f9d..7799398738a35933afda336fc91ebb2b
this.services = services;
if (services.profileCache() != null) {
services.profileCache().setExecutor(this);
@@ -279,6 +285,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -277,6 +283,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.structureTemplateManager = new StructureTemplateManager(worldStem.resourceManager(), levelStorageAccess, dataFixer);
this.serverThread = thread;
this.executor = Util.backgroundExecutor();
+ if (net.blueberrymc.common.Blueberry.isServer()) net.blueberrymc.common.Blueberry.getModLoader().callInit(); // Blueberry
}
}

@@ -619,6 +626,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -617,6 +624,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.status.setVersion(new ServerStatus.Version(SharedConstants.getCurrentVersion().getName(), SharedConstants.getCurrentVersion().getProtocolVersion()));
this.status.setPreviewsChat(this.previewsChat());
this.updateStatusIcon(this.status);
+ if (net.blueberrymc.common.Blueberry.isServer()) net.blueberrymc.common.Blueberry.getModLoader().callPostInit(); // Blueberry

while(this.running) {
long l = Util.getMillis() - this.nextTickTime;
@@ -813,6 +821,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -811,6 +819,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
LOGGER.debug("Autosave finished");
}

Expand All @@ -831,7 +831,7 @@ index 0d4e654c0b135d5c42226ffc457b34e2428cb0f3..8063cbdf6d6178dded1aea7486ef0dd2
Util.shutdownExecutors();
SkullBlockEntity.clear();
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index cbd3359e3394a7581db377790820de4957c0bc53..9afd6a3fe71dbbb29d26c6539815babba592a055 100644
index a788de377282c3a9005e6975bc8c765d41fd1917..8e2548f78cd9d95d37e10401bef99beb95aaf1f8 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -170,7 +170,7 @@ import net.minecraft.world.phys.shapes.VoxelShape;
Expand All @@ -843,7 +843,7 @@ index cbd3359e3394a7581db377790820de4957c0bc53..9afd6a3fe71dbbb29d26c6539815babb
static final Logger LOGGER = LogUtils.getLogger();
private static final int LATENCY_CHECK_INTERVAL = 15000;
public static final double MAX_INTERACTION_DISTANCE = Mth.square(6.0D);
@@ -1596,6 +1596,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
@@ -1603,6 +1603,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
}

public void handleCustomPayload(ServerboundCustomPayloadPacket serverboundCustomPayloadPacket) {
Expand Down
2 changes: 1 addition & 1 deletion MagmaCube-Patches/0005-Client-side-command-support.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Subject: [PATCH] Client-side command support


diff --git a/src/main/java/net/minecraft/client/gui/components/CommandSuggestions.java b/src/main/java/net/minecraft/client/gui/components/CommandSuggestions.java
index 15fd267f503ebaa2afe05a3bc18f0fcefe7fa37e..268aee1d16e07818b88906b9ce7d0a2967d0aaa1 100644
index d93497c6c11aeb206582cfdf47ca8f93a8815e74..7980f442d9122a49d98f18b527adc5ec405df034 100644
--- a/src/main/java/net/minecraft/client/gui/components/CommandSuggestions.java
+++ b/src/main/java/net/minecraft/client/gui/components/CommandSuggestions.java
@@ -170,7 +170,13 @@ public class CommandSuggestions {
Expand Down
16 changes: 8 additions & 8 deletions MagmaCube-Patches/0011-Fire-simple-events.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,23 @@ Subject: [PATCH] Fire simple events


diff --git a/src/main/java/net/minecraft/client/player/LocalPlayer.java b/src/main/java/net/minecraft/client/player/LocalPlayer.java
index 3ce5109711b0108df4cb284297fa643a0ceaf5c6..b99f4050f7fb375d2268f24e22db4f568f3f34ec 100644
index 9b16098a3e03a8f3059284d47786cb831a7ea85a..ee0608573487d1aa0f0036e3af7ffd2ef5e15e65 100644
--- a/src/main/java/net/minecraft/client/player/LocalPlayer.java
+++ b/src/main/java/net/minecraft/client/player/LocalPlayer.java
@@ -289,6 +289,13 @@ public class LocalPlayer extends AbstractClientPlayer {
@@ -294,6 +294,13 @@ public class LocalPlayer extends AbstractClientPlayer {
}

public void chatSigned(String s, @Nullable Component component) {
private void sendChat(String s, @Nullable Component component) {
+ // Blueberry start - fire ClientLocalPlayerChatEvent
+ var event = new net.blueberrymc.client.event.player.ClientLocalPlayerChatEvent(s);
+ if (!event.callEvent()) {
+ return;
+ }
+ s = event.getMessage();
+ // Blueberry end - fire ClientLocalPlayerChatEvent
MessageSigner messageSigner = MessageSigner.create(this.getUUID());
this.sendChat(messageSigner, s, component);
}
MessageSigner messageSigner = this.createMessageSigner();
if (component != null) {
MessageSignature messageSignature = this.signMessage(messageSigner, component);
diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java
index a19a2c72bf9bd177718b7e4b19f63b3162052cde..c65049641fc01204dd9d105880e0e2b15fc96c79 100644
--- a/src/main/java/net/minecraft/network/Connection.java
Expand All @@ -43,10 +43,10 @@ index a19a2c72bf9bd177718b7e4b19f63b3162052cde..c65049641fc01204dd9d105880e0e2b1

public void handleDisconnection() {
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index b563132c91441a54a05c5792adf5861142358a7d..b8db47f9efb45c3a5f77ef5976a1e3fcf9ec36ab 100644
index 3a2fe79a8625dfb37b8facb250edd84cffa4db86..61fbcf4209d30f98f287312aca251952f3deed7a 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -190,6 +190,7 @@ public abstract class PlayerList {
@@ -193,6 +193,7 @@ public abstract class PlayerList {
}

serverLevel2.addNewPlayer(serverPlayer);
Expand Down
Loading

0 comments on commit b6ea109

Please sign in to comment.