Skip to content

Commit

Permalink
Update to 21w18a
Browse files Browse the repository at this point in the history
  • Loading branch information
acrylic-style committed May 7, 2021
1 parent b233f46 commit 68de62f
Show file tree
Hide file tree
Showing 9 changed files with 53 additions and 65 deletions.
2 changes: 1 addition & 1 deletion MagmaCube
14 changes: 7 additions & 7 deletions MagmaCube-Patches/0001-POM-Changes.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Subject: [PATCH] POM Changes


diff --git a/pom.xml b/pom.xml
index 22b4e07ebde68478537a244c0202e3ae96f58f27..f02562fbdd90bccbb4a7723246d01020b618ef92 100644
index 0045738f3f9699d7f30d79fc61556ccd2babf2de..a66ea00d7c61664f49ddb570756354b727813a42 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3,9 +3,11 @@
Expand All @@ -14,7 +14,7 @@ index 22b4e07ebde68478537a244c0202e3ae96f58f27..f02562fbdd90bccbb4a7723246d01020
<parent>
- <artifactId>minecraft-parent</artifactId>
- <groupId>xyz.acrylicstyle.minecraft</groupId>
- <version>21w16a</version>
- <version>21w18a</version>
+ <!-- Blueberry start -->
+ <artifactId>blueberry-parent</artifactId>
+ <groupId>net.blueberrymc</groupId>
Expand All @@ -30,7 +30,7 @@ index 22b4e07ebde68478537a244c0202e3ae96f58f27..f02562fbdd90bccbb4a7723246d01020
- <artifactId>minecraft</artifactId>
+ <!-- Blueberry start -->
+ <artifactId>blueberry</artifactId>
+ <version>21w16a</version>
+ <version>21w18a</version>
+ <name>Blueberry-Client</name>
+ <!-- Blueberry end -->

Expand Down Expand Up @@ -75,7 +75,7 @@ index 22b4e07ebde68478537a244c0202e3ae96f58f27..f02562fbdd90bccbb4a7723246d01020
+ <dependency>
+ <groupId>net.blueberrymc</groupId>
+ <artifactId>blueberry-api</artifactId>
+ <version>0.0.9</version>
+ <version>0.0.10</version>
+ </dependency>
+ <dependency>
+ <groupId>net.blueberrymc</groupId>
Expand All @@ -100,15 +100,15 @@ index 3dfa9e25c0ab623f4e6ba69e5036b834e77d2b06..47c2cda2d180edf7965ced35eca7205b
}
\ No newline at end of file
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index f69284dea5a2ae9d68b14cbb631e74f3e81e995b..0ab25f313b1f6a8c32a985e3afd786ab0b5795e7 100644
index 384e3f60db7bdb8d53516a754f2a7150525b8aca..7bbf86c1e7393ac35d7f2f1b0cec882cb20e5cf3 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -918,7 +918,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -920,7 +920,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa

@DontObfuscate
public String getServerModName() {
- return "vanilla";
+ return "blueberry"; // Blueberry > vanilla
}

