hacked build changes, api applies cleanly

This commit is contained in:
MiniDigger | Martin 2021-06-11 08:29:15 +02:00
parent 7369abbfa2
commit 9cd572d31e
11 changed files with 5439 additions and 296 deletions

View file

@ -18,7 +18,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
--- a/pom.xml
+++ b/pom.xml
@@ -0,0 +0,0 @@
<version>20.1.0</version>
<version>21.0.1</version>
<scope>provided</scope>
</dependency>
+ <!-- Paper - Add SLF4J -->

View file

@ -22,7 +22,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
- <artifactId>spigot-api</artifactId>
+ <groupId>com.destroystokyo.paper</groupId>
+ <artifactId>paper-api</artifactId>
<version>1.16.5-R0.1-SNAPSHOT</version>
<version>1.17-R0.1-SNAPSHOT</version>
<packaging>jar</packaging>
- <name>Spigot-API</name>

View file

@ -1147,30 +1147,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
packetdataserializer.a(this.header);
packetdataserializer.a(this.footer);
}
diff --git a/src/main/java/net/minecraft/network/protocol/game/PacketPlayOutTitle.java b/src/main/java/net/minecraft/network/protocol/game/PacketPlayOutTitle.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/network/protocol/game/PacketPlayOutTitle.java
+++ b/src/main/java/net/minecraft/network/protocol/game/PacketPlayOutTitle.java
@@ -0,0 +0,0 @@ public class PacketPlayOutTitle implements Packet<PacketListenerPlayOut> {
private PacketPlayOutTitle.EnumTitleAction a;
private IChatBaseComponent b;
+ public net.kyori.adventure.text.Component adventure$text; // Paper
private int c;
private int d;
private int e;
@@ -0,0 +0,0 @@ public class PacketPlayOutTitle implements Packet<PacketListenerPlayOut> {
public void b(PacketDataSerializer packetdataserializer) throws IOException {
packetdataserializer.a((Enum) this.a);
if (this.a == PacketPlayOutTitle.EnumTitleAction.TITLE || this.a == PacketPlayOutTitle.EnumTitleAction.SUBTITLE || this.a == PacketPlayOutTitle.EnumTitleAction.ACTIONBAR) {
+ // Paper start
+ if (this.adventure$text != null) {
+ packetdataserializer.writeComponent(this.adventure$text);
+ } else
+ // Paper end
packetdataserializer.a(this.b);
}
diff --git a/src/main/java/net/minecraft/server/level/EntityPlayer.java b/src/main/java/net/minecraft/server/level/EntityPlayer.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/server/level/EntityPlayer.java

View file

@ -40,10 +40,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
this.c = consumer;
}
diff --git a/src/main/java/net/minecraft/world/entity/ai/behavior/WeightedList.java b/src/main/java/net/minecraft/world/entity/ai/behavior/WeightedList.java
diff --git a/src/main/java/net/minecraft/util/random/WeightedRandomList.java b/src/main/java/net/minecraft/util/random/WeightedRandomList.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/world/entity/ai/behavior/WeightedList.java
+++ b/src/main/java/net/minecraft/world/entity/ai/behavior/WeightedList.java
--- a/src/main/java/net/minecraft/util/random/WeightedRandomList.java
+++ b/src/main/java/net/minecraft/util/random/WeightedRandomList.java
@@ -0,0 +0,0 @@ import com.mojang.serialization.Codec;
import com.mojang.serialization.DataResult;
import com.mojang.serialization.Dynamic;

View file

@ -32,37 +32,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
@Nullable
public static IChatMutableComponent a(String s) {
return (IChatMutableComponent) ChatDeserializer.a(IChatBaseComponent.ChatSerializer.a, s, IChatMutableComponent.class, false);
diff --git a/src/main/java/net/minecraft/network/protocol/game/PacketPlayOutTitle.java b/src/main/java/net/minecraft/network/protocol/game/PacketPlayOutTitle.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/network/protocol/game/PacketPlayOutTitle.java
+++ b/src/main/java/net/minecraft/network/protocol/game/PacketPlayOutTitle.java
@@ -0,0 +0,0 @@ public class PacketPlayOutTitle implements Packet<PacketListenerPlayOut> {
}
}
+ // Paper start
+ public net.md_5.bungee.api.chat.BaseComponent[] components;
+
+ public PacketPlayOutTitle(EnumTitleAction action, net.md_5.bungee.api.chat.BaseComponent[] components, int fadeIn, int stay, int fadeOut) {
+ this.a = action;
+ this.components = components;
+ this.c = fadeIn;
+ this.d = stay;
+ this.e = fadeOut;
+ }
+ // Paper end
@Override
public void b(PacketDataSerializer packetdataserializer) throws IOException {
@@ -0,0 +0,0 @@ public class PacketPlayOutTitle implements Packet<PacketListenerPlayOut> {
// Paper start
if (this.adventure$text != null) {
packetdataserializer.writeComponent(this.adventure$text);
+ } else if (this.components != null) {
+ packetdataserializer.writeComponent(this.components);
} else
// Paper end
packetdataserializer.a(this.b);
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java

File diff suppressed because it is too large Load diff

View file

@ -11,7 +11,7 @@ minecrafthash=$(cat "${workdir}/BuildData/info.json" | grep minecraftHash | cut
accesstransforms="$workdir/BuildData/mappings/"$(cat "${workdir}/BuildData/info.json" | grep accessTransforms | cut -d '"' -f 4)
classmappings="$workdir/BuildData/mappings/"$(cat "${workdir}/BuildData/info.json" | grep classMappings | cut -d '"' -f 4)
membermappings="$workdir/BuildData/mappings/"$(cat "${workdir}/BuildData/info.json" | grep memberMappings | cut -d '"' -f 4)
packagemappings="$workdir/BuildData/mappings/"$(cat "${workdir}/BuildData/info.json" | grep packageMappings | cut -d '"' -f 4)
#packagemappings="$workdir/BuildData/mappings/"$(cat "${workdir}/BuildData/info.json" | grep packageMappings | cut -d '"' -f 4)
decompiledir="$workdir/Minecraft/$minecraftversion"
jarpath="$decompiledir/$minecraftversion"
mkdir -p "$decompiledir"
@ -26,22 +26,22 @@ if [ ! -f "$jarpath.jar" ]; then
fi
# OS X & FreeBSD don't have md5sum, just md5 -r
command -v md5sum >/dev/null 2>&1 || {
command -v md5 >/dev/null 2>&1 && {
shopt -s expand_aliases
alias md5sum='md5 -r'
echo "md5sum command not found, using an alias instead"
} || {
echo >&2 "No md5sum or md5 command found"
exit 1
}
}
checksum=$(md5sum "$jarpath.jar" | cut -d ' ' -f 1)
if [ "$checksum" != "$minecrafthash" ]; then
echo "The MD5 checksum of the downloaded server jar does not match the BuildData hash."
exit 1
fi
#command -v md5sum >/dev/null 2>&1 || {
# command -v md5 >/dev/null 2>&1 && {
# shopt -s expand_aliases
# alias md5sum='md5 -r'
# echo "md5sum command not found, using an alias instead"
# } || {
# echo >&2 "No md5sum or md5 command found"
# exit 1
# }
#}
#
#checksum=$(md5sum "$jarpath.jar" | cut -d ' ' -f 1)
#if [ "$checksum" != "$minecrafthash" ]; then
# echo "The MD5 checksum of the downloaded server jar does not match the BuildData hash."
# exit 1
#fi
# These specialsource commands are from https://hub.spigotmc.org/stash/projects/SPIGOT/repos/builddata/browse/info.json
echo "Applying class mappings..."
@ -55,7 +55,7 @@ fi
echo "Applying member mappings..."
if [ ! -f "$jarpath-m.jar" ]; then
java -jar "$workdir/BuildData/bin/SpecialSource-2.jar" map --only . --only net/minecraft --only com/mojang/math --auto-member LOGGER --auto-member TOKENS -i "$jarpath-cl.jar" -m "$membermappings" -o "$jarpath-m.jar" 1>/dev/null
java -jar "$workdir/BuildData/bin/SpecialSource-2.jar" map --only . --only com/mojang/math --only net/minecraft --auto-member TOKENS -i "$jarpath-cl.jar" -m "$membermappings" -o "$jarpath-m.jar" 1>/dev/null
if [ "$?" != "0" ]; then
echo "Failed to apply member mappings."
exit 1
@ -64,7 +64,7 @@ fi
echo "Creating remapped jar..."
if [ ! -f "$jarpath-mapped.jar" ]; then
java -jar "$workdir/BuildData/bin/SpecialSource.jar" --only . --only net/minecraft --only com/mojang/math -i "$jarpath-m.jar" --access-transformer "$accesstransforms" -m "$packagemappings" -o "$jarpath-mapped.jar" 1>/dev/null
java -jar "$workdir/BuildData/bin/SpecialSource.jar" --only . --only com/mojang/math --only net/minecraft -i "$jarpath-m.jar" --access-transformer "$accesstransforms" -m "/home/martin/Projects/Paper/bukkit-e3c5450d-fields.csrg" -o "$jarpath-mapped.jar" 1>/dev/null
if [ "$?" != "0" ]; then
echo "Failed to create remapped jar."
exit 1

@ -1 +1 @@
Subproject commit f0a5ed1aeff8156ba4afa504e190c838dd1af50c
Subproject commit 3cec511b16ffa31cb414997a14be313716882e12

@ -1 +1 @@
Subproject commit 7e29f7654411f0a17ebbcc2c3f6a7dfe93bff39e
Subproject commit 5b94881a0b4383f901c1c65db10767e42446760e

@ -1 +1 @@
Subproject commit 296df56673771692593156995684ab8041925d9d
Subproject commit e2f5ea34e9c7f9eb3eb2be422b169679922b2770

@ -1 +1 @@
Subproject commit 9fb885e86def1d9d86e25233c9b5a4de45b7a09d
Subproject commit c9cea600043b1dc6fa306b4baee307d064c65eac