diff --git a/sparklypaper-api/paper-patches/files/src/main/java/com/destroystokyo/paper/MaterialTags.java.patch b/sparklypaper-api/paper-patches/files/src/main/java/com/destroystokyo/paper/MaterialTags.java.patch index 80cdb0b..81d7577 100644 --- a/sparklypaper-api/paper-patches/files/src/main/java/com/destroystokyo/paper/MaterialTags.java.patch +++ b/sparklypaper-api/paper-patches/files/src/main/java/com/destroystokyo/paper/MaterialTags.java.patch @@ -8,11 +8,19 @@ .ensureSize("CONCRETES", 16).lock(); /** -@@ -152,6 +_,7 @@ - */ - public static final MaterialSetTag GLAZED_TERRACOTTA = new MaterialSetTag(keyFor("glazed_terracotta")) - .endsWith("GLAZED_TERRACOTTA") +@@ -161,6 +_,7 @@ + .endsWith("TERRACOTTA") + .not(Material.TERRACOTTA) + .notEndsWith("GLAZED_TERRACOTTA") + .notStartsWith("SPARKLYPOWER_") // SparklyPaper - custom blocks - .ensureSize("GLAZED_TERRACOTTA", 16).lock(); + .ensureSize("STAINED_TERRACOTTA", 16).lock(); + + /** +@@ -168,6 +_,7 @@ + */ + public static final MaterialSetTag TERRACOTTA = new MaterialSetTag(keyFor("terracotta")) + .endsWith("TERRACOTTA") ++ .notStartsWith("SPARKLYPOWER_") // SparklyPaper - custom blocks + .ensureSize("TERRACOTTA", 33).lock(); /** diff --git a/sparklypaper-server/minecraft-patches/sources/net/minecraft/network/protocol/game/ClientboundAddEntityPacket.java.patch b/sparklypaper-server/minecraft-patches/sources/net/minecraft/network/protocol/game/ClientboundAddEntityPacket.java.patch new file mode 100644 index 0000000..de8f0fb --- /dev/null +++ b/sparklypaper-server/minecraft-patches/sources/net/minecraft/network/protocol/game/ClientboundAddEntityPacket.java.patch @@ -0,0 +1,44 @@ +--- a/net/minecraft/network/protocol/game/ClientboundAddEntityPacket.java ++++ b/net/minecraft/network/protocol/game/ClientboundAddEntityPacket.java +@@ -22,7 +_,7 @@ + private static final double LIMIT = 3.9; + private final int id; + private final UUID uuid; +- private final EntityType type; ++ public EntityType type; // SparklyPaper - Helpful NMS packet changes: remove final and make public + private final double x; + private final double y; + private final double z; +@@ -179,6 +_,32 @@ + public float getYHeadRot() { + return Mth.unpackDegrees(this.yHeadRot); + } ++ ++ // SparklyPaper - Helpful NMS packet changes: expose raw rotational fields ++ public int getXaRaw() { ++ return this.xa; ++ } ++ ++ public int getYaRaw() { ++ return this.ya; ++ } ++ ++ public int getZaRaw() { ++ return this.za; ++ } ++ ++ public byte getXRotRaw() { ++ return this.xRot; ++ } ++ ++ public byte getYRotRaw() { ++ return this.yRot; ++ } ++ ++ public byte getYHeadRotRaw() { ++ return this.yHeadRot; ++ } ++ // SparklyPaper end + + public int getData() { + return this.data; diff --git a/sparklypaper-server/minecraft-patches/sources/net/minecraft/network/protocol/game/ClientboundBlockUpdatePacket.java.patch b/sparklypaper-server/minecraft-patches/sources/net/minecraft/network/protocol/game/ClientboundBlockUpdatePacket.java.patch new file mode 100644 index 0000000..834539d --- /dev/null +++ b/sparklypaper-server/minecraft-patches/sources/net/minecraft/network/protocol/game/ClientboundBlockUpdatePacket.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/network/protocol/game/ClientboundBlockUpdatePacket.java ++++ b/net/minecraft/network/protocol/game/ClientboundBlockUpdatePacket.java +@@ -19,7 +_,7 @@ + ClientboundBlockUpdatePacket::new + ); + private final BlockPos pos; +- public final BlockState blockState; ++ public BlockState blockState; // SparklyPaper - Helpful NMS packet changes: remove final + + public ClientboundBlockUpdatePacket(BlockPos pos, BlockState blockState) { + this.pos = pos; diff --git a/sparklypaper-server/minecraft-patches/sources/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java.patch b/sparklypaper-server/minecraft-patches/sources/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java.patch new file mode 100644 index 0000000..6ae8930 --- /dev/null +++ b/sparklypaper-server/minecraft-patches/sources/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java ++++ b/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java +@@ -30,7 +_,7 @@ + ); + private static final int TWO_MEGABYTES = 2097152; + private final Map heightmaps; +- private final byte[] buffer; ++ public byte[] buffer; // SparklyPaper - Helpful NMS packet changes: remove final and make public + private final List blockEntitiesData; + // Paper start - Handle oversized block entities in chunks + private final java.util.List> extraPackets = new java.util.ArrayList<>(); diff --git a/sparklypaper-server/minecraft-patches/sources/net/minecraft/network/protocol/game/ClientboundRotateHeadPacket.java.patch b/sparklypaper-server/minecraft-patches/sources/net/minecraft/network/protocol/game/ClientboundRotateHeadPacket.java.patch new file mode 100644 index 0000000..ddeeaf3 --- /dev/null +++ b/sparklypaper-server/minecraft-patches/sources/net/minecraft/network/protocol/game/ClientboundRotateHeadPacket.java.patch @@ -0,0 +1,16 @@ +--- a/net/minecraft/network/protocol/game/ClientboundRotateHeadPacket.java ++++ b/net/minecraft/network/protocol/game/ClientboundRotateHeadPacket.java +@@ -20,6 +_,13 @@ + this.yHeadRot = yHeadRot; + } + ++ // SparklyPaper start - Helpful NMS packet changes: add entity ID constructor ++ public ClientboundRotateHeadPacket(int entityId, byte headYaw) { ++ this.entityId = entityId; ++ this.yHeadRot = headYaw; ++ } ++ // SparklyPaper end ++ + private ClientboundRotateHeadPacket(FriendlyByteBuf buffer) { + this.entityId = buffer.readVarInt(); + this.yHeadRot = buffer.readByte(); diff --git a/sparklypaper-server/minecraft-patches/sources/net/minecraft/network/protocol/game/ClientboundSectionBlocksUpdatePacket.java.patch b/sparklypaper-server/minecraft-patches/sources/net/minecraft/network/protocol/game/ClientboundSectionBlocksUpdatePacket.java.patch new file mode 100644 index 0000000..5e3f656 --- /dev/null +++ b/sparklypaper-server/minecraft-patches/sources/net/minecraft/network/protocol/game/ClientboundSectionBlocksUpdatePacket.java.patch @@ -0,0 +1,15 @@ +--- a/net/minecraft/network/protocol/game/ClientboundSectionBlocksUpdatePacket.java ++++ b/net/minecraft/network/protocol/game/ClientboundSectionBlocksUpdatePacket.java +@@ -17,9 +_,9 @@ + ClientboundSectionBlocksUpdatePacket::write, ClientboundSectionBlocksUpdatePacket::new + ); + private static final int POS_IN_SECTION_BITS = 12; +- private final SectionPos sectionPos; +- private final short[] positions; +- private final BlockState[] states; ++ public SectionPos sectionPos; // SparklyPaper - Helpful NMS packet changes: remove final and make public ++ public short[] positions; // SparklyPaper - Helpful NMS packet changes: remove final and make public ++ public BlockState[] states; // SparklyPaper - Helpful NMS packet changes: remove final and make public + + public ClientboundSectionBlocksUpdatePacket(SectionPos sectionPos, ShortSet positions, LevelChunkSection section) { + this.sectionPos = sectionPos; diff --git a/sparklypaper-server/minecraft-patches/sources/net/minecraft/network/protocol/game/ClientboundSetCameraPacket.java.patch b/sparklypaper-server/minecraft-patches/sources/net/minecraft/network/protocol/game/ClientboundSetCameraPacket.java.patch new file mode 100644 index 0000000..f72fe18 --- /dev/null +++ b/sparklypaper-server/minecraft-patches/sources/net/minecraft/network/protocol/game/ClientboundSetCameraPacket.java.patch @@ -0,0 +1,15 @@ +--- a/net/minecraft/network/protocol/game/ClientboundSetCameraPacket.java ++++ b/net/minecraft/network/protocol/game/ClientboundSetCameraPacket.java +@@ -22,6 +_,12 @@ + this.cameraId = buffer.readVarInt(); + } + ++ // SparklyPaper - Helpful NMS packet changes: add direct entityId constructor ++ public ClientboundSetCameraPacket(int entityId) { ++ this.cameraId = entityId; ++ } ++ // SparklyPaper end ++ + private void write(FriendlyByteBuf buffer) { + buffer.writeVarInt(this.cameraId); + } diff --git a/sparklypaper-server/minecraft-patches/sources/net/minecraft/world/entity/Display.java.patch b/sparklypaper-server/minecraft-patches/sources/net/minecraft/world/entity/Display.java.patch new file mode 100644 index 0000000..ebeeef0 --- /dev/null +++ b/sparklypaper-server/minecraft-patches/sources/net/minecraft/world/entity/Display.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/entity/Display.java ++++ b/net/minecraft/world/entity/Display.java +@@ -681,7 +_,7 @@ + private static final byte INITIAL_TEXT_OPACITY = -1; + public static final int INITIAL_BACKGROUND = 1073741824; + private static final int INITIAL_LINE_WIDTH = 200; +- private static final EntityDataAccessor DATA_TEXT_ID = SynchedEntityData.defineId(Display.TextDisplay.class, EntityDataSerializers.COMPONENT); ++ public static final EntityDataAccessor DATA_TEXT_ID = SynchedEntityData.defineId(Display.TextDisplay.class, EntityDataSerializers.COMPONENT); // SparklyPaper - Helpful NMS packet changes: make public + public static final EntityDataAccessor DATA_LINE_WIDTH_ID = SynchedEntityData.defineId(Display.TextDisplay.class, EntityDataSerializers.INT); + public static final EntityDataAccessor DATA_BACKGROUND_COLOR_ID = SynchedEntityData.defineId( + Display.TextDisplay.class, EntityDataSerializers.INT