public CrashReport fillReport(CrashReport crashReport) {
public void fillReport(CrashReportCategory crashReportCategory) {
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 5c5c4905d5b4ba3bab763dfe3aeb35a87e19ec4a..f4f2548e316920eb0360d3dd7ca2d59196f855a5 100644
index 7aff0d1f8b6e1335711de5a7c9c31481252c5d1a..7e16263868f665b6f9f1db4484c382a9e85a0b5f 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 GameVersion {
Expand Down Expand Up @@ -36,10 +36,10 @@ index 5c5c4905d5b4ba3bab763dfe3aeb35a87e19ec4a..f4f2548e316920eb0360d3dd7ca2d591

public static GameVersion tryDetectVersion() {
diff --git a/src/main/java/net/minecraft/client/Minecraft.java b/src/main/java/net/minecraft/client/Minecraft.java
index 8de9e84ae7ea8af1a5746df169dd409f07730b09..60d1d248cbf49dd734da3dffc63ced8ce06e4731 100644
index 997a39b0768e92858fd19a938e2cc670bd2a0f68..57aa259dc751e86f036b572f5eb83297623f9a1b 100644
--- a/src/main/java/net/minecraft/client/Minecraft.java
+++ b/src/main/java/net/minecraft/client/Minecraft.java
@@ -686,7 +686,7 @@ public class Minecraft extends ReentrantBlockableEventLoop<Runnable> implements
@@ -691,7 +691,7 @@ public class Minecraft extends ReentrantBlockableEventLoop<Runnable> implements
}

public String getLaunchedVersion() {
Expand Down
57 changes: 22 additions & 35 deletions MagmaCube-Patches/0003-Mods-support.patch

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions MagmaCube-Patches/0005-Custom-BlockEntity-renderer-support.patch
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ index 0000000000000000000000000000000000000000..7b1e2686690e9d7df32131010891223b
+public class BlueberryServerImpl extends BlueberryServer {
+}
diff --git a/src/main/java/net/minecraft/client/Minecraft.java b/src/main/java/net/minecraft/client/Minecraft.java
index aef319b440a4b30e50d71023ec187f383f13faf1..cea4150e862cf92430ca3f42d1787152c4757808 100644
index fffe19cca86be5623083816352371c7f46bcd120..cecf070cbf5e2ac3a3e6099e4eaa07ab7f947e98 100644
--- a/src/main/java/net/minecraft/client/Minecraft.java
+++ b/src/main/java/net/minecraft/client/Minecraft.java
@@ -470,6 +470,7 @@ public class Minecraft extends ReentrantBlockableEventLoop<Runnable> implements
@@ -472,6 +472,7 @@ public class Minecraft extends ReentrantBlockableEventLoop<Runnable> implements
this.blockEntityRenderDispatcher = new BlockEntityRenderDispatcher(this.font, this.entityModels, this::getBlockRenderer);
this.resourceManager.registerReloadListener(this.blockEntityRenderDispatcher);
BlockEntityWithoutLevelRenderer blockEntityWithoutLevelRenderer = new BlockEntityWithoutLevelRenderer(this.blockEntityRenderDispatcher, this.entityModels);
Expand All @@ -54,7 +54,7 @@ index aef319b440a4b30e50d71023ec187f383f13faf1..cea4150e862cf92430ca3f42d1787152
this.itemRenderer = new ItemRenderer(this.textureManager, this.modelManager, this.itemColors, blockEntityWithoutLevelRenderer);
this.entityRenderDispatcher = new EntityRenderDispatcher(this.textureManager, this.itemRenderer, this.font, this.options, this.entityModels);
diff --git a/src/main/java/net/minecraft/client/main/Main.java b/src/main/java/net/minecraft/client/main/Main.java
index 2f45dcb412be3ecca0462404d64da53465c16707..31ce8f054b686929c1999bec5bc0da1b7d1e7134 100644
index 02fc5e7e3b475becc8a1c033156a70f6bd371f4c..755f548a2fea0d68ccf73f8b2814bc80d2261904 100644
--- a/src/main/java/net/minecraft/client/main/Main.java
+++ b/src/main/java/net/minecraft/client/main/Main.java
@@ -80,7 +80,7 @@ public class Main {
Expand Down Expand Up @@ -135,7 +135,7 @@ index 06f8fadd15da65ebbc246edb41d2685c966bf1f3..ac59622d70338f22f6fb35eb5a28cf0e
}

diff --git a/src/main/java/net/minecraft/client/renderer/entity/ItemRenderer.java b/src/main/java/net/minecraft/client/renderer/entity/ItemRenderer.java
index 2a2750f4107fa71029eb029b1dec703cc528735e..436f9e82a2791250248614daa89fe5b15ee399fb 100644
index 82a2dfad4f0547da9992ce8c04d5af9710b8ff43..7ecac52ef0f618f9fb46418e9997776d64ddbfbe 100644
--- a/src/main/java/net/minecraft/client/renderer/entity/ItemRenderer.java
+++ b/src/main/java/net/minecraft/client/renderer/entity/ItemRenderer.java
@@ -152,7 +152,7 @@ public class ItemRenderer implements ResourceManagerReloadListener {
Expand Down Expand Up @@ -173,7 +173,7 @@ index e771cba46855f40b9ccdee0d9669e2d10f3e6347..c1f8118b36630699ff59adbbe302dc86
return this.title;
}
diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java
index b592e8a1f804524ff51e0310076d9e87323e0a14..f26c59dff13507c783b18ef3ea316b191321965d 100644
index 6a2f1358e1aa44477222e4e6588094f0504a7930..99c68ecbef28ce60bf5878de0faba17ac7054693 100644
--- a/src/main/java/net/minecraft/server/Main.java
+++ b/src/main/java/net/minecraft/server/Main.java
@@ -84,7 +84,7 @@ public class Main {
Expand Down Expand Up @@ -208,7 +208,7 @@ index 631631221d5f2b26635da9513564531f8cf90baf..cc57add0223b8a963495e91571e29fd0
T create(int var1, Inventory var2);
}
diff --git a/src/main/java/net/minecraft/world/item/Item.java b/src/main/java/net/minecraft/world/item/Item.java
index a0ebe94a8ffdb14f339f0a09fdf5e6a148cae359..486158c72e554ee08895a91561674b941e6cbddc 100644
index 248e5596da0eede0b6e32bd96819af33821315a2..bfb6477d47f3170c01b80bc3c7d91c14fe6d8051 100644
--- a/src/main/java/net/minecraft/world/item/Item.java
+++ b/src/main/java/net/minecraft/world/item/Item.java
@@ -93,6 +93,7 @@ public class Item implements ItemLike {
Expand Down
14 changes: 7 additions & 7 deletions MagmaCube-Patches/0012-BungeeCord-ip_forward-support.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Subject: [PATCH] BungeeCord ip_forward support


diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java
index 30ce67778f066cd2cd3e1c2589d3960443572c17..142b9afa06518780feebdbc201d4c1625f445fd5 100644
index 906399d8b60ab15e966aa0b816d5601267d6581d..4e3a9958c785d3b3381c5d497e8f1618d016e74a 100644
--- a/src/main/java/net/minecraft/network/Connection.java
+++ b/src/main/java/net/minecraft/network/Connection.java
@@ -61,6 +61,11 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> {
Expand All @@ -28,7 +28,7 @@ index 30ce67778f066cd2cd3e1c2589d3960443572c17..142b9afa06518780feebdbc201d4c162

try {
this.setProtocol(ConnectionProtocol.HANDSHAKING);
@@ -247,6 +253,7 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> {
@@ -254,6 +260,7 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> {
}

public void disconnect(Component component) {
Expand All @@ -37,7 +37,7 @@ index 30ce67778f066cd2cd3e1c2589d3960443572c17..142b9afa06518780feebdbc201d4c162
this.channel.close().awaitUninterruptibly();
this.disconnectedReason = component;
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
index 3a96942edf09d76b5fb6642111d4b3f2f3d657aa..fec499caf2b42f668b68812a18a538b106a3d10e 100644
index c4d585cf77ee4032ffe0478599b49c1fedea6971..b3fa66b3d85de03487bbf3786b29f6a3fbb69e3f 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
@@ -152,7 +152,14 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
Expand Down Expand Up @@ -106,10 +106,10 @@ index 43c098bdbd21d7f8c8c27575c9f0514916ed6e80..c8eb192e580720babff6ac86b5b023c7
break;
case STATUS:
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
index 1a57f78a124de97b55312318c182e6f4ac106808..971db17c342f88d3c36b0a49e04a4ae5eb60dd31 100644
index ef67f68820413086108b62ef1e8a5d916c5c01b9..e110e2c1d574980a0de17206270ee1dca8504c74 100644
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
@@ -92,7 +92,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener
@@ -93,7 +93,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener
}

public void handleAcceptedLogin() {
Expand All @@ -118,7 +118,7 @@ index 1a57f78a124de97b55312318c182e6f4ac106808..971db17c342f88d3c36b0a49e04a4ae5
this.gameProfile = this.createFakeProfile(this.gameProfile);
}

@@ -129,6 +129,18 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener
@@ -138,6 +138,18 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener
return this.gameProfile != null ? this.gameProfile + " (" + this.connection.getRemoteAddress() + ")" : String.valueOf(this.connection.getRemoteAddress());
}

Expand All @@ -137,7 +137,7 @@ index 1a57f78a124de97b55312318c182e6f4ac106808..971db17c342f88d3c36b0a49e04a4ae5
public void handleHello(ServerboundHelloPacket serverboundHelloPacket) {
Validate.validState(this.state == ServerLoginPacketListenerImpl.State.HELLO, "Unexpected hello packet", new Object[0]);
this.gameProfile = serverboundHelloPacket.getGameProfile();
@@ -136,6 +148,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener
@@ -145,6 +157,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener
this.state = ServerLoginPacketListenerImpl.State.KEY;
this.connection.send(new ClientboundHelloPacket("", this.server.getKeyPair().getPublic().getEncoded(), this.nonce));
} else {
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Whilst I try not to break API compatibility, but things could change at anytime!
- Can't join using BungeeCord/Waterfall? (needs testing)

## Todo
- Apply bspatch at installer, not at runtime.
- multiplayer support
- "deny" incompatible clients, it just shows "incompatible" in client/server menu and users can connect

Expand Down
8 changes: 4 additions & 4 deletions scripts/files/version.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,10 @@
},
"assetIndex": {
"id": "1.17",
"sha1": "0198cb89458ae865669d11bcf4ddc014b02e204b",
"size": 345817,
"totalSize": 343713608,
"url": "https://launchermeta.mojang.com/v1/packages/0198cb89458ae865669d11bcf4ddc014b02e204b/1.17.json"
"sha1": "7ccefbf653a0f407c655522dab844e29baa0cefb",
"size": 346007,
"totalSize": 344729165,
"url": "https://launchermeta.mojang.com/v1/packages/7ccefbf653a0f407c655522dab844e29baa0cefb/1.17.json"
},
"assets": "1.17",
"logging": {
Expand Down
4 changes: 2 additions & 2 deletions scripts/functions.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
export version=21w16a
export version=21w18a
export basedir="$(pwd -P)"
export clientJarUrl="https://launcher.mojang.com/v1/objects/f124f2aad604e88f27f010834d82c7af85506b6c/client.jar"
export clientJarUrl="https://launcher.mojang.com/v1/objects/f52cf94abf99911ca88c12f776bcf30c9b6f1617/client.jar"

0 comments on commit 68de62f

Please sign in to comment.