Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: d25437bc Update to Minecraft 1.18-pre8 CraftBukkit Changes: 5a39a236 Update to Minecraft 1.18-pre8 Spigot Changes: 7840c2af Update to Minecraft 1.18-pre8
This commit is contained in:
parent
2253e953c6
commit
60caeea54e
34 changed files with 147 additions and 139 deletions
|
@ -43,27 +43,27 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
@@ -0,0 +0,0 @@ public abstract class BaseSpawner {
|
||||
}
|
||||
|
||||
public CompoundTag save(CompoundTag nbttagcompound) {
|
||||
- nbttagcompound.putShort("Delay", (short) this.spawnDelay);
|
||||
- nbttagcompound.putShort("MinSpawnDelay", (short) this.minSpawnDelay);
|
||||
- nbttagcompound.putShort("MaxSpawnDelay", (short) this.maxSpawnDelay);
|
||||
public CompoundTag save(CompoundTag nbt) {
|
||||
- nbt.putShort("Delay", (short) this.spawnDelay);
|
||||
- nbt.putShort("MinSpawnDelay", (short) this.minSpawnDelay);
|
||||
- nbt.putShort("MaxSpawnDelay", (short) this.maxSpawnDelay);
|
||||
+ // Paper start
|
||||
+ if (spawnDelay > Short.MAX_VALUE) {
|
||||
+ nbttagcompound.putInt("Paper.Delay", this.spawnDelay);
|
||||
+ nbt.putInt("Paper.Delay", this.spawnDelay);
|
||||
+ }
|
||||
+ nbttagcompound.putShort("Delay", (short) Math.min(Short.MAX_VALUE, this.spawnDelay));
|
||||
+ nbt.putShort("Delay", (short) Math.min(Short.MAX_VALUE, this.spawnDelay));
|
||||
+
|
||||
+ if (minSpawnDelay > Short.MAX_VALUE || maxSpawnDelay > Short.MAX_VALUE) {
|
||||
+ nbttagcompound.putInt("Paper.MinSpawnDelay", this.minSpawnDelay);
|
||||
+ nbttagcompound.putInt("Paper.MaxSpawnDelay", this.maxSpawnDelay);
|
||||
+ nbt.putInt("Paper.MinSpawnDelay", this.minSpawnDelay);
|
||||
+ nbt.putInt("Paper.MaxSpawnDelay", this.maxSpawnDelay);
|
||||
+ }
|
||||
+
|
||||
+ nbttagcompound.putShort("MinSpawnDelay", (short) Math.min(Short.MAX_VALUE, this.minSpawnDelay));
|
||||
+ nbttagcompound.putShort("MaxSpawnDelay", (short) Math.min(Short.MAX_VALUE, this.maxSpawnDelay));
|
||||
+ // Paper end
|
||||
nbttagcompound.putShort("SpawnCount", (short) this.spawnCount);
|
||||
nbttagcompound.putShort("MaxNearbyEntities", (short) this.maxNearbyEntities);
|
||||
nbttagcompound.putShort("RequiredPlayerRange", (short) this.requiredPlayerRange);
|
||||
+ nbt.putShort("MinSpawnDelay", (short) Math.min(Short.MAX_VALUE, this.minSpawnDelay));
|
||||
+ nbt.putShort("MaxSpawnDelay", (short) Math.min(Short.MAX_VALUE, this.maxSpawnDelay));
|
||||
+ // Paper nbt
|
||||
nbt.putShort("SpawnCount", (short) this.spawnCount);
|
||||
nbt.putShort("MaxNearbyEntities", (short) this.maxNearbyEntities);
|
||||
nbt.putShort("RequiredPlayerRange", (short) this.requiredPlayerRange);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftCreatureSpawner.java b/src/main/java/org/bukkit/craftbukkit/block/CraftCreatureSpawner.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftCreatureSpawner.java
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue