Remap CraftBukkit to Mojang+Yarn Mappings
By: Initial Source <noreply+automated@papermc.io>
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
--- a/net/minecraft/network/protocol/game/ClientboundInitializeBorderPacket.java
|
||||
+++ b/net/minecraft/network/protocol/game/ClientboundInitializeBorderPacket.java
|
||||
@@ -30,8 +30,10 @@
|
||||
}
|
||||
|
||||
public ClientboundInitializeBorderPacket(WorldBorder worldBorder) {
|
||||
- this.newCenterX = worldBorder.getCenterX();
|
||||
- this.newCenterZ = worldBorder.getCenterZ();
|
||||
+ // CraftBukkit start - multiply out nether border
|
||||
+ this.newCenterX = worldBorder.getCenterX() * worldBorder.world.dimensionType().coordinateScale();
|
||||
+ this.newCenterZ = worldBorder.getCenterZ() * worldBorder.world.dimensionType().coordinateScale();
|
||||
+ // CraftBukkit end
|
||||
this.oldSize = worldBorder.getSize();
|
||||
this.newSize = worldBorder.getLerpTarget();
|
||||
this.lerpTime = worldBorder.getLerpRemainingTime();
|
||||
@@ -1,15 +0,0 @@
|
||||
--- a/net/minecraft/network/protocol/game/ClientboundInitializeBorderPacket.java
|
||||
+++ b/net/minecraft/network/protocol/game/ClientboundInitializeBorderPacket.java
|
||||
@@ -30,8 +30,10 @@
|
||||
}
|
||||
|
||||
public ClientboundInitializeBorderPacket(WorldBorder worldborder) {
|
||||
- this.newCenterX = worldborder.getCenterX();
|
||||
- this.newCenterZ = worldborder.getCenterZ();
|
||||
+ // CraftBukkit start - multiply out nether border
|
||||
+ this.newCenterX = worldborder.getCenterX() * worldborder.world.dimensionType().coordinateScale();
|
||||
+ this.newCenterZ = worldborder.getCenterZ() * worldborder.world.dimensionType().coordinateScale();
|
||||
+ // CraftBukkit end
|
||||
this.oldSize = worldborder.getSize();
|
||||
this.newSize = worldborder.getLerpTarget();
|
||||
this.lerpTime = worldborder.getLerpRemainingTime();
|
||||
@@ -0,0 +1,23 @@
|
||||
--- a/net/minecraft/network/protocol/game/ClientboundSectionBlocksUpdatePacket.java
|
||||
+++ b/net/minecraft/network/protocol/game/ClientboundSectionBlocksUpdatePacket.java
|
||||
@@ -33,11 +33,19 @@
|
||||
short short0 = (Short) shortiterator.next();
|
||||
|
||||
this.positions[j] = short0;
|
||||
- this.states[j] = section.getBlockState(SectionPos.sectionRelativeX(short0), SectionPos.sectionRelativeY(short0), SectionPos.sectionRelativeZ(short0));
|
||||
+ this.states[j] = (section != null) ? section.getBlockState(SectionPos.sectionRelativeX(short0), SectionPos.sectionRelativeY(short0), SectionPos.sectionRelativeZ(short0)) : net.minecraft.world.level.block.Blocks.AIR.defaultBlockState(); // CraftBukkit - SPIGOT-6076, Mojang bug when empty chunk section notified
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+ // CraftBukkit start - Add constructor
|
||||
+ public ClientboundSectionBlocksUpdatePacket(SectionPos sectionposition, ShortSet shortset, BlockState[] states) {
|
||||
+ this.sectionPos = sectionposition;
|
||||
+ this.positions = shortset.toShortArray();
|
||||
+ this.states = states;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
+
|
||||
private ClientboundSectionBlocksUpdatePacket(FriendlyByteBuf buf) {
|
||||
this.sectionPos = SectionPos.of(buf.readLong());
|
||||
int i = buf.readVarInt();
|
||||
@@ -0,0 +1,15 @@
|
||||
--- a/net/minecraft/network/protocol/game/ClientboundSetBorderCenterPacket.java
|
||||
+++ b/net/minecraft/network/protocol/game/ClientboundSetBorderCenterPacket.java
|
||||
@@ -13,8 +13,10 @@
|
||||
private final double newCenterZ;
|
||||
|
||||
public ClientboundSetBorderCenterPacket(WorldBorder worldBorder) {
|
||||
- this.newCenterX = worldBorder.getCenterX();
|
||||
- this.newCenterZ = worldBorder.getCenterZ();
|
||||
+ // CraftBukkit start - multiply out nether border
|
||||
+ this.newCenterX = worldBorder.getCenterX() * (worldBorder.world != null ? worldBorder.world.dimensionType().coordinateScale() : 1.0);
|
||||
+ this.newCenterZ = worldBorder.getCenterZ() * (worldBorder.world != null ? worldBorder.world.dimensionType().coordinateScale() : 1.0);
|
||||
+ // CraftBukkit end
|
||||
}
|
||||
|
||||
private ClientboundSetBorderCenterPacket(FriendlyByteBuf buf) {
|
||||
@@ -1,15 +0,0 @@
|
||||
--- a/net/minecraft/network/protocol/game/ClientboundSetBorderCenterPacket.java
|
||||
+++ b/net/minecraft/network/protocol/game/ClientboundSetBorderCenterPacket.java
|
||||
@@ -13,8 +13,10 @@
|
||||
private final double newCenterZ;
|
||||
|
||||
public ClientboundSetBorderCenterPacket(WorldBorder worldborder) {
|
||||
- this.newCenterX = worldborder.getCenterX();
|
||||
- this.newCenterZ = worldborder.getCenterZ();
|
||||
+ // CraftBukkit start - multiply out nether border
|
||||
+ this.newCenterX = worldborder.getCenterX() * (worldborder.world != null ? worldborder.world.dimensionType().coordinateScale() : 1.0);
|
||||
+ this.newCenterZ = worldborder.getCenterZ() * (worldborder.world != null ? worldborder.world.dimensionType().coordinateScale() : 1.0);
|
||||
+ // CraftBukkit end
|
||||
}
|
||||
|
||||
private ClientboundSetBorderCenterPacket(PacketDataSerializer packetdataserializer) {
|
||||
@@ -1,7 +0,0 @@
|
||||
--- a/net/minecraft/network/protocol/game/PacketPlayInBlockPlace.java
|
||||
+++ b/net/minecraft/network/protocol/game/PacketPlayInBlockPlace.java
|
||||
@@ -1,3 +1,4 @@
|
||||
+// mc-dev import
|
||||
package net.minecraft.network.protocol.game;
|
||||
|
||||
import net.minecraft.network.PacketDataSerializer;
|
||||
@@ -1,7 +0,0 @@
|
||||
--- a/net/minecraft/network/protocol/game/PacketPlayInUseItem.java
|
||||
+++ b/net/minecraft/network/protocol/game/PacketPlayInUseItem.java
|
||||
@@ -1,3 +1,4 @@
|
||||
+// mc-dev import
|
||||
package net.minecraft.network.protocol.game;
|
||||
|
||||
import net.minecraft.network.PacketDataSerializer;
|
||||
@@ -1,23 +0,0 @@
|
||||
--- a/net/minecraft/network/protocol/game/PacketPlayOutMultiBlockChange.java
|
||||
+++ b/net/minecraft/network/protocol/game/PacketPlayOutMultiBlockChange.java
|
||||
@@ -33,11 +33,19 @@
|
||||
short short0 = (Short) shortiterator.next();
|
||||
|
||||
this.positions[j] = short0;
|
||||
- this.states[j] = chunksection.getBlockState(SectionPosition.sectionRelativeX(short0), SectionPosition.sectionRelativeY(short0), SectionPosition.sectionRelativeZ(short0));
|
||||
+ this.states[j] = (chunksection != null) ? chunksection.getBlockState(SectionPosition.sectionRelativeX(short0), SectionPosition.sectionRelativeY(short0), SectionPosition.sectionRelativeZ(short0)) : net.minecraft.world.level.block.Blocks.AIR.defaultBlockState(); // CraftBukkit - SPIGOT-6076, Mojang bug when empty chunk section notified
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+ // CraftBukkit start - Add constructor
|
||||
+ public PacketPlayOutMultiBlockChange(SectionPosition sectionposition, ShortSet shortset, IBlockData[] states) {
|
||||
+ this.sectionPos = sectionposition;
|
||||
+ this.positions = shortset.toShortArray();
|
||||
+ this.states = states;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
+
|
||||
private PacketPlayOutMultiBlockChange(PacketDataSerializer packetdataserializer) {
|
||||
this.sectionPos = SectionPosition.of(packetdataserializer.readLong());
|
||||
int i = packetdataserializer.readVarInt();
|
||||
@@ -0,0 +1,7 @@
|
||||
--- a/net/minecraft/network/protocol/game/ServerboundUseItemOnPacket.java
|
||||
+++ b/net/minecraft/network/protocol/game/ServerboundUseItemOnPacket.java
|
||||
@@ -1,3 +1,4 @@
|
||||
+// mc-dev import
|
||||
package net.minecraft.network.protocol.game;
|
||||
|
||||
import net.minecraft.network.FriendlyByteBuf;
|
||||
@@ -0,0 +1,7 @@
|
||||
--- a/net/minecraft/network/protocol/game/ServerboundUseItemPacket.java
|
||||
+++ b/net/minecraft/network/protocol/game/ServerboundUseItemPacket.java
|
||||
@@ -1,3 +1,4 @@
|
||||
+// mc-dev import
|
||||
package net.minecraft.network.protocol.game;
|
||||
|
||||
import net.minecraft.network.FriendlyByteBuf;
|
||||
Reference in New Issue
Block a user