forked from mirror/Folia
Update to 1.21.1
This commit is contained in:
parent
2b8c879897
commit
e402f963b5
@ -1,8 +1,8 @@
|
|||||||
group=dev.folia
|
group=dev.folia
|
||||||
version=1.21-R0.1-SNAPSHOT
|
version=1.21.1-R0.1-SNAPSHOT
|
||||||
mcVersion=1.21
|
mcVersion=1.21.1
|
||||||
|
|
||||||
paperRef=df3b6544f74be73c8882b97c43d39022340f2d74
|
paperRef=958666a8f6ab8b45652d1a682b25e42100bcb0da
|
||||||
|
|
||||||
org.gradle.caching=true
|
org.gradle.caching=true
|
||||||
org.gradle.parallel=true
|
org.gradle.parallel=true
|
||||||
|
@ -917,10 +917,10 @@ index 8671a90e969d16c7a57ddc38fedb7cf01815f64c..085d035b5d127d14af6b8487bee5446b
|
|||||||
public boolean halt(final boolean sync, final long maxWaitNS) {
|
public boolean halt(final boolean sync, final long maxWaitNS) {
|
||||||
this.radiusAwareGenExecutor.halt();
|
this.radiusAwareGenExecutor.halt();
|
||||||
diff --git a/src/main/java/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/NewChunkHolder.java b/src/main/java/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/NewChunkHolder.java
|
diff --git a/src/main/java/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/NewChunkHolder.java b/src/main/java/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/NewChunkHolder.java
|
||||||
index 9fcd1b6eef82cd0bbcddab26cf5aaf880d236969..c467b2d2ef9e1e16b00fee20f6cfc757c30fb100 100644
|
index 45eda96fd8a1acb87dbb69ce5495fec7e451416f..3210d4cb97301d6fa5ffe76fd7c263ab7aa0a8be 100644
|
||||||
--- a/src/main/java/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/NewChunkHolder.java
|
--- a/src/main/java/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/NewChunkHolder.java
|
||||||
+++ b/src/main/java/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/NewChunkHolder.java
|
+++ b/src/main/java/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/NewChunkHolder.java
|
||||||
@@ -1393,7 +1393,7 @@ public final class NewChunkHolder {
|
@@ -1378,7 +1378,7 @@ public final class NewChunkHolder {
|
||||||
}
|
}
|
||||||
|
|
||||||
// must be scheduled to main, we do not trust the callback to not do anything stupid
|
// must be scheduled to main, we do not trust the callback to not do anything stupid
|
||||||
@ -929,7 +929,7 @@ index 9fcd1b6eef82cd0bbcddab26cf5aaf880d236969..c467b2d2ef9e1e16b00fee20f6cfc757
|
|||||||
for (final Consumer<ChunkAccess> consumer : consumers) {
|
for (final Consumer<ChunkAccess> consumer : consumers) {
|
||||||
try {
|
try {
|
||||||
consumer.accept(chunk);
|
consumer.accept(chunk);
|
||||||
@@ -1421,7 +1421,7 @@ public final class NewChunkHolder {
|
@@ -1406,7 +1406,7 @@ public final class NewChunkHolder {
|
||||||
}
|
}
|
||||||
|
|
||||||
// must be scheduled to main, we do not trust the callback to not do anything stupid
|
// must be scheduled to main, we do not trust the callback to not do anything stupid
|
||||||
@ -5533,10 +5533,10 @@ index 0000000000000000000000000000000000000000..29f9fed5f02530b3256e6b993e607d46
|
|||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/io/papermc/paper/threadedregions/TickRegionScheduler.java b/src/main/java/io/papermc/paper/threadedregions/TickRegionScheduler.java
|
diff --git a/src/main/java/io/papermc/paper/threadedregions/TickRegionScheduler.java b/src/main/java/io/papermc/paper/threadedregions/TickRegionScheduler.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000000000000000000000000000000000000..54539fecd96a8a4c4a15e147876f7e0985f566cd
|
index 0000000000000000000000000000000000000000..4471285a4358e51da9912ed791a824527f1a2e8e
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/io/papermc/paper/threadedregions/TickRegionScheduler.java
|
+++ b/src/main/java/io/papermc/paper/threadedregions/TickRegionScheduler.java
|
||||||
@@ -0,0 +1,570 @@
|
@@ -0,0 +1,564 @@
|
||||||
+package io.papermc.paper.threadedregions;
|
+package io.papermc.paper.threadedregions;
|
||||||
+
|
+
|
||||||
+import ca.spottedleaf.concurrentutil.scheduler.SchedulerThreadPool;
|
+import ca.spottedleaf.concurrentutil.scheduler.SchedulerThreadPool;
|
||||||
@ -5853,9 +5853,6 @@ index 0000000000000000000000000000000000000000..54539fecd96a8a4c4a15e147876f7e09
|
|||||||
+ });
|
+ });
|
||||||
+ } catch (final Throwable thr) {
|
+ } catch (final Throwable thr) {
|
||||||
+ this.scheduler.regionFailed(this, true, thr);
|
+ this.scheduler.regionFailed(this, true, thr);
|
||||||
+ if (thr instanceof ThreadDeath) {
|
|
||||||
+ throw (ThreadDeath)thr;
|
|
||||||
+ }
|
|
||||||
+ // don't release region for another tick
|
+ // don't release region for another tick
|
||||||
+ return null;
|
+ return null;
|
||||||
+ } finally {
|
+ } finally {
|
||||||
@ -5929,9 +5926,6 @@ index 0000000000000000000000000000000000000000..54539fecd96a8a4c4a15e147876f7e09
|
|||||||
+ this.tickRegion(tickCount, tickStart, scheduledEnd);
|
+ this.tickRegion(tickCount, tickStart, scheduledEnd);
|
||||||
+ } catch (final Throwable thr) {
|
+ } catch (final Throwable thr) {
|
||||||
+ this.scheduler.regionFailed(this, false, thr);
|
+ this.scheduler.regionFailed(this, false, thr);
|
||||||
+ if (thr instanceof ThreadDeath) {
|
|
||||||
+ throw (ThreadDeath)thr;
|
|
||||||
+ }
|
|
||||||
+ // regionFailed will schedule a shutdown, so we should avoid letting this region tick further
|
+ // regionFailed will schedule a shutdown, so we should avoid letting this region tick further
|
||||||
+ return false;
|
+ return false;
|
||||||
+ } finally {
|
+ } finally {
|
||||||
@ -16391,7 +16385,7 @@ index 647a4601deace52f8d855f512a73671f82b4762a..255f6e720ebe0f76954fdba03cd2aae0
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
|
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||||
index 2c312c0b741fb96a008881e9e01fa660a1fb63ab..0f77f1f0d5168c382c90b8bfe521eac801c9708d 100644
|
index d1340691d508c21c15237ec4a4626e9219d7c4f7..d3267a783cfaeb54bbeba06964ea3009822420b5 100644
|
||||||
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
|
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||||
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
|
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||||
@@ -421,31 +421,32 @@ public final class ItemStack implements DataComponentHolder {
|
@@ -421,31 +421,32 @@ public final class ItemStack implements DataComponentHolder {
|
||||||
@ -17860,7 +17854,7 @@ index 814e70f558d7a6186233da0ff86c94c95d390e09..412150d8f2c2604bc754ecbb04a10019
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
|
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
|
||||||
index c0563260277f9f4bd9ff08993b2efb4bca9a0c60..4c2e8714c64a6fe49554a11471e37078267f1eea 100644
|
index 9a5f68ef8609843bd70545294a9a634e7eb8d99f..3616d5f45309d806e1b8887ca7e9fbf0e24a5d86 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
|
--- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
|
+++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
|
||||||
@@ -38,7 +38,7 @@ import co.aikar.timings.MinecraftTimings; // Paper
|
@@ -38,7 +38,7 @@ import co.aikar.timings.MinecraftTimings; // Paper
|
||||||
@ -17885,7 +17879,7 @@ index c0563260277f9f4bd9ff08993b2efb4bca9a0c60..4c2e8714c64a6fe49554a11471e37078
|
|||||||
public BlockEntity(BlockEntityType<?> type, BlockPos pos, BlockState state) {
|
public BlockEntity(BlockEntityType<?> type, BlockPos pos, BlockState state) {
|
||||||
this.components = DataComponentMap.EMPTY;
|
this.components = DataComponentMap.EMPTY;
|
||||||
this.type = type;
|
this.type = type;
|
||||||
@@ -217,7 +223,7 @@ public abstract class BlockEntity {
|
@@ -230,7 +236,7 @@ public abstract class BlockEntity {
|
||||||
|
|
||||||
public void setChanged() {
|
public void setChanged() {
|
||||||
if (this.level != null) {
|
if (this.level != null) {
|
||||||
@ -17962,7 +17956,7 @@ index 73e532dc998e5701c1a73da846da3d3a79871b81..5e4cb998554791cdfc2e32ae7115f87e
|
|||||||
|
|
||||||
if (i % 40L == 0L) {
|
if (i % 40L == 0L) {
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java
|
diff --git a/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java
|
||||||
index 53f9d28bf3c6aafd4fdd6c12e0285500fe7350ce..09410e95ebb0fd0089c924f39914287465a453bd 100644
|
index 7397a706ec58fca4f97db6cf722396680bd5bc4e..66d20e4b7f096f0755044a3946e98251385ed18c 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java
|
--- a/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java
|
+++ b/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java
|
||||||
@@ -49,7 +49,7 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
|
@@ -49,7 +49,7 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
|
||||||
@ -18085,7 +18079,7 @@ index 53f9d28bf3c6aafd4fdd6c12e0285500fe7350ce..09410e95ebb0fd0089c924f399142874
|
|||||||
}
|
}
|
||||||
if (!result) {
|
if (!result) {
|
||||||
cooldownHopper(hopper);
|
cooldownHopper(hopper);
|
||||||
@@ -542,13 +554,14 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
|
@@ -546,13 +558,14 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean suckInItems(Level world, Hopper hopper) {
|
public static boolean suckInItems(Level world, Hopper hopper) {
|
||||||
@ -18101,7 +18095,7 @@ index 53f9d28bf3c6aafd4fdd6c12e0285500fe7350ce..09410e95ebb0fd0089c924f399142874
|
|||||||
int[] aint = HopperBlockEntity.getSlots(iinventory, enumdirection);
|
int[] aint = HopperBlockEntity.getSlots(iinventory, enumdirection);
|
||||||
int i = aint.length;
|
int i = aint.length;
|
||||||
|
|
||||||
@@ -735,9 +748,9 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
|
@@ -743,9 +756,9 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
|
||||||
stack = stack.split(to.getMaxStackSize());
|
stack = stack.split(to.getMaxStackSize());
|
||||||
}
|
}
|
||||||
// Spigot end
|
// Spigot end
|
||||||
@ -18569,7 +18563,7 @@ index 488938c32a48437721a71d294c77468f00c035b9..cead18e4f8ea278b999fa0e1aff58580
|
|||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||||
index 5453b7051337908ac1c8201827c1b5eec9e1608b..2c39642298bf235565b92287efaf55373183c5a1 100644
|
index 7c11853c5090fbc4fa5b3e73a69acf166158fdec..27e68ed3a508f16f53422c5aa1631b804c8eff9e 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||||
@@ -60,6 +60,13 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
|
@@ -60,6 +60,13 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
|
||||||
@ -18612,7 +18606,7 @@ index 5453b7051337908ac1c8201827c1b5eec9e1608b..2c39642298bf235565b92287efaf5537
|
|||||||
iblockdata.onPlace(this.level, blockposition, iblockdata1, flag);
|
iblockdata.onPlace(this.level, blockposition, iblockdata1, flag);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -448,7 +456,7 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
|
@@ -453,7 +461,7 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
|
||||||
@Nullable
|
@Nullable
|
||||||
public BlockEntity getBlockEntity(BlockPos pos, LevelChunk.EntityCreationType creationType) {
|
public BlockEntity getBlockEntity(BlockPos pos, LevelChunk.EntityCreationType creationType) {
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
@ -18621,7 +18615,7 @@ index 5453b7051337908ac1c8201827c1b5eec9e1608b..2c39642298bf235565b92287efaf5537
|
|||||||
if (tileentity == null) {
|
if (tileentity == null) {
|
||||||
tileentity = (BlockEntity) this.blockEntities.get(pos);
|
tileentity = (BlockEntity) this.blockEntities.get(pos);
|
||||||
}
|
}
|
||||||
@@ -671,13 +679,13 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
|
@@ -676,13 +684,13 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
|
||||||
|
|
||||||
org.bukkit.World world = this.level.getWorld();
|
org.bukkit.World world = this.level.getWorld();
|
||||||
if (world != null) {
|
if (world != null) {
|
||||||
@ -18637,7 +18631,7 @@ index 5453b7051337908ac1c8201827c1b5eec9e1608b..2c39642298bf235565b92287efaf5537
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
server.getPluginManager().callEvent(new org.bukkit.event.world.ChunkPopulateEvent(bukkitChunk));
|
server.getPluginManager().callEvent(new org.bukkit.event.world.ChunkPopulateEvent(bukkitChunk));
|
||||||
@@ -704,7 +712,7 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
|
@@ -709,7 +717,7 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
|
||||||
@Override
|
@Override
|
||||||
public boolean isUnsaved() {
|
public boolean isUnsaved() {
|
||||||
// Paper start - rewrite chunk system
|
// Paper start - rewrite chunk system
|
||||||
@ -18646,7 +18640,7 @@ index 5453b7051337908ac1c8201827c1b5eec9e1608b..2c39642298bf235565b92287efaf5537
|
|||||||
if (((ca.spottedleaf.moonrise.patches.chunk_system.ticks.ChunkSystemLevelChunkTicks)this.blockTicks).moonrise$isDirty(gameTime)
|
if (((ca.spottedleaf.moonrise.patches.chunk_system.ticks.ChunkSystemLevelChunkTicks)this.blockTicks).moonrise$isDirty(gameTime)
|
||||||
|| ((ca.spottedleaf.moonrise.patches.chunk_system.ticks.ChunkSystemLevelChunkTicks)this.fluidTicks).moonrise$isDirty(gameTime)) {
|
|| ((ca.spottedleaf.moonrise.patches.chunk_system.ticks.ChunkSystemLevelChunkTicks)this.fluidTicks).moonrise$isDirty(gameTime)) {
|
||||||
return true;
|
return true;
|
||||||
@@ -975,6 +983,13 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
|
@@ -980,6 +988,13 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
|
||||||
this.ticker = wrapped;
|
this.ticker = wrapped;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -18660,7 +18654,7 @@ index 5453b7051337908ac1c8201827c1b5eec9e1608b..2c39642298bf235565b92287efaf5537
|
|||||||
@Override
|
@Override
|
||||||
public void tick() {
|
public void tick() {
|
||||||
this.ticker.tick();
|
this.ticker.tick();
|
||||||
@@ -1011,6 +1026,13 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
|
@@ -1016,6 +1031,13 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
|
||||||
this.ticker = blockentityticker;
|
this.ticker = blockentityticker;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -19339,7 +19333,7 @@ index 7a69564572357a7acc043e35b9c113beeb738951..ea161048b68de3c8cdcba5f4cb66eb15
|
|||||||
LevelChunkTicks<T> levelChunkTicks = this.allContainers.get(l);
|
LevelChunkTicks<T> levelChunkTicks = this.allContainers.get(l);
|
||||||
if (levelChunkTicks == null) {
|
if (levelChunkTicks == null) {
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
index c8b82bc41f2042bb4b067f06265a3a22e51f7629..3d93d6f0c352b5540a8fc69c86a68f7584d8525c 100644
|
index f6de1c6e8fd9086b7bd725f75ee2606583591d6a..1f3d3b59236f45d0e7040968c9c1017eebf362c2 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
@@ -312,7 +312,7 @@ public final class CraftServer implements Server {
|
@@ -312,7 +312,7 @@ public final class CraftServer implements Server {
|
||||||
@ -20293,10 +20287,10 @@ index 992437a6e838f653f32d33b5b3f702c484640a97..5f82de67496fafdeb5364e227fec0c49
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||||
index 0ab53d46f0b8f3f3791dd01766738522c86932e8..db6937ce9a4c4a0a3aefc9df9909139b23b70afb 100644
|
index 157a0eb8194c8fb6da4d0322b40c805918867e7f..9491e18b2721a1dc87d6691fcb23279381e45be4 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||||
@@ -947,7 +947,7 @@ public class CraftEventFactory {
|
@@ -951,7 +951,7 @@ public class CraftEventFactory {
|
||||||
return CraftEventFactory.handleBlockSpreadEvent(world, source, target, block, 2);
|
return CraftEventFactory.handleBlockSpreadEvent(world, source, target, block, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -20305,7 +20299,7 @@ index 0ab53d46f0b8f3f3791dd01766738522c86932e8..db6937ce9a4c4a0a3aefc9df9909139b
|
|||||||
|
|
||||||
public static boolean handleBlockSpreadEvent(LevelAccessor world, BlockPos source, BlockPos target, net.minecraft.world.level.block.state.BlockState block, int flag) {
|
public static boolean handleBlockSpreadEvent(LevelAccessor world, BlockPos source, BlockPos target, net.minecraft.world.level.block.state.BlockState block, int flag) {
|
||||||
// Suppress during worldgen
|
// Suppress during worldgen
|
||||||
@@ -959,7 +959,7 @@ public class CraftEventFactory {
|
@@ -963,7 +963,7 @@ public class CraftEventFactory {
|
||||||
CraftBlockState state = CraftBlockStates.getBlockState(world, target, flag);
|
CraftBlockState state = CraftBlockStates.getBlockState(world, target, flag);
|
||||||
state.setData(block);
|
state.setData(block);
|
||||||
|
|
||||||
@ -20314,7 +20308,7 @@ index 0ab53d46f0b8f3f3791dd01766738522c86932e8..db6937ce9a4c4a0a3aefc9df9909139b
|
|||||||
Bukkit.getPluginManager().callEvent(event);
|
Bukkit.getPluginManager().callEvent(event);
|
||||||
|
|
||||||
if (!event.isCancelled()) {
|
if (!event.isCancelled()) {
|
||||||
@@ -2196,7 +2196,7 @@ public class CraftEventFactory {
|
@@ -2210,7 +2210,7 @@ public class CraftEventFactory {
|
||||||
CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemStack.copyWithCount(1));
|
CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemStack.copyWithCount(1));
|
||||||
|
|
||||||
org.bukkit.event.block.BlockDispenseEvent event = new org.bukkit.event.block.BlockDispenseEvent(bukkitBlock, craftItem.clone(), CraftVector.toBukkit(to));
|
org.bukkit.event.block.BlockDispenseEvent event = new org.bukkit.event.block.BlockDispenseEvent(bukkitBlock, craftItem.clone(), CraftVector.toBukkit(to));
|
||||||
@ -20336,7 +20330,7 @@ index 2f4d6b56301195f8d39ed50dffe842464065bfe1..5a24902b735cbd64dd5cd5ad46b096c4
|
|||||||
if (!this.isAsyncScheduler && !task.isSync()) {
|
if (!this.isAsyncScheduler && !task.isSync()) {
|
||||||
this.asyncScheduler.handle(task, delay);
|
this.asyncScheduler.handle(task, delay);
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
index 41c34ffdf9d95a04ed55a1e09ebc78e8cf946777..f89e08c22bc76dba5df730a83b37324e38d2956d 100644
|
index 28dbe30a98a6730839949bc9a6a90b78619ff84d..c9e31dcdde9d96edfc12e694065f1f4643bb9db3 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
@@ -369,6 +369,12 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
@@ -369,6 +369,12 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||||
|
@ -476,7 +476,7 @@ index e33b1b6fd50a4eea57500cc00dba20d6edcab75d..74d1f88ae81b01e7c00ec43fcbe5b9b1
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftBogged.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftBogged.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftBogged.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftBogged.java
|
||||||
index 93481e2828f945b11ae9a20a8e5286232b449fa9..ad5d48c7bb747eb9ea79fd1a3853a242037ed969 100644
|
index e8e4704304504e69c7964dcd4df8ce5db9e92bf6..20630858d00fa23e911ec38788df971a12f98c6a 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftBogged.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftBogged.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftBogged.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftBogged.java
|
||||||
@@ -12,6 +12,7 @@ public class CraftBogged extends CraftAbstractSkeleton implements Bogged, io.pap
|
@@ -12,6 +12,7 @@ public class CraftBogged extends CraftAbstractSkeleton implements Bogged, io.pap
|
||||||
@ -1965,7 +1965,7 @@ index 706c74c832f6893df3797023f68add31139c7d57..1cf155fc23f13691f86673eac3084d75
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMushroomCow.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMushroomCow.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMushroomCow.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMushroomCow.java
|
||||||
index 5c5b64bd058684520fa175bfd10622ff57856b7c..8acaa5f8153d643e2558110bb7be512514a27532 100644
|
index 246f97884b33ff37d3c4b693818224ba8aa5b93b..420e309c8c0e303d1c8a900834a567e92724cfd4 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMushroomCow.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMushroomCow.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMushroomCow.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMushroomCow.java
|
||||||
@@ -19,6 +19,13 @@ public class CraftMushroomCow extends CraftCow implements MushroomCow, io.paperm
|
@@ -19,6 +19,13 @@ public class CraftMushroomCow extends CraftCow implements MushroomCow, io.paperm
|
||||||
@ -2644,7 +2644,7 @@ index d959825fd11a94aba175934cd7739544a23958fc..9f53ba11a2adabdebd70eee5a811fec7
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftSnowman.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftSnowman.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftSnowman.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftSnowman.java
|
||||||
index 4ce2373ff71c3c1b8951646e057587a3ab09e145..6f88f18fc23cb793d4394b80201e40b09a0a7f9d 100644
|
index 05cee4906169425ee6e80cf1302f2fa01f09d58f..c561da039b6819d48d4dc2c4456a5801d8f5cd1e 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftSnowman.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftSnowman.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftSnowman.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftSnowman.java
|
||||||
@@ -19,8 +19,16 @@ public class CraftSnowman extends CraftGolem implements Snowman, com.destroystok
|
@@ -19,8 +19,16 @@ public class CraftSnowman extends CraftGolem implements Snowman, com.destroystok
|
||||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Throw UnsupportedOperationException() for broken APIs
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
index 3d93d6f0c352b5540a8fc69c86a68f7584d8525c..60b10a6e1fcc06430c5cacd4c49d92e1de6e4778 100644
|
index 1f3d3b59236f45d0e7040968c9c1017eebf362c2..6bce7ef8067c4ca6a488673ecbfdf3625e596565 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
@@ -1310,6 +1310,7 @@ public final class CraftServer implements Server {
|
@@ -1310,6 +1310,7 @@ public final class CraftServer implements Server {
|
||||||
|
@ -941,10 +941,10 @@ index 4b36209f016b025087da359ab49e44bd677cd937..707d4aa8a56f2fc33456f3441c4daf97
|
|||||||
|
|
||||||
private static final ThreadLocal<List<ChunkProgressionTask>> CURRENT_TICKET_UPDATE_SCHEDULING = new ThreadLocal<>();
|
private static final ThreadLocal<List<ChunkProgressionTask>> CURRENT_TICKET_UPDATE_SCHEDULING = new ThreadLocal<>();
|
||||||
diff --git a/src/main/java/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/NewChunkHolder.java b/src/main/java/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/NewChunkHolder.java
|
diff --git a/src/main/java/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/NewChunkHolder.java b/src/main/java/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/NewChunkHolder.java
|
||||||
index c467b2d2ef9e1e16b00fee20f6cfc757c30fb100..7a719d427a537c6fa1f60d8ebb9130e7eda9618a 100644
|
index 3210d4cb97301d6fa5ffe76fd7c263ab7aa0a8be..60399be0046dbb06be643461c8f3ce1491542dfd 100644
|
||||||
--- a/src/main/java/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/NewChunkHolder.java
|
--- a/src/main/java/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/NewChunkHolder.java
|
||||||
+++ b/src/main/java/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/NewChunkHolder.java
|
+++ b/src/main/java/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/NewChunkHolder.java
|
||||||
@@ -1687,6 +1687,8 @@ public final class NewChunkHolder {
|
@@ -1672,6 +1672,8 @@ public final class NewChunkHolder {
|
||||||
|
|
||||||
public SaveStat save(final boolean shutdown) {
|
public SaveStat save(final boolean shutdown) {
|
||||||
TickThread.ensureTickThread(this.world, this.chunkX, this.chunkZ, "Cannot save data off-main");
|
TickThread.ensureTickThread(this.world, this.chunkX, this.chunkZ, "Cannot save data off-main");
|
||||||
@ -953,7 +953,7 @@ index c467b2d2ef9e1e16b00fee20f6cfc757c30fb100..7a719d427a537c6fa1f60d8ebb9130e7
|
|||||||
|
|
||||||
ChunkAccess chunk = this.getCurrentChunk();
|
ChunkAccess chunk = this.getCurrentChunk();
|
||||||
PoiChunk poi = this.getPoiChunk();
|
PoiChunk poi = this.getPoiChunk();
|
||||||
@@ -1733,6 +1735,7 @@ public final class NewChunkHolder {
|
@@ -1718,6 +1720,7 @@ public final class NewChunkHolder {
|
||||||
}
|
}
|
||||||
|
|
||||||
return executedUnloadTask | canSaveChunk | canSaveEntities | canSavePOI ? new SaveStat(executedUnloadTask || canSaveChunk, canSaveEntities, canSavePOI): null;
|
return executedUnloadTask | canSaveChunk | canSaveEntities | canSavePOI ? new SaveStat(executedUnloadTask || canSaveChunk, canSaveEntities, canSavePOI): null;
|
||||||
@ -974,7 +974,7 @@ index a587d83b78af4efc484f939529acf70834f60d7e..45f76aaaa7dedb77a83b4a2c87905bf9
|
|||||||
|
|
||||||
public static void registerCommands(final MinecraftServer server) {
|
public static void registerCommands(final MinecraftServer server) {
|
||||||
diff --git a/src/main/java/io/papermc/paper/threadedregions/TickRegionScheduler.java b/src/main/java/io/papermc/paper/threadedregions/TickRegionScheduler.java
|
diff --git a/src/main/java/io/papermc/paper/threadedregions/TickRegionScheduler.java b/src/main/java/io/papermc/paper/threadedregions/TickRegionScheduler.java
|
||||||
index 54539fecd96a8a4c4a15e147876f7e0985f566cd..c43b263e6502ba48a876803385f8d05c5e84ba3e 100644
|
index 4471285a4358e51da9912ed791a824527f1a2e8e..a18da3f3f245031f0547efe9b52a1f2a219ef04a 100644
|
||||||
--- a/src/main/java/io/papermc/paper/threadedregions/TickRegionScheduler.java
|
--- a/src/main/java/io/papermc/paper/threadedregions/TickRegionScheduler.java
|
||||||
+++ b/src/main/java/io/papermc/paper/threadedregions/TickRegionScheduler.java
|
+++ b/src/main/java/io/papermc/paper/threadedregions/TickRegionScheduler.java
|
||||||
@@ -67,8 +67,13 @@ public final class TickRegionScheduler {
|
@@ -67,8 +67,13 @@ public final class TickRegionScheduler {
|
||||||
@ -1929,10 +1929,10 @@ index 96b99aab3720e5bdf293fd4a95944c7218ce43c0..e7691f856f85469c06f2b5a2a3db3120
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||||
index 2c39642298bf235565b92287efaf55373183c5a1..e0359a8857387428d44c19af8dd0e2e743a0b2b5 100644
|
index 27e68ed3a508f16f53422c5aa1631b804c8eff9e..ea95a382561dcf2bb958a08351d493087a49336a 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||||
@@ -1039,11 +1039,14 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
|
@@ -1044,11 +1044,14 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
|
||||||
BlockPos blockposition = this.blockEntity.getBlockPos();
|
BlockPos blockposition = this.blockEntity.getBlockPos();
|
||||||
|
|
||||||
if (LevelChunk.this.isTicking(blockposition)) {
|
if (LevelChunk.this.isTicking(blockposition)) {
|
||||||
@ -1947,7 +1947,7 @@ index 2c39642298bf235565b92287efaf55373183c5a1..e0359a8857387428d44c19af8dd0e2e7
|
|||||||
BlockState iblockdata = LevelChunk.this.getBlockState(blockposition);
|
BlockState iblockdata = LevelChunk.this.getBlockState(blockposition);
|
||||||
|
|
||||||
if (this.blockEntity.getType().isValid(iblockdata)) {
|
if (this.blockEntity.getType().isValid(iblockdata)) {
|
||||||
@@ -1058,6 +1061,7 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
|
@@ -1063,6 +1066,7 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
|
||||||
}
|
}
|
||||||
// Paper end - Remove the Block Entity if it's invalid
|
// Paper end - Remove the Block Entity if it's invalid
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user