mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-22 00:47:38 +01:00
some more patch
This commit is contained in:
parent
7a59fd38d4
commit
6e9a238a8c
@ -1104,10 +1104,10 @@ index be89e5b8c1ea7f85aef267a15986affa5fa1fd4b..43472855136f26b282d94fd241853d86
|
||||
|
||||
public ClientboundLevelChunkWithLightPacket(FriendlyByteBuf buf) {
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 88cde9de26d3da3d863a9d44f5c127eed0a1f4b6..90c80bc7fc7d6f9b91d9f9953d19eef021435780 100644
|
||||
index 84a3f0d2b9c3ad2c1ad1cb68a154155c065a2a32..86403239e04ddf7afc3c1c1f1badb3ca53b6f26b 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -566,7 +566,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -568,7 +568,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
// Holder holder = worlddimension.type(); // CraftBukkit - decompile error
|
||||
|
||||
// Objects.requireNonNull(minecraftserver); // CraftBukkit - decompile error
|
||||
@ -1117,7 +1117,7 @@ index 88cde9de26d3da3d863a9d44f5c127eed0a1f4b6..90c80bc7fc7d6f9b91d9f9953d19eef0
|
||||
this.convertable = convertable_conversionsession;
|
||||
this.uuid = WorldUUID.getUUID(convertable_conversionsession.levelDirectory.path().toFile());
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
index c15d2b8862139a6f083547794617d8bd6c462287..0ff4372afa4b159acc59e3dbd2e9efbd7b7ab6a2 100644
|
||||
index 79020edc9fac79e8b186d0f57f956d2189d3dc8e..b7e6d8441e8444c36919c126a8adeaeed02df08c 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
@@ -49,7 +49,7 @@ import org.bukkit.event.player.PlayerInteractEvent;
|
||||
@ -1155,10 +1155,10 @@ index 5de5209e04d631bd6a50e28e8d3abebf148252c1..19b3f4fa7678a038bf25efc2a8b46dda
|
||||
DebugPackets.sendPoiPacketsForChunk(world, chunkPos);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index addaa87d68591dced30e304dc3880588a45234d6..4b0a7ef056ff7dd687d5135ac748ee57d556121e 100644
|
||||
index c9c7c9934a672adb1529aabc26f7f8bb5829b931..48b264c5e50a33ee9a1d60bf592964eb1b6c79ce 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -175,6 +175,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -178,6 +178,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
}
|
||||
// Paper end
|
||||
|
||||
@ -1166,7 +1166,7 @@ index addaa87d68591dced30e304dc3880588a45234d6..4b0a7ef056ff7dd687d5135ac748ee57
|
||||
public final co.aikar.timings.WorldTimingsHandler timings; // Paper
|
||||
public static BlockPos lastPhysicsProblem; // Spigot
|
||||
private org.spigotmc.TickLimiter entityLimiter;
|
||||
@@ -193,7 +194,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -196,7 +197,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
|
||||
public abstract ResourceKey<LevelStem> getTypeKey();
|
||||
|
||||
@ -1175,7 +1175,7 @@ index addaa87d68591dced30e304dc3880588a45234d6..4b0a7ef056ff7dd687d5135ac748ee57
|
||||
this.spigotConfig = new org.spigotmc.SpigotWorldConfig(((net.minecraft.world.level.storage.PrimaryLevelData) worlddatamutable).getLevelName()); // Spigot
|
||||
this.paperConfig = paperWorldConfigCreator.apply(this.spigotConfig); // Paper
|
||||
this.generator = gen;
|
||||
@@ -279,6 +280,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -282,6 +283,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
this.keepSpawnInMemory = this.paperConfig().spawn.keepSpawnLoaded; // Paper
|
||||
this.entityLimiter = new org.spigotmc.TickLimiter(this.spigotConfig.entityMaxTickTime);
|
||||
this.tileLimiter = new org.spigotmc.TickLimiter(this.spigotConfig.tileMaxTickTime);
|
||||
@ -1183,7 +1183,7 @@ index addaa87d68591dced30e304dc3880588a45234d6..4b0a7ef056ff7dd687d5135ac748ee57
|
||||
}
|
||||
|
||||
// Paper start
|
||||
@@ -544,6 +546,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -547,6 +549,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
// CraftBukkit end
|
||||
|
||||
BlockState iblockdata1 = chunk.setBlockState(pos, state, (flags & 64) != 0, (flags & 1024) == 0); // CraftBukkit custom NO_PLACE flag
|
||||
@ -1558,10 +1558,10 @@ index 545b14f02ac72dda30891d681eba585d19fd5e1d..6dc7e23e96aaffb912611a9dbd41459c
|
||||
private static final byte[] EMPTY_LIGHT = new byte[2048];
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 53f387da05ed3c9e981cea2141c42fe630b49892..871a1095d28bde74cfb63091d77c860f92a2ea0e 100644
|
||||
index 431750425e90b1e9d6b886e41a6d23d14b26b8ce..729a65973beb1079e393a633488535c3ecaeefa1 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2341,7 +2341,7 @@ public final class CraftServer implements Server {
|
||||
@@ -2373,7 +2373,7 @@ public final class CraftServer implements Server {
|
||||
public ChunkGenerator.ChunkData createChunkData(World world) {
|
||||
Preconditions.checkArgument(world != null, "World cannot be null");
|
||||
ServerLevel handle = ((CraftWorld) world).getHandle();
|
||||
@ -1571,10 +1571,10 @@ index 53f387da05ed3c9e981cea2141c42fe630b49892..871a1095d28bde74cfb63091d77c860f
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 217aac550c3bed7ccb12ed8e8da9294652345d41..2d9a298e6f364d7ea6fec689833a72b58aba3c17 100644
|
||||
index 4b3d04d891edda8c02470bae189fbf17eb4e8a36..fcf2571a7aa9e93a82171d4a8ae8c11ee7452994 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -421,11 +421,16 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -422,11 +422,16 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
List<ServerPlayer> playersInRange = playerChunk.playerProvider.getPlayers(playerChunk.getPos(), false);
|
||||
if (playersInRange.isEmpty()) return true; // Paper - rewrite player chunk loader
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Bees get gravity in void. Fixes MC-167279
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/Bee.java b/src/main/java/net/minecraft/world/entity/animal/Bee.java
|
||||
index 98b0b91a8033ae297fee3fe655ee641e9ab08154..27e3bed06cfb5c36125b55c4862fca94ade26a09 100644
|
||||
index 0f7b02d39b5dc781e65537c1b6d924e6c51e5dc7..d9297c0b2934084a065af7d7c93af8d44c3de8e1 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/Bee.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/Bee.java
|
||||
@@ -147,7 +147,22 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
|
@ -18,10 +18,10 @@ public net.minecraft.world.level.block.TurtleEggBlock decreaseEggs(Lnet/minecraf
|
||||
Co-authored-by: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/IceBlock.java b/src/main/java/net/minecraft/world/level/block/IceBlock.java
|
||||
index 6f9cb55491da718cd6564425748ab3852fda9b68..5fbdc96f29e29dfc092b9e84a988032db0fa36ab 100644
|
||||
index c919b5a382b1bfcafd938ff926d9146cc5cf0cdc..f05998e0af1e844f19bf86b74f652a9901088c37 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/IceBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/IceBlock.java
|
||||
@@ -27,6 +27,11 @@ public class IceBlock extends HalfTransparentBlock {
|
||||
@@ -35,6 +35,11 @@ public class IceBlock extends HalfTransparentBlock {
|
||||
@Override
|
||||
public void playerDestroy(Level world, Player player, BlockPos pos, BlockState state, @Nullable BlockEntity blockEntity, ItemStack tool) {
|
||||
super.playerDestroy(world, player, pos, state, blockEntity, tool);
|
||||
@ -34,10 +34,10 @@ index 6f9cb55491da718cd6564425748ab3852fda9b68..5fbdc96f29e29dfc092b9e84a988032d
|
||||
if (world.dimensionType().ultraWarm()) {
|
||||
world.removeBlock(pos, false);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
||||
index b25ebc5f1c54ea3ecc38e96b79e5cca88aafb816..35e264172688be6cf6e82d948f591893d97a43aa 100644
|
||||
index 7f2e4fd1d81d6439475f30e62f0348f38bbc985d..d0b1a419c9bc73066d79459dc3e5998160f8038b 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
||||
@@ -451,6 +451,18 @@ public class CraftBlock implements Block {
|
||||
@@ -452,6 +452,18 @@ public class CraftBlock implements Block {
|
||||
|
||||
@Override
|
||||
public boolean breakNaturally(ItemStack item) {
|
||||
@ -56,7 +56,7 @@ index b25ebc5f1c54ea3ecc38e96b79e5cca88aafb816..35e264172688be6cf6e82d948f591893
|
||||
// Order matters here, need to drop before setting to air so skulls can get their data
|
||||
net.minecraft.world.level.block.state.BlockState iblockdata = this.getNMS();
|
||||
net.minecraft.world.level.block.Block block = iblockdata.getBlock();
|
||||
@@ -460,11 +472,35 @@ public class CraftBlock implements Block {
|
||||
@@ -461,11 +473,35 @@ public class CraftBlock implements Block {
|
||||
// Modelled off EntityHuman#hasBlock
|
||||
if (block != Blocks.AIR && (item == null || !iblockdata.requiresCorrectToolForDrops() || nmsItem.isCorrectToolForDrops(iblockdata))) {
|
||||
net.minecraft.world.level.block.Block.dropResources(iblockdata, this.world.getMinecraftWorld(), this.position, this.world.getBlockEntity(this.position), null, nmsItem);
|
@ -7,10 +7,10 @@ bypass the need to get a player chunk, then get the either,
|
||||
then unwrap it...
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
index ce8afee7d1db99de43c9ec47edcbc929e025b159..8f5d30ad2cf6274bc6a1721be9ccde8dac0be333 100644
|
||||
index 9478b18839932af463181311586c7f590c497356..9adc447e89395f4d8564b0db7829ffccbb0f2344 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
@@ -270,6 +270,12 @@ public class ServerChunkCache extends ChunkSource {
|
||||
@@ -268,6 +268,12 @@ public class ServerChunkCache extends ChunkSource {
|
||||
return this.getChunk(x, z, leastStatus, create);
|
||||
}, this.mainThreadProcessor).join();
|
||||
} else {
|
||||
@ -23,7 +23,7 @@ index ce8afee7d1db99de43c9ec47edcbc929e025b159..8f5d30ad2cf6274bc6a1721be9ccde8d
|
||||
ProfilerFiller gameprofilerfiller = this.level.getProfiler();
|
||||
|
||||
gameprofilerfiller.incrementCounter("getChunk");
|
||||
@@ -313,39 +319,7 @@ public class ServerChunkCache extends ChunkSource {
|
||||
@@ -311,39 +317,7 @@ public class ServerChunkCache extends ChunkSource {
|
||||
if (!io.papermc.paper.util.TickThread.isTickThread()) { // Paper - rewrite chunk system
|
||||
return null;
|
||||
} else {
|
@ -300,10 +300,10 @@ index 0000000000000000000000000000000000000000..95d6022c9cfb2e36ec5a71be6e343540
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
index 8f5d30ad2cf6274bc6a1721be9ccde8dac0be333..e27067e72a49e127aa4abb17f5ed1df09f943f3c 100644
|
||||
index 9adc447e89395f4d8564b0db7829ffccbb0f2344..3a8a4757b9b39b48cbedd65620a114130ae6ab1c 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
@@ -294,6 +294,7 @@ public class ServerChunkCache extends ChunkSource {
|
||||
@@ -292,6 +292,7 @@ public class ServerChunkCache extends ChunkSource {
|
||||
// Paper start - async chunk io/loading
|
||||
io.papermc.paper.chunk.system.scheduling.ChunkTaskScheduler.pushChunkWait(this.level, x1, z1); // Paper - rewrite chunk system
|
||||
// Paper end
|
||||
@ -312,10 +312,10 @@ index 8f5d30ad2cf6274bc6a1721be9ccde8dac0be333..e27067e72a49e127aa4abb17f5ed1df0
|
||||
chunkproviderserver_b.managedBlock(completablefuture::isDone);
|
||||
io.papermc.paper.chunk.system.scheduling.ChunkTaskScheduler.popChunkWait(); // Paper - async chunk debug // Paper - rewrite chunk system
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 90c80bc7fc7d6f9b91d9f9953d19eef021435780..6c8fa0ed1e445e77593b6d26c09eeaac1437787d 100644
|
||||
index 86403239e04ddf7afc3c1c1f1badb3ca53b6f26b..da59ce7c1eda353d0a5479317f347d78a70e0f95 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -645,6 +645,13 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -647,6 +647,13 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
this.entityLookup = new io.papermc.paper.chunk.system.entity.EntityLookup(this, new EntityCallbacks()); // Paper - rewrite chunk system
|
||||
}
|
||||
|
@ -6,7 +6,7 @@ Subject: [PATCH] Improve java version check
|
||||
Co-Authored-By: MiniDigger <admin@benndorf.dev>
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
index ec442f1a6437f449d55739b990a4b69fcd48e8e0..a288b405052716ba13adefe43ef2006c8bf6242d 100644
|
||||
index bb2ed43dccac698ea7265739bc1ed253f345d314..17d74aa6d857e49b61f5aed30be2b17be871df4c 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -201,23 +201,27 @@ public class Main {
|
@ -7,7 +7,7 @@ Adds a new event similar to PlayerEggThrowEvent, but without the Player requirem
|
||||
(dispensers can throw eggs to hatch them, too).
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/projectile/ThrownEgg.java b/src/main/java/net/minecraft/world/entity/projectile/ThrownEgg.java
|
||||
index 88e8ce770ddc61702fc87cd8dcee498183dc1032..588e5ac6fc9b2d12be3bb80bc3fe50d81470c441 100644
|
||||
index 98d42143e70c5be809deb6c03270987ff9db46d5..b64ecadae45c2126b92963ac8d118dde76126ddd 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/projectile/ThrownEgg.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/projectile/ThrownEgg.java
|
||||
@@ -82,6 +82,13 @@ public class ThrownEgg extends ThrowableItemProjectile {
|
||||
@ -23,4 +23,4 @@ index 88e8ce770ddc61702fc87cd8dcee498183dc1032..588e5ac6fc9b2d12be3bb80bc3fe50d8
|
||||
+ // Paper end
|
||||
|
||||
for (int i = 0; i < b0; ++i) {
|
||||
Entity entitychicken = this.level().getWorld().createEntity(new org.bukkit.Location(this.level().getWorld(), this.getX(), this.getY(), this.getZ(), this.getYRot(), 0.0F), hatchingType.getEntityClass()); // CraftBukkit
|
||||
Entity entitychicken = this.level().getWorld().makeEntity(new org.bukkit.Location(this.level().getWorld(), this.getX(), this.getY(), this.getZ(), this.getYRot(), 0.0F), hatchingType.getEntityClass()); // CraftBukkit
|
@ -5,10 +5,10 @@ Subject: [PATCH] Entity Jump API
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index c95c7619820d1dbabc52ae8ccef88e03a2f1d9a3..63e00b3aa1b31c14fc4630fb4b2d3355349bdf24 100644
|
||||
index cde3525320bd7f42c0664e2087d54fa75b7bfb70..2d28d9a42e89b7efadd4e798c3da61565221a5bd 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -3281,8 +3281,10 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -3283,8 +3283,10 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
} else if (this.isInLava() && (!this.onGround() || d3 > d4)) {
|
||||
this.jumpInLiquid(FluidTags.LAVA);
|
||||
} else if ((this.onGround() || flag && d3 <= d4) && this.noJumpDelay == 0) {
|
||||
@ -48,10 +48,10 @@ index 344e933311f5cdccb66069d486b111a003639dfe..add3cd866452df727107e94fb2039bdd
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
index 9e15c5e2adfb46ffa3548b3a2eda225de4c44fb5..904f34f52659e864d148204cb0eebb9b381cc24a 100644
|
||||
index e8cc06162f97eef14c47f2e19a979c6b92aa3252..1b7f2a23d475727644e22a60de0b2c7bfa7ca68f 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
@@ -906,5 +906,19 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||
@@ -911,5 +911,19 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||
public org.bukkit.inventory.EquipmentSlot getHandRaised() {
|
||||
return getHandle().getUsedItemHand() == net.minecraft.world.InteractionHand.MAIN_HAND ? org.bukkit.inventory.EquipmentSlot.HAND : org.bukkit.inventory.EquipmentSlot.OFF_HAND;
|
||||
}
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add option to nerf pigmen from nether portals
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 7ba9b07c4f3335fabc3aeb28cdcd331b0c5ada86..15b807c0a49461ae5daecd6aef43f5c2d464b224 100644
|
||||
index 2e6b700b3648d716f63dca46019f425d2919e912..aba3e8e8873ef9b782382b09c6f5e243744c18b8 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -392,6 +392,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -397,6 +397,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
// Paper start
|
||||
public long activatedImmunityTick = Integer.MIN_VALUE; // Paper
|
||||
public boolean isTemporarilyActive = false; // Paper
|
||||
@ -16,7 +16,7 @@ index 7ba9b07c4f3335fabc3aeb28cdcd331b0c5ada86..15b807c0a49461ae5daecd6aef43f5c2
|
||||
protected int numCollisions = 0; // Paper
|
||||
public boolean spawnedViaMobSpawner; // Paper - Yes this name is similar to above, upstream took the better one
|
||||
@javax.annotation.Nullable
|
||||
@@ -2208,6 +2209,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -2231,6 +2232,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
if (spawnedViaMobSpawner) {
|
||||
nbt.putBoolean("Paper.FromMobSpawner", true);
|
||||
}
|
||||
@ -24,9 +24,9 @@ index 7ba9b07c4f3335fabc3aeb28cdcd331b0c5ada86..15b807c0a49461ae5daecd6aef43f5c2
|
||||
+ nbt.putBoolean("Paper.FromNetherPortal", true);
|
||||
+ }
|
||||
// Paper end
|
||||
return nbt;
|
||||
return nbttagcompound;
|
||||
} catch (Throwable throwable) {
|
||||
@@ -2350,6 +2354,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -2373,6 +2377,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
}
|
||||
|
||||
spawnedViaMobSpawner = nbt.getBoolean("Paper.FromMobSpawner"); // Restore entity's from mob spawner status
|
||||
@ -35,10 +35,10 @@ index 7ba9b07c4f3335fabc3aeb28cdcd331b0c5ada86..15b807c0a49461ae5daecd6aef43f5c2
|
||||
String spawnReasonName = nbt.getString("Paper.SpawnReason");
|
||||
try {
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/NetherPortalBlock.java b/src/main/java/net/minecraft/world/level/block/NetherPortalBlock.java
|
||||
index 47c99d86be833b7c6f9f76c76897fb89d6fca712..69f34c566bf825259253abbefd7d7ba2e847231b 100644
|
||||
index c9ff8a3fd8d65033ce5a476e8ceaf9d1b8e2d887..4e52e92846428b0d01635b90f3480b4a2c13a0b4 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/NetherPortalBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/NetherPortalBlock.java
|
||||
@@ -63,6 +63,8 @@ public class NetherPortalBlock extends Block {
|
||||
@@ -71,6 +71,8 @@ public class NetherPortalBlock extends Block {
|
||||
|
||||
if (entity != null) {
|
||||
entity.setPortalCooldown();
|
@ -5,7 +5,7 @@ Subject: [PATCH] add hand to BlockMultiPlaceEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index ee1be98a7844e983e46cf4ef6f0da1aa1b8c1c1d..96e33c433605ae2e0473b36f03894e030e79cd0d 100644
|
||||
index 64ab19fdc94164f6be505dd1d2c79cf339832813..a63ff3a8286f323f7f5891aa33fdd72b9e2260b0 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -403,13 +403,18 @@ public class CraftEventFactory {
|
@ -0,0 +1,18 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Shane Freeder <theboyetronic@gmail.com>
|
||||
Date: Sat, 7 Mar 2020 00:07:51 +0000
|
||||
Subject: [PATCH] Validate tripwire hook placement before update
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/TripWireHookBlock.java b/src/main/java/net/minecraft/world/level/block/TripWireHookBlock.java
|
||||
index eed36b6736a4f971022fdbce989da03f42794bb5..02b62ac13d4968f80cb0ae3702755d0f1d95e692 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/TripWireHookBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/TripWireHookBlock.java
|
||||
@@ -188,6 +188,7 @@ public class TripWireHookBlock extends Block {
|
||||
|
||||
TripWireHookBlock.emitState(world, pos, flag4, flag5, flag2, flag3);
|
||||
if (!flag) {
|
||||
+ if (world.getBlockState(pos).getBlock() == Blocks.TRIPWIRE_HOOK) // Paper - validate
|
||||
world.setBlock(pos, (BlockState) iblockdata3.setValue(TripWireHookBlock.FACING, enumdirection), 3);
|
||||
if (flag1) {
|
||||
TripWireHookBlock.notifyNeighbors(block, world, pos, enumdirection);
|
@ -125,13 +125,13 @@ index 72f2e81b9905a0d57ed8e2a88578f62d5235c456..7b58b2d6297800c2dcdbf7539e5ab8e7
|
||||
|
||||
public static void registerCommands(final MinecraftServer server) {
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index ef6d98d503fdca4322000278de4cf325df56f99d..f700e677d75f911b786a22b4cc9d0a016d99b02f 100644
|
||||
index 96fd66ed2742a79064852af6e936830ddaf14f4c..2deb639d404943ef5b028c4ede59cab99b31a40f 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -247,6 +247,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
private net.kyori.adventure.text.Component motd; // Paper - Adventure
|
||||
@@ -252,6 +252,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
private int playerIdleTimeout;
|
||||
public final long[] tickTimes;
|
||||
private final long[] tickTimesNanos;
|
||||
private long aggregatedTickTimesNanos;
|
||||
+ // Paper start
|
||||
+ public final TickTimes tickTimes5s = new TickTimes(100);
|
||||
+ public final TickTimes tickTimes10s = new TickTimes(200);
|
||||
@ -140,20 +140,20 @@ index ef6d98d503fdca4322000278de4cf325df56f99d..f700e677d75f911b786a22b4cc9d0a01
|
||||
@Nullable
|
||||
private KeyPair keyPair;
|
||||
@Nullable
|
||||
@@ -1322,6 +1327,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.averageTickTime = this.averageTickTime * 0.8F + (float) j / 1000000.0F * 0.19999999F;
|
||||
long k = Util.getNanos();
|
||||
@@ -1399,6 +1404,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.smoothedTickTimeMillis = this.smoothedTickTimeMillis * 0.8F + (float) j / (float) TimeUtil.NANOSECONDS_PER_MILLISECOND * 0.19999999F;
|
||||
long l = Util.getNanos();
|
||||
|
||||
+ // Paper start
|
||||
+ tickTimes5s.add(this.tickCount, j);
|
||||
+ tickTimes10s.add(this.tickCount, j);
|
||||
+ tickTimes60s.add(this.tickCount, j);
|
||||
+ // Paper end
|
||||
this.logTickTime(k - i);
|
||||
this.logTickTime(l - i);
|
||||
this.profiler.pop();
|
||||
org.spigotmc.WatchdogThread.tick(); // Spigot
|
||||
@@ -2568,4 +2578,30 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
public static record ServerResourcePackInfo(String url, String hash, boolean isRequired, @Nullable Component prompt) {
|
||||
@@ -2682,4 +2692,30 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
public static record ServerResourcePackInfo(UUID id, String url, String hash, boolean isRequired, @Nullable Component prompt) {
|
||||
|
||||
}
|
||||
+
|
||||
@ -184,10 +184,10 @@ index ef6d98d503fdca4322000278de4cf325df56f99d..f700e677d75f911b786a22b4cc9d0a01
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 871a1095d28bde74cfb63091d77c860f92a2ea0e..4545083ceb2e180881b981842ef8857dbe4773dd 100644
|
||||
index 729a65973beb1079e393a633488535c3ecaeefa1..93f7667a0a62e6b9c1b7cf1caaecb68fc69ef747 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2596,6 +2596,16 @@ public final class CraftServer implements Server {
|
||||
@@ -2628,6 +2628,16 @@ public final class CraftServer implements Server {
|
||||
net.minecraft.server.MinecraftServer.getServer().tps15.getAverage()
|
||||
};
|
||||
}
|
@ -6,10 +6,10 @@ Subject: [PATCH] Expose MinecraftServer#isRunning
|
||||
This allows for plugins to detect if the server is actually turning off in onDisable rather than just plugins reloading.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 4545083ceb2e180881b981842ef8857dbe4773dd..83661761abdb31e62ea56af9d60fed393326be50 100644
|
||||
index 93f7667a0a62e6b9c1b7cf1caaecb68fc69ef747..2c7370b6103faa6979b8d347d9e20248cbfc1740 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2832,5 +2832,10 @@ public final class CraftServer implements Server {
|
||||
@@ -2864,5 +2864,10 @@ public final class CraftServer implements Server {
|
||||
public int getCurrentTick() {
|
||||
return net.minecraft.server.MinecraftServer.currentTick;
|
||||
}
|
@ -6,10 +6,10 @@ Subject: [PATCH] Add Raw Byte ItemStack Serialization
|
||||
Serializes using NBT which is safer for server data migrations than bukkits format.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
index f967975d641fadce813a34a9344f6294368b797c..a78c6610be6e89dd89881867b8b91ed9cece7562 100644
|
||||
index e31ead0d99203a018757cb2e765b5d28dd373eef..a394298df60ddd0aa709f9e250520da9db8c9589 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
@@ -461,6 +461,52 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
@@ -458,6 +458,52 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
public com.destroystokyo.paper.util.VersionFetcher getVersionFetcher() {
|
||||
return new com.destroystokyo.paper.PaperVersionFetcher();
|
||||
}
|
@ -10,10 +10,10 @@ When not per player it will use the Vanilla mechanic of one delay per
|
||||
world and the world age for the start day.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 0952769c94519f9fb300bc14c498f19107364643..100bcf5174c06bb4450f0056bb5b5ef610ee1da6 100644
|
||||
index ad167cd343ec38f0263e634124036e741246c6b6..956c0090992a64860bed2c5f72991d86a528b7ba 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -242,6 +242,7 @@ public class ServerPlayer extends Player {
|
||||
@@ -249,6 +249,7 @@ public class ServerPlayer extends Player {
|
||||
public boolean wonGame;
|
||||
private int containerUpdateDelay; // Paper
|
||||
public long loginTime; // Paper
|
@ -6,7 +6,7 @@ Subject: [PATCH] Remote Connections shouldn't hold up shutdown
|
||||
Bugs in the connection logic appears to leave stale connections even, preventing shutdown
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index 97f80226793e700c8b05e41005bb2751a6b00f33..307f3ab69186c0980f33d664bb2db8d1aae228f8 100644
|
||||
index 90b261b23f6731f60a7d4f412a6bf4c6c6aa7095..109c7ff78d4c1f5496d294f52ecfd9df2070db1e 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -390,11 +390,11 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
@ -5,10 +5,10 @@ Subject: [PATCH] Do not allow bees to load chunks for beehives
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/Bee.java b/src/main/java/net/minecraft/world/entity/animal/Bee.java
|
||||
index 27e3bed06cfb5c36125b55c4862fca94ade26a09..41f5b4fc4a4b7d2a54b08869d4afa450f34caf91 100644
|
||||
index d9297c0b2934084a065af7d7c93af8d44c3de8e1..c6235be64d6fb234734dd816052695ac44aea3ae 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/Bee.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/Bee.java
|
||||
@@ -413,6 +413,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
|
||||
@@ -420,6 +420,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
|
||||
if (this.hivePos == null) {
|
||||
return false;
|
||||
} else {
|
||||
@ -16,7 +16,7 @@ index 27e3bed06cfb5c36125b55c4862fca94ade26a09..41f5b4fc4a4b7d2a54b08869d4afa450
|
||||
BlockEntity tileentity = this.level().getBlockEntity(this.hivePos);
|
||||
|
||||
return tileentity instanceof BeehiveBlockEntity && ((BeehiveBlockEntity) tileentity).isFireNearby();
|
||||
@@ -446,6 +447,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
|
||||
@@ -453,6 +454,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
|
||||
}
|
||||
|
||||
private boolean doesHiveHaveSpace(BlockPos pos) {
|
||||
@ -24,7 +24,7 @@ index 27e3bed06cfb5c36125b55c4862fca94ade26a09..41f5b4fc4a4b7d2a54b08869d4afa450
|
||||
BlockEntity tileentity = this.level().getBlockEntity(pos);
|
||||
|
||||
return tileentity instanceof BeehiveBlockEntity ? !((BeehiveBlockEntity) tileentity).isFull() : false;
|
||||
@@ -922,6 +924,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
|
||||
@@ -929,6 +931,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
|
||||
@Override
|
||||
public boolean canBeeUse() {
|
||||
if (Bee.this.hasHive() && Bee.this.wantsToEnterHive() && Bee.this.hivePos.closerToCenterThan(Bee.this.position(), 2.0D)) {
|
||||
@ -32,7 +32,7 @@ index 27e3bed06cfb5c36125b55c4862fca94ade26a09..41f5b4fc4a4b7d2a54b08869d4afa450
|
||||
BlockEntity tileentity = Bee.this.level().getBlockEntity(Bee.this.hivePos);
|
||||
|
||||
if (tileentity instanceof BeehiveBlockEntity) {
|
||||
@@ -945,6 +948,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
|
||||
@@ -952,6 +955,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
|
||||
|
||||
@Override
|
||||
public void start() {
|
@ -25,10 +25,10 @@ index bd15131b7506e965bcf64be20330731256a1e1f0..0e3c89b9d75160d0e8947d042a1568da
|
||||
EntityType<?> entitytypes = entity.getType();
|
||||
int i = entitytypes.clientTrackingRange() * 16;
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 6c8fa0ed1e445e77593b6d26c09eeaac1437787d..0353b3e3a9d9a0bd44f48a61a02811ec0bad186a 100644
|
||||
index da59ce7c1eda353d0a5479317f347d78a70e0f95..a2c3a4b70ba4694fa6ce013bdf601e08f30cadae 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -2466,7 +2466,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -2502,7 +2502,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
|
||||
public void onTrackingStart(Entity entity) {
|
||||
org.spigotmc.AsyncCatcher.catchOp("entity register"); // Spigot
|
||||
@ -37,7 +37,7 @@ index 6c8fa0ed1e445e77593b6d26c09eeaac1437787d..0353b3e3a9d9a0bd44f48a61a02811ec
|
||||
if (entity instanceof ServerPlayer) {
|
||||
ServerPlayer entityplayer = (ServerPlayer) entity;
|
||||
|
||||
@@ -2500,6 +2500,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -2536,6 +2536,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
|
||||
entity.updateDynamicGameEventListener(DynamicGameEventListener::add);
|
||||
entity.valid = true; // CraftBukkit
|
@ -7,10 +7,10 @@ Causes sync chunk loads and who knows what all else.
|
||||
This is safe because Spectators are skipped in unloaded chunks too in vanilla.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 100bcf5174c06bb4450f0056bb5b5ef610ee1da6..d35b358ec97762788fd72b37470d97f1d6d927ef 100644
|
||||
index 956c0090992a64860bed2c5f72991d86a528b7ba..4c0968ee547fe606b340ab28dfd391716745bc3f 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -725,7 +725,7 @@ public class ServerPlayer extends Player {
|
||||
@@ -732,7 +732,7 @@ public class ServerPlayer extends Player {
|
||||
|
||||
public void doTick() {
|
||||
try {
|
@ -7,10 +7,10 @@ This fixes a lot of game state issues where packets were delayed for processing
|
||||
due to 1.15's new queue but processed while dead.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
index cc6a9e9566d6f9bf453f3d6fba132c886248bf1c..fb3f65feab6f5febf58be71f0b9b1a4381958f1d 100644
|
||||
index 110c751dc108dbdc2fd9fdd25ca07df7acc723e5..4bac05cb48d81dc9776d90502b6f12285b92122b 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -1166,7 +1166,7 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -1161,7 +1161,7 @@ public abstract class Player extends LivingEntity {
|
||||
|
||||
@Override
|
||||
protected boolean isImmobile() {
|
@ -14,10 +14,10 @@ movement will load only the chunk the player enters anyways and avoids loading
|
||||
massive amounts of surrounding chunks due to large AABB lookups.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index c5287f08c675550c897d72fd7eff3331d0640800..211cc5e508473f14827910aef88ee75a1203edab 100644
|
||||
index 29f1182026dade5b846ac411ff11260dbc9b5bc9..0d662f0c7530538e39001d5cf52ee00246a20092 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -824,6 +824,7 @@ public abstract class PlayerList {
|
||||
@@ -822,6 +822,7 @@ public abstract class PlayerList {
|
||||
entityplayer1.setShiftKeyDown(false);
|
||||
entityplayer1.forceSetPositionRotation(location.getX(), location.getY(), location.getZ(), location.getYaw(), location.getPitch());
|
||||
|
||||
@ -26,10 +26,10 @@ index c5287f08c675550c897d72fd7eff3331d0640800..211cc5e508473f14827910aef88ee75a
|
||||
// CraftBukkit end
|
||||
entityplayer1.setPos(entityplayer1.getX(), entityplayer1.getY() + 1.0D, entityplayer1.getZ());
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 15b807c0a49461ae5daecd6aef43f5c2d464b224..2f189712675b988a5bbb796abf54740470d836f4 100644
|
||||
index aba3e8e8873ef9b782382b09c6f5e243744c18b8..28b69ad104810721bb8c78fe4bda616e8598109f 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -237,6 +237,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -238,6 +238,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
public org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason spawnReason; // Paper
|
||||
|
||||
public com.destroystokyo.paper.loottable.PaperLootableInventoryData lootableData; // Paper
|
@ -13,10 +13,10 @@ By skipping this, we avoid potential for a large spike on server start.
|
||||
public net.minecraft.server.level.ServerPlayer fudgeSpawnLocation(Lnet/minecraft/server/level/ServerLevel;)V
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index d35b358ec97762788fd72b37470d97f1d6d927ef..a5dd060ad0b978fddbc193feb8bbab99342b4d56 100644
|
||||
index 4c0968ee547fe606b340ab28dfd391716745bc3f..ff0191dd75b5014e224db8f1419dcec240cb1436 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -378,7 +378,7 @@ public class ServerPlayer extends Player {
|
||||
@@ -385,7 +385,7 @@ public class ServerPlayer extends Player {
|
||||
this.stats = server.getPlayerList().getPlayerStats(this);
|
||||
this.advancements = server.getPlayerList().getPlayerAdvancements(this);
|
||||
this.setMaxUpStep(1.0F);
|
||||
@ -25,7 +25,7 @@ index d35b358ec97762788fd72b37470d97f1d6d927ef..a5dd060ad0b978fddbc193feb8bbab99
|
||||
this.updateOptions(clientOptions);
|
||||
|
||||
this.cachedSingleHashSet = new com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet<>(this); // Paper
|
||||
@@ -612,7 +612,7 @@ public class ServerPlayer extends Player {
|
||||
@@ -619,7 +619,7 @@ public class ServerPlayer extends Player {
|
||||
position = Vec3.atCenterOf(world.getSharedSpawnPos());
|
||||
}
|
||||
this.setLevel(world);
|
||||
@ -35,10 +35,10 @@ index d35b358ec97762788fd72b37470d97f1d6d927ef..a5dd060ad0b978fddbc193feb8bbab99
|
||||
this.gameMode.setLevel((ServerLevel) world);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 211cc5e508473f14827910aef88ee75a1203edab..f894d6549e4abf1001de68c8bc3ea0129e973e18 100644
|
||||
index 0d662f0c7530538e39001d5cf52ee00246a20092..1b49ac7da3c28712eeec7a5a3771105d4b28e3fa 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -228,6 +228,7 @@ public abstract class PlayerList {
|
||||
@@ -226,6 +226,7 @@ public abstract class PlayerList {
|
||||
// Paper start
|
||||
if (nbttagcompound == null) {
|
||||
player.spawnReason = org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.DEFAULT; // set Player SpawnReason to DEFAULT on first login
|
@ -59,10 +59,10 @@ index 6aaed8e8bf8c721fc834da5c76ac72a4c3e92458..4b002e8b75d117b726b0de274a76d359
|
||||
// Many servers tend to restart at a fixed time at xx:00 which causes an uneven distribution of requests on the
|
||||
// bStats backend. To circumvent this problem, we introduce some randomness into the initial and second delay.
|
||||
diff --git a/src/main/java/net/minecraft/CrashReport.java b/src/main/java/net/minecraft/CrashReport.java
|
||||
index d7995cadda8f48bbf642114935311180d3ebde5b..226cba0c1eeedd9e80acd603c46b802c183db1fa 100644
|
||||
index a9a0248b1bd1ac454064e977b61f9b7d80962ff8..059b1a0bf048af6a28c322f35da3d3cbbe426546 100644
|
||||
--- a/src/main/java/net/minecraft/CrashReport.java
|
||||
+++ b/src/main/java/net/minecraft/CrashReport.java
|
||||
@@ -230,6 +230,7 @@ public class CrashReport {
|
||||
@@ -233,6 +233,7 @@ public class CrashReport {
|
||||
}
|
||||
|
||||
public static CrashReport forThrowable(Throwable cause, String title) {
|
||||
@ -71,10 +71,10 @@ index d7995cadda8f48bbf642114935311180d3ebde5b..226cba0c1eeedd9e80acd603c46b802c
|
||||
cause = cause.getCause();
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index f700e677d75f911b786a22b4cc9d0a016d99b02f..5f8cf962a4b630223fb93ffea49d1b2151e1604d 100644
|
||||
index 2deb639d404943ef5b028c4ede59cab99b31a40f..08f7f287af32597d8a39f429013adec9266020bf 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -291,7 +291,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -297,7 +297,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
public java.util.Queue<Runnable> processQueue = new java.util.concurrent.ConcurrentLinkedQueue<Runnable>();
|
||||
public int autosavePeriod;
|
||||
public Commands vanillaCommandDispatcher;
|
||||
@ -83,7 +83,7 @@ index f700e677d75f911b786a22b4cc9d0a016d99b02f..5f8cf962a4b630223fb93ffea49d1b21
|
||||
// CraftBukkit end
|
||||
// Spigot start
|
||||
public static final int TPS = 20;
|
||||
@@ -302,6 +302,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -308,6 +308,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
public final io.papermc.paper.configuration.PaperConfigurations paperConfigurations;
|
||||
public static long currentTickLong = 0L; // Paper
|
||||
|
||||
@ -93,7 +93,7 @@ index f700e677d75f911b786a22b4cc9d0a016d99b02f..5f8cf962a4b630223fb93ffea49d1b21
|
||||
public static <S extends MinecraftServer> S spin(Function<Thread, S> serverFactory) {
|
||||
AtomicReference<S> atomicreference = new AtomicReference();
|
||||
Thread thread = new io.papermc.paper.util.TickThread(() -> { // Paper - rewrite chunk system
|
||||
@@ -868,6 +871,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -914,6 +917,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
// CraftBukkit start
|
||||
private boolean hasStopped = false;
|
||||
@ -101,7 +101,7 @@ index f700e677d75f911b786a22b4cc9d0a016d99b02f..5f8cf962a4b630223fb93ffea49d1b21
|
||||
private final Object stopLock = new Object();
|
||||
public final boolean hasStopped() {
|
||||
synchronized (this.stopLock) {
|
||||
@@ -882,6 +886,19 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -928,6 +932,19 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
if (this.hasStopped) return;
|
||||
this.hasStopped = true;
|
||||
}
|
||||
@ -121,7 +121,7 @@ index f700e677d75f911b786a22b4cc9d0a016d99b02f..5f8cf962a4b630223fb93ffea49d1b21
|
||||
// CraftBukkit end
|
||||
if (this.metricsRecorder.isRecording()) {
|
||||
this.cancelRecordingMetrics();
|
||||
@@ -935,7 +952,20 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -981,7 +998,20 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.getProfileCache().save(false); // Paper
|
||||
}
|
||||
// Spigot end
|
||||
@ -142,7 +142,7 @@ index f700e677d75f911b786a22b4cc9d0a016d99b02f..5f8cf962a4b630223fb93ffea49d1b21
|
||||
}
|
||||
|
||||
public String getLocalIp() {
|
||||
@@ -1030,6 +1060,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1076,6 +1106,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
protected void runServer() {
|
||||
try {
|
||||
@ -150,7 +150,7 @@ index f700e677d75f911b786a22b4cc9d0a016d99b02f..5f8cf962a4b630223fb93ffea49d1b21
|
||||
if (!this.initServer()) {
|
||||
throw new IllegalStateException("Failed to initialize server");
|
||||
}
|
||||
@@ -1039,6 +1070,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1085,6 +1116,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.status = this.buildServerStatus();
|
||||
|
||||
// Spigot start
|
||||
@ -168,9 +168,9 @@ index f700e677d75f911b786a22b4cc9d0a016d99b02f..5f8cf962a4b630223fb93ffea49d1b21
|
||||
+ org.spigotmc.WatchdogThread.tick(); // Paper
|
||||
org.spigotmc.WatchdogThread.hasStarted = true; // Paper
|
||||
Arrays.fill( this.recentTps, 20 );
|
||||
long start = System.nanoTime(), curTime, tickSection = start; // Paper - Further improve server tick loop
|
||||
@@ -1099,6 +1142,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
JvmProfiler.INSTANCE.onServerTick(this.averageTickTime);
|
||||
long tickSection = Util.getNanos(), curTime, tickCount = 1; // Paper
|
||||
@@ -1163,6 +1206,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
JvmProfiler.INSTANCE.onServerTick(this.smoothedTickTimeMillis);
|
||||
}
|
||||
} catch (Throwable throwable) {
|
||||
+ // Paper start
|
||||
@ -182,7 +182,7 @@ index f700e677d75f911b786a22b4cc9d0a016d99b02f..5f8cf962a4b630223fb93ffea49d1b21
|
||||
MinecraftServer.LOGGER.error("Encountered an unexpected exception", throwable);
|
||||
// Spigot Start
|
||||
if ( throwable.getCause() != null )
|
||||
@@ -1129,14 +1178,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1193,14 +1242,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.services.profileCache().clearExecutor();
|
||||
}
|
||||
|
||||
@ -200,7 +200,7 @@ index f700e677d75f911b786a22b4cc9d0a016d99b02f..5f8cf962a4b630223fb93ffea49d1b21
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1205,6 +1254,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1269,6 +1318,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
@Override
|
||||
public TickTask wrapRunnable(Runnable runnable) {
|
||||
@ -213,7 +213,7 @@ index f700e677d75f911b786a22b4cc9d0a016d99b02f..5f8cf962a4b630223fb93ffea49d1b21
|
||||
return new TickTask(this.tickCount, runnable);
|
||||
}
|
||||
|
||||
@@ -1445,6 +1500,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1547,6 +1602,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
try {
|
||||
crashreport = CrashReport.forThrowable(throwable, "Exception ticking world");
|
||||
} catch (Throwable t) {
|
||||
@ -221,7 +221,7 @@ index f700e677d75f911b786a22b4cc9d0a016d99b02f..5f8cf962a4b630223fb93ffea49d1b21
|
||||
throw new RuntimeException("Error generating crash report", t);
|
||||
}
|
||||
// Spigot End
|
||||
@@ -1958,7 +2014,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2060,7 +2116,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
this.worldData.setDataConfiguration(worlddataconfiguration);
|
||||
this.resources.managers.updateRegistryTags(this.registryAccess());
|
||||
@ -239,7 +239,7 @@ index f700e677d75f911b786a22b4cc9d0a016d99b02f..5f8cf962a4b630223fb93ffea49d1b21
|
||||
this.functionManager.replaceLibrary(this.resources.managers.getFunctionLibrary());
|
||||
this.structureTemplateManager.onResourceManagerReload(this.resources.resourceManager);
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index 307f3ab69186c0980f33d664bb2db8d1aae228f8..fce3edc97c7df45389bb3754f873a314d42929e4 100644
|
||||
index 109c7ff78d4c1f5496d294f52ecfd9df2070db1e..fe47a38137f7b7fa94c507e790eec4fb7303595f 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -269,7 +269,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@ -271,10 +271,10 @@ index 307f3ab69186c0980f33d664bb2db8d1aae228f8..fce3edc97c7df45389bb3754f873a314
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index f894d6549e4abf1001de68c8bc3ea0129e973e18..0267886463facdfda43b2dde7efc62001a9adf97 100644
|
||||
index 1b49ac7da3c28712eeec7a5a3771105d4b28e3fa..96c1938a83cf70b76a3b547cd96a7d395a1b9d7e 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -534,7 +534,7 @@ public abstract class PlayerList {
|
||||
@@ -532,7 +532,7 @@ public abstract class PlayerList {
|
||||
this.cserver.getPluginManager().callEvent(playerQuitEvent);
|
||||
entityplayer.getBukkitEntity().disconnect(playerQuitEvent.getQuitMessage());
|
||||
|
||||
@ -296,10 +296,10 @@ index f5829ae484d93b547a5437b85a9621346384a11b..83701fbfaa56a232593ee8f11a3afb89
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index 4b0a7ef056ff7dd687d5135ac748ee57d556121e..046fa6e5b2013c0872176592dd8cc6681a9b308a 100644
|
||||
index 48b264c5e50a33ee9a1d60bf592964eb1b6c79ce..7a604d2679c65b15e6d651e65c0475404aee9592 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -904,6 +904,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -915,6 +915,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
try {
|
||||
tickConsumer.accept(entity);
|
||||
} catch (Throwable throwable) {
|
||||
@ -320,7 +320,7 @@ index 12834995b2bab9e82a40feb01f038532961296cf..12af77215bfd6df3b6802a567ac3c013
|
||||
final String msg = String.format("BlockEntity threw exception at %s:%s,%s,%s", LevelChunk.this.getLevel().getWorld().getName(), this.getPos().getX(), this.getPos().getY(), this.getPos().getZ());
|
||||
net.minecraft.server.MinecraftServer.LOGGER.error(msg, throwable);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
index a288b405052716ba13adefe43ef2006c8bf6242d..bec85212b48f8ae0c89aef01c3cd245ae0c282fc 100644
|
||||
index 17d74aa6d857e49b61f5aed30be2b17be871df4c..ff16522a4ae4e0cb32f4c6b919bcaffc4507dfe8 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -179,6 +179,36 @@ public class Main {
|
@ -8,10 +8,10 @@ is important because we clone chunk data after reading it for safety.
|
||||
So, reduce the impact of the clone on GC.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/nbt/CompoundTag.java b/src/main/java/net/minecraft/nbt/CompoundTag.java
|
||||
index 92095b494a0c4fb89b84f0b1c0376615d28e34ce..ad0251b73d21b36bf19e9aa649817b4da2d0a6b4 100644
|
||||
index c77a6bb6885ffaaa4d9e1aa9d4770d5e847a590b..135530bc9d7ecd0348ace6474f4ca6d2e1bad283 100644
|
||||
--- a/src/main/java/net/minecraft/nbt/CompoundTag.java
|
||||
+++ b/src/main/java/net/minecraft/nbt/CompoundTag.java
|
||||
@@ -46,7 +46,7 @@ public class CompoundTag implements Tag {
|
||||
@@ -50,7 +50,7 @@ public class CompoundTag implements Tag {
|
||||
|
||||
private static CompoundTag loadCompound(DataInput input, NbtAccounter tracker) throws IOException {
|
||||
tracker.accountBytes(48L);
|
||||
@ -20,7 +20,7 @@ index 92095b494a0c4fb89b84f0b1c0376615d28e34ce..ad0251b73d21b36bf19e9aa649817b4d
|
||||
|
||||
byte b;
|
||||
while((b = input.readByte()) != 0) {
|
||||
@@ -167,7 +167,7 @@ public class CompoundTag implements Tag {
|
||||
@@ -171,7 +171,7 @@ public class CompoundTag implements Tag {
|
||||
}
|
||||
|
||||
public CompoundTag() {
|
||||
@ -29,7 +29,7 @@ index 92095b494a0c4fb89b84f0b1c0376615d28e34ce..ad0251b73d21b36bf19e9aa649817b4d
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -486,8 +486,16 @@ public class CompoundTag implements Tag {
|
||||
@@ -490,8 +490,16 @@ public class CompoundTag implements Tag {
|
||||
|
||||
@Override
|
||||
public CompoundTag copy() {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Prevent opening inventories when frozen
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index a5dd060ad0b978fddbc193feb8bbab99342b4d56..b5e42c3602f45a5b540dfc54421ab22866f2e4d9 100644
|
||||
index ff0191dd75b5014e224db8f1419dcec240cb1436..3a026f766e2d67e005ae8a06337d465f92c8d1f3 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -694,7 +694,7 @@ public class ServerPlayer extends Player {
|
||||
@@ -701,7 +701,7 @@ public class ServerPlayer extends Player {
|
||||
containerUpdateDelay = this.level().paperConfig().tickRates.containerUpdate;
|
||||
}
|
||||
// Paper end
|
||||
@ -17,7 +17,7 @@ index a5dd060ad0b978fddbc193feb8bbab99342b4d56..b5e42c3602f45a5b540dfc54421ab228
|
||||
this.closeContainer(org.bukkit.event.inventory.InventoryCloseEvent.Reason.CANT_USE); // Paper
|
||||
this.containerMenu = this.inventoryMenu;
|
||||
}
|
||||
@@ -1543,7 +1543,7 @@ public class ServerPlayer extends Player {
|
||||
@@ -1555,7 +1555,7 @@ public class ServerPlayer extends Player {
|
||||
} else {
|
||||
// CraftBukkit start
|
||||
this.containerMenu = container;
|
||||
@ -27,10 +27,10 @@ index a5dd060ad0b978fddbc193feb8bbab99342b4d56..b5e42c3602f45a5b540dfc54421ab228
|
||||
this.initMenu(container);
|
||||
return OptionalInt.of(this.containerCounter);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
index 607dc510ac856a0bf3a54bf1004bdf98825131e7..6a9ab8bab7eb443f83e939bed17cb6fc9d1f3906 100644
|
||||
index 801dca6bbafd6e1825a1291fc128efc165f4c8d1..03b3e5a49658ea6341cd303b75be36a328907863 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
@@ -325,7 +325,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
||||
@@ -326,7 +326,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
||||
if (adventure$title == null) adventure$title = net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(container.getBukkitView().getTitle()); // Paper
|
||||
|
||||
//player.connection.send(new ClientboundOpenScreenPacket(container.containerId, windowType, CraftChatMessage.fromString(title)[0])); // Paper - comment
|
||||
@ -39,7 +39,7 @@ index 607dc510ac856a0bf3a54bf1004bdf98825131e7..6a9ab8bab7eb443f83e939bed17cb6fc
|
||||
player.containerMenu = container;
|
||||
player.initMenu(container);
|
||||
}
|
||||
@@ -399,7 +399,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
||||
@@ -400,7 +400,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
||||
net.kyori.adventure.text.Component adventure$title = inventory.title(); // Paper
|
||||
if (adventure$title == null) adventure$title = net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(inventory.getTitle()); // Paper
|
||||
//player.connection.send(new ClientboundOpenScreenPacket(container.containerId, windowType, CraftChatMessage.fromString(title)[0])); // Paper - comment
|
@ -12,10 +12,10 @@ The entity's current team collision rule causes them to NEVER collide.
|
||||
Co-authored-by: Owen1212055 <23108066+Owen1212055@users.noreply.github.com>
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 63e00b3aa1b31c14fc4630fb4b2d3355349bdf24..ad0c8e43d27feb24e614fa15569edab625eff875 100644
|
||||
index 2d28d9a42e89b7efadd4e798c3da61565221a5bd..8577eb85cfe6d061e9e8b7e380db452a8c4ec858 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -3396,10 +3396,24 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -3398,10 +3398,24 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
if (this.level().isClientSide()) {
|
||||
this.level().getEntities(EntityTypeTest.forClass(net.minecraft.world.entity.player.Player.class), this.getBoundingBox(), EntitySelector.pushableBy(this)).forEach(this::doPush);
|
||||
} else {
|
@ -87,10 +87,10 @@ index 0000000000000000000000000000000000000000..b6f4400df3d8ec7e06a996de54f8cabb
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index b5e42c3602f45a5b540dfc54421ab22866f2e4d9..983b006d6db81bbc285fceac23ea4b9f15b2029b 100644
|
||||
index 3a026f766e2d67e005ae8a06337d465f92c8d1f3..352fbab070ccdb683e9a7558292c86cc443c018b 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -379,7 +379,7 @@ public class ServerPlayer extends Player {
|
||||
@@ -386,7 +386,7 @@ public class ServerPlayer extends Player {
|
||||
this.advancements = server.getPlayerList().getPlayerAdvancements(this);
|
||||
this.setMaxUpStep(1.0F);
|
||||
// this.fudgeSpawnLocation(world); // Paper - don't move to spawn on login, only first join
|
||||
@ -99,7 +99,7 @@ index b5e42c3602f45a5b540dfc54421ab22866f2e4d9..983b006d6db81bbc285fceac23ea4b9f
|
||||
|
||||
this.cachedSingleHashSet = new com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet<>(this); // Paper
|
||||
|
||||
@@ -1950,7 +1950,23 @@ public class ServerPlayer extends Player {
|
||||
@@ -2051,7 +2051,23 @@ public class ServerPlayer extends Player {
|
||||
}
|
||||
}
|
||||
|
||||
@ -123,7 +123,7 @@ index b5e42c3602f45a5b540dfc54421ab22866f2e4d9..983b006d6db81bbc285fceac23ea4b9f
|
||||
// CraftBukkit start
|
||||
if (this.getMainArm() != clientOptions.mainHand()) {
|
||||
PlayerChangedMainHandEvent event = new PlayerChangedMainHandEvent(this.getBukkitEntity(), this.getMainArm() == HumanoidArm.LEFT ? MainHand.LEFT : MainHand.RIGHT);
|
||||
@@ -1962,6 +1978,11 @@ public class ServerPlayer extends Player {
|
||||
@@ -2063,6 +2079,11 @@ public class ServerPlayer extends Player {
|
||||
this.server.server.getPluginManager().callEvent(new com.destroystokyo.paper.event.player.PlayerLocaleChangeEvent(this.getBukkitEntity(), this.language, clientOptions.language())); // Paper
|
||||
}
|
||||
// CraftBukkit end
|
||||
@ -136,10 +136,10 @@ index b5e42c3602f45a5b540dfc54421ab22866f2e4d9..983b006d6db81bbc285fceac23ea4b9f
|
||||
this.adventure$locale = net.kyori.adventure.translation.Translator.parseLocale(this.language); // Paper
|
||||
this.requestedViewDistance = clientOptions.viewDistance();
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 8341d66dd5cad3cebdd95cfbc995cc3e8d43d934..7c40718a53d2ef480441fd053de7c45971efe416 100644
|
||||
index abbbd559ee0301e261419a4e1c2c082174a91881..e00e595677ce0b4e9e1e12883b06f99f55af7d31 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -604,6 +604,28 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -611,6 +611,28 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
connection.disconnect(message == null ? net.kyori.adventure.text.Component.empty() : message);
|
||||
}
|
||||
}
|
@ -43,10 +43,10 @@ index 0e3c89b9d75160d0e8947d042a1568da13d62fcf..8d12a6da0f0679fd14c2a498f9645bd0
|
||||
if (!(entity instanceof EnderDragonPart)) {
|
||||
EntityType<?> entitytypes = entity.getType();
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 983b006d6db81bbc285fceac23ea4b9f15b2029b..49d341605ac7e82c5dcdcc960b6581aa7e1fb8f3 100644
|
||||
index 352fbab070ccdb683e9a7558292c86cc443c018b..b2e980c1f2e2ec417f75fbd7bdd2188fdb4eba23 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -264,6 +264,7 @@ public class ServerPlayer extends Player {
|
||||
@@ -271,6 +271,7 @@ public class ServerPlayer extends Player {
|
||||
public double maxHealthCache;
|
||||
public boolean joining = true;
|
||||
public boolean sentListPacket = false;
|
||||
@ -55,10 +55,10 @@ index 983b006d6db81bbc285fceac23ea4b9f15b2029b..49d341605ac7e82c5dcdcc960b6581aa
|
||||
// CraftBukkit end
|
||||
public boolean isRealPlayer; // Paper
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 0267886463facdfda43b2dde7efc62001a9adf97..f8679d4b52a5948048a91338dc2cac8bfa5ef9e3 100644
|
||||
index 96c1938a83cf70b76a3b547cd96a7d395a1b9d7e..c81818c77954aed263fd8e8a7d214ddd012f3d71 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -297,6 +297,12 @@ public abstract class PlayerList {
|
||||
@@ -295,6 +295,12 @@ public abstract class PlayerList {
|
||||
this.playersByUUID.put(player.getUUID(), player);
|
||||
// this.broadcastAll(ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(List.of(entityplayer))); // CraftBukkit - replaced with loop below
|
||||
|
||||
@ -71,7 +71,7 @@ index 0267886463facdfda43b2dde7efc62001a9adf97..f8679d4b52a5948048a91338dc2cac8b
|
||||
// CraftBukkit start
|
||||
CraftPlayer bukkitPlayer = player.getBukkitEntity();
|
||||
|
||||
@@ -335,6 +341,8 @@ public abstract class PlayerList {
|
||||
@@ -333,6 +339,8 @@ public abstract class PlayerList {
|
||||
player.connection.send(ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(List.of(entityplayer1)));
|
||||
}
|
||||
player.sentListPacket = true;
|
||||
@ -80,7 +80,7 @@ index 0267886463facdfda43b2dde7efc62001a9adf97..f8679d4b52a5948048a91338dc2cac8b
|
||||
// CraftBukkit end
|
||||
|
||||
player.getEntityData().refresh(player); // CraftBukkit - BungeeCord#2321, send complete data to self on spawn
|
||||
@@ -357,6 +365,11 @@ public abstract class PlayerList {
|
||||
@@ -355,6 +363,11 @@ public abstract class PlayerList {
|
||||
playerconnection.send(new ClientboundUpdateMobEffectPacket(player.getId(), mobeffect));
|
||||
}
|
||||
|
||||
@ -92,7 +92,7 @@ index 0267886463facdfda43b2dde7efc62001a9adf97..f8679d4b52a5948048a91338dc2cac8b
|
||||
if (nbttagcompound != null && nbttagcompound.contains("RootVehicle", 10)) {
|
||||
CompoundTag nbttagcompound1 = nbttagcompound.getCompound("RootVehicle");
|
||||
// CraftBukkit start
|
||||
@@ -405,6 +418,10 @@ public abstract class PlayerList {
|
||||
@@ -403,6 +416,10 @@ public abstract class PlayerList {
|
||||
}
|
||||
}
|
||||
|
||||
@ -103,7 +103,7 @@ index 0267886463facdfda43b2dde7efc62001a9adf97..f8679d4b52a5948048a91338dc2cac8b
|
||||
player.initInventoryMenu();
|
||||
// CraftBukkit - Moved from above, added world
|
||||
// Paper start - Add to collideRule team if needed
|
||||
@@ -414,6 +431,7 @@ public abstract class PlayerList {
|
||||
@@ -412,6 +429,7 @@ public abstract class PlayerList {
|
||||
scoreboard.addPlayerToTeam(player.getScoreboardName(), collideRuleTeam);
|
||||
}
|
||||
// Paper end
|
@ -10,10 +10,10 @@ Co-authored-by: Wyatt Childers <wchilders@nearce.com>
|
||||
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index f8679d4b52a5948048a91338dc2cac8bfa5ef9e3..ac6c1c1cf0d736c31a4e3666cb9e10ba8bc1c7c5 100644
|
||||
index c81818c77954aed263fd8e8a7d214ddd012f3d71..ac5e83589b812290032773755f51c89107ccb5a4 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -196,7 +196,7 @@ public abstract class PlayerList {
|
||||
@@ -194,7 +194,7 @@ public abstract class PlayerList {
|
||||
}
|
||||
|
||||
CompoundTag nbttagcompound = this.load(player);
|
||||
@ -22,7 +22,7 @@ index f8679d4b52a5948048a91338dc2cac8bfa5ef9e3..ac6c1c1cf0d736c31a4e3666cb9e10ba
|
||||
// CraftBukkit start - Better rename detection
|
||||
if (nbttagcompound != null && nbttagcompound.contains("bukkit")) {
|
||||
CompoundTag bukkit = nbttagcompound.getCompound("bukkit");
|
||||
@@ -204,15 +204,42 @@ public abstract class PlayerList {
|
||||
@@ -202,15 +202,42 @@ public abstract class PlayerList {
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
@ -67,7 +67,7 @@ index f8679d4b52a5948048a91338dc2cac8bfa5ef9e3..ac6c1c1cf0d736c31a4e3666cb9e10ba
|
||||
|
||||
ResourceKey<Level> resourcekey1 = resourcekey;
|
||||
ServerLevel worldserver = this.server.getLevel(resourcekey1);
|
||||
@@ -221,6 +248,7 @@ public abstract class PlayerList {
|
||||
@@ -219,6 +246,7 @@ public abstract class PlayerList {
|
||||
if (worldserver == null) {
|
||||
PlayerList.LOGGER.warn("Unknown respawn dimension {}, defaulting to overworld", resourcekey1);
|
||||
worldserver1 = this.server.overworld();
|
||||
@ -75,7 +75,7 @@ index f8679d4b52a5948048a91338dc2cac8bfa5ef9e3..ac6c1c1cf0d736c31a4e3666cb9e10ba
|
||||
} else {
|
||||
worldserver1 = worldserver;
|
||||
}
|
||||
@@ -228,6 +256,10 @@ public abstract class PlayerList {
|
||||
@@ -226,6 +254,10 @@ public abstract class PlayerList {
|
||||
// Paper start
|
||||
if (nbttagcompound == null) {
|
||||
player.spawnReason = org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.DEFAULT; // set Player SpawnReason to DEFAULT on first login
|
||||
@ -87,10 +87,10 @@ index f8679d4b52a5948048a91338dc2cac8bfa5ef9e3..ac6c1c1cf0d736c31a4e3666cb9e10ba
|
||||
}
|
||||
// Paper end
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 2f189712675b988a5bbb796abf54740470d836f4..186e9541031eb2daaf479d7d14782e917b3e16e5 100644
|
||||
index 28b69ad104810721bb8c78fe4bda616e8598109f..9626b9827dcf5bf86c95b210d2ec9b4285239a97 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -2312,27 +2312,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -2335,27 +2335,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add PlayerAttackEntityCooldownResetEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index ad0c8e43d27feb24e614fa15569edab625eff875..5d4bf7390a4b368e9ef8f39da2aa4ff60329c161 100644
|
||||
index 8577eb85cfe6d061e9e8b7e380db452a8c4ec858..9eea89e4c3ec5f999ec7f5773f4c37209211c173 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -2193,7 +2193,16 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -2190,7 +2190,16 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
|
||||
EntityDamageEvent event = CraftEventFactory.handleLivingEntityDamageEvent(this, damagesource, originalDamage, hardHatModifier, blockingModifier, armorModifier, resistanceModifier, magicModifier, absorptionModifier, hardHat, blocking, armor, resistance, magic, absorption);
|
||||
if (damagesource.getEntity() instanceof net.minecraft.world.entity.player.Player) {
|
@ -6,10 +6,10 @@ Subject: [PATCH] Don't fire BlockFade on worldgen threads
|
||||
Caused a deadlock
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/FireBlock.java b/src/main/java/net/minecraft/world/level/block/FireBlock.java
|
||||
index 9cda3353c033b3fb4e34a8a0e2cc4085fec9cdaa..893ff998afaa47500a03ae55ce45e9862ab1cc18 100644
|
||||
index 80e90bae3c05bbaf978a66629d9c4132c22efd1a..8fce3ad36a6ee8166f4abd9e0e369b641d487af9 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/FireBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/FireBlock.java
|
||||
@@ -101,6 +101,7 @@ public class FireBlock extends BaseFireBlock {
|
||||
@@ -108,6 +108,7 @@ public class FireBlock extends BaseFireBlock {
|
||||
@Override
|
||||
public BlockState updateShape(BlockState state, Direction direction, BlockState neighborState, LevelAccessor world, BlockPos pos, BlockPos neighborPos) {
|
||||
// CraftBukkit start
|
||||
@ -17,7 +17,7 @@ index 9cda3353c033b3fb4e34a8a0e2cc4085fec9cdaa..893ff998afaa47500a03ae55ce45e986
|
||||
if (!this.canSurvive(state, world, pos)) {
|
||||
// Suppress during worldgen
|
||||
if (!(world instanceof Level)) {
|
||||
@@ -116,7 +117,7 @@ public class FireBlock extends BaseFireBlock {
|
||||
@@ -123,7 +124,7 @@ public class FireBlock extends BaseFireBlock {
|
||||
return blockState.getHandle();
|
||||
}
|
||||
}
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add phantom creative and insomniac controls
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/EntitySelector.java b/src/main/java/net/minecraft/world/entity/EntitySelector.java
|
||||
index 668a7c3f36cdbe48e472cb810b27ae4ab39a65d6..d15e62da0307728a7c2be191a27f87da1bb29f49 100644
|
||||
index 170fbb1d80947b9b21c2106497baae5c37bcdc0c..68e4440765636295a74ea942862d772d47282ad6 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/EntitySelector.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/EntitySelector.java
|
||||
@@ -27,6 +27,7 @@ public final class EntitySelector {
|
||||
@@ -28,6 +28,7 @@ public final class EntitySelector {
|
||||
return !entity.isSpectator();
|
||||
};
|
||||
public static final Predicate<Entity> CAN_BE_COLLIDED_WITH = EntitySelector.NO_SPECTATORS.and(Entity::canBeCollidedWith);
|
@ -16,10 +16,10 @@ So even if something NEW comes up, it would be impossible to drop the
|
||||
same item twice because the source was destroyed.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 186e9541031eb2daaf479d7d14782e917b3e16e5..8ecb398ca26753e602c2862bf0c35b76f9a413c0 100644
|
||||
index 9626b9827dcf5bf86c95b210d2ec9b4285239a97..b3d50a16748a295aa952c22e90708ea33a7af992 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -2436,11 +2436,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -2465,11 +2465,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
} else {
|
||||
// CraftBukkit start - Capture drops for death event
|
||||
if (this instanceof net.minecraft.world.entity.LivingEntity && !((net.minecraft.world.entity.LivingEntity) this).forceDrops) {
|
||||
@ -34,7 +34,7 @@ index 186e9541031eb2daaf479d7d14782e917b3e16e5..8ecb398ca26753e602c2862bf0c35b76
|
||||
|
||||
entityitem.setDefaultPickUpDelay();
|
||||
// CraftBukkit start
|
||||
@@ -3242,6 +3243,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -3271,6 +3272,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@Nullable
|
||||
public Entity teleportTo(ServerLevel worldserver, Vec3 location) {
|
||||
// CraftBukkit end
|
||||
@ -47,7 +47,7 @@ index 186e9541031eb2daaf479d7d14782e917b3e16e5..8ecb398ca26753e602c2862bf0c35b76
|
||||
if (this.level() instanceof ServerLevel && !this.isRemoved()) {
|
||||
this.level().getProfiler().push("changeDimension");
|
||||
// CraftBukkit start
|
||||
@@ -3268,6 +3275,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -3297,6 +3304,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
// CraftBukkit end
|
||||
|
||||
this.level().getProfiler().popPush("reloading");
|
||||
@ -59,7 +59,7 @@ index 186e9541031eb2daaf479d7d14782e917b3e16e5..8ecb398ca26753e602c2862bf0c35b76
|
||||
Entity entity = this.getType().create(worldserver);
|
||||
|
||||
if (entity != null) {
|
||||
@@ -3281,10 +3293,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -3314,10 +3326,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
// CraftBukkit start - Forward the CraftEntity to the new entity
|
||||
this.getBukkitEntity().setHandle(entity);
|
||||
entity.bukkitEntity = this.getBukkitEntity();
|
||||
@ -70,7 +70,7 @@ index 186e9541031eb2daaf479d7d14782e917b3e16e5..8ecb398ca26753e602c2862bf0c35b76
|
||||
// CraftBukkit end
|
||||
}
|
||||
|
||||
@@ -3405,7 +3413,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -3438,7 +3446,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
}
|
||||
|
||||
public boolean canChangeDimensions() {
|
||||
@ -80,10 +80,10 @@ index 186e9541031eb2daaf479d7d14782e917b3e16e5..8ecb398ca26753e602c2862bf0c35b76
|
||||
|
||||
public float getBlockExplosionResistance(Explosion explosion, BlockGetter world, BlockPos pos, BlockState blockState, FluidState fluidState, float max) {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 5d4bf7390a4b368e9ef8f39da2aa4ff60329c161..109c381adefd61c69768ce1572873b2e629aff0e 100644
|
||||
index 9eea89e4c3ec5f999ec7f5773f4c37209211c173..4b1366a456e7132d438fc99bd62e1dd77e35b35f 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -1708,9 +1708,9 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -1705,9 +1705,9 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
// Paper start
|
||||
org.bukkit.event.entity.EntityDeathEvent deathEvent = this.dropAllDeathLoot(damageSource);
|
||||
if (deathEvent == null || !deathEvent.isCancelled()) {
|
||||
@ -96,7 +96,7 @@ index 5d4bf7390a4b368e9ef8f39da2aa4ff60329c161..109c381adefd61c69768ce1572873b2e
|
||||
// Paper start - clear equipment if event is not cancelled
|
||||
if (this instanceof Mob) {
|
||||
for (EquipmentSlot slot : this.clearedEquipmentSlots) {
|
||||
@@ -1811,8 +1811,13 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -1808,8 +1808,13 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
this.dropCustomDeathLoot(source, i, flag);
|
||||
this.clearEquipmentSlots = prev; // Paper
|
||||
}
|
||||
@ -113,10 +113,10 @@ index 5d4bf7390a4b368e9ef8f39da2aa4ff60329c161..109c381adefd61c69768ce1572873b2e
|
||||
this.drops = new ArrayList<>();
|
||||
// CraftBukkit end
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
|
||||
index 91b9ec5831f439426a853ba9ac7a3f225629b099..e4e734e0f4c43c1687c8e3a8bbe15441e0bd8e76 100644
|
||||
index 2512e7757fa9135bfaf436790f5fce815d43b9ee..17b6649a7e36fc9322f857e83551d8a99f4f288d 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
|
||||
@@ -637,7 +637,7 @@ public class ArmorStand extends LivingEntity {
|
||||
@@ -624,7 +624,7 @@ public class ArmorStand extends LivingEntity {
|
||||
for (i = 0; i < this.handItems.size(); ++i) {
|
||||
itemstack = (ItemStack) this.handItems.get(i);
|
||||
if (!itemstack.isEmpty()) {
|
||||
@ -125,7 +125,7 @@ index 91b9ec5831f439426a853ba9ac7a3f225629b099..e4e734e0f4c43c1687c8e3a8bbe15441
|
||||
this.handItems.set(i, ItemStack.EMPTY);
|
||||
}
|
||||
}
|
||||
@@ -645,7 +645,7 @@ public class ArmorStand extends LivingEntity {
|
||||
@@ -632,7 +632,7 @@ public class ArmorStand extends LivingEntity {
|
||||
for (i = 0; i < this.armorItems.size(); ++i) {
|
||||
itemstack = (ItemStack) this.armorItems.get(i);
|
||||
if (!itemstack.isEmpty()) {
|
||||
@ -135,7 +135,7 @@ index 91b9ec5831f439426a853ba9ac7a3f225629b099..e4e734e0f4c43c1687c8e3a8bbe15441
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index 96e33c433605ae2e0473b36f03894e030e79cd0d..39d710d98ca5435e7645ab91c109090c42ffc52f 100644
|
||||
index a63ff3a8286f323f7f5891aa33fdd72b9e2260b0..c743c9ad7cb68001a32317280ca8bedaae012a66 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -896,6 +896,11 @@ public class CraftEventFactory {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Validate PickItem Packet and kick for invalid
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 93b1e0b287d195181cb2253b3490ed537efa6b8e..c06ce8822891e7d2a8fa2b649b02555ce6e3373c 100644
|
||||
index 9b7902fa7ba79ff44b215647f580ea1834b1aa74..d15321ac9c11056c253a62d6db8b9b404a2b5d5b 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -867,7 +867,14 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -870,7 +870,14 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@Override
|
||||
public void handlePickItem(ServerboundPickItemPacket packet) {
|
||||
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel());
|
@ -5,10 +5,10 @@ Subject: [PATCH] Expose game version
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 83661761abdb31e62ea56af9d60fed393326be50..e7fbdccdd93bef036a7785acb19def334b039f0f 100644
|
||||
index 2c7370b6103faa6979b8d347d9e20248cbfc1740..4dfdb5bdfaf26921106a85ac0e6d4fc9ffbb9a7a 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -586,6 +586,13 @@ public final class CraftServer implements Server {
|
||||
@@ -581,6 +581,13 @@ public final class CraftServer implements Server {
|
||||
return this.bukkitVersion;
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ keeping long lived large direct buffers in cache.
|
||||
Set system properly at server startup if not set already to help protect from this.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
index bec85212b48f8ae0c89aef01c3cd245ae0c282fc..334743a8c82bbcb2f09d0919fc9597750a25b8dd 100644
|
||||
index ff16522a4ae4e0cb32f4c6b919bcaffc4507dfe8..f402d0ecc6ed3bfe76a3a2b6780dda5b8ecdd750 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -26,6 +26,7 @@ public class Main {
|
@ -29,10 +29,10 @@ index 0000000000000000000000000000000000000000..2d5494d2813b773e60ddba6790b750a9
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 5f8cf962a4b630223fb93ffea49d1b2151e1604d..fdaf757cbbc90841747989add56c13f252f645e5 100644
|
||||
index 08f7f287af32597d8a39f429013adec9266020bf..e230a6e3810929c2f9ac70a98c9fc41734ec06c2 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -872,6 +872,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -918,6 +918,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
// CraftBukkit start
|
||||
private boolean hasStopped = false;
|
||||
public volatile boolean hasFullyShutdown = false; // Paper
|
||||
@ -40,7 +40,7 @@ index 5f8cf962a4b630223fb93ffea49d1b2151e1604d..fdaf757cbbc90841747989add56c13f2
|
||||
private final Object stopLock = new Object();
|
||||
public final boolean hasStopped() {
|
||||
synchronized (this.stopLock) {
|
||||
@@ -886,6 +887,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -932,6 +933,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
if (this.hasStopped) return;
|
||||
this.hasStopped = true;
|
||||
}
|
||||
@ -48,7 +48,7 @@ index 5f8cf962a4b630223fb93ffea49d1b2151e1604d..fdaf757cbbc90841747989add56c13f2
|
||||
// Paper start - kill main thread, and kill it hard
|
||||
shutdownThread = Thread.currentThread();
|
||||
org.spigotmc.WatchdogThread.doStop(); // Paper
|
||||
@@ -986,6 +988,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1032,6 +1034,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
public void safeShutdown(boolean waitForShutdown, boolean isRestarting) {
|
||||
this.isRestarting = isRestarting;
|
||||
@ -58,7 +58,7 @@ index 5f8cf962a4b630223fb93ffea49d1b2151e1604d..fdaf757cbbc90841747989add56c13f2
|
||||
this.running = false;
|
||||
if (waitForShutdown) {
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.java
|
||||
index ed80d9551cd7cc1ec26a5d5fd7bc185b38fddd78..77e19f345bf68d12686a65e669cd597cd92af910 100644
|
||||
index 04a728a16bb629adbae1cd8586764a6dbc22b5dc..e48b287d6229f8043fba8a417f0b7558d6079783 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.java
|
||||
@@ -131,6 +131,11 @@ public class ServerConfigurationPacketListenerImpl extends ServerCommonPacketLis
|
||||
@ -74,10 +74,10 @@ index ed80d9551cd7cc1ec26a5d5fd7bc185b38fddd78..77e19f345bf68d12686a65e669cd597c
|
||||
this.connection.disconnect(ServerConfigurationPacketListenerImpl.DISCONNECT_REASON_INVALID_DATA);
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index e7fbdccdd93bef036a7785acb19def334b039f0f..6ad11ded56422417f3407b043c42eb5d17557e60 100644
|
||||
index 4dfdb5bdfaf26921106a85ac0e6d4fc9ffbb9a7a..66505398cff6f73a5c5d900ebb66450a5137a16a 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1010,6 +1010,7 @@ public final class CraftServer implements Server {
|
||||
@@ -1005,6 +1005,7 @@ public final class CraftServer implements Server {
|
||||
plugin.getDescription().getFullName(),
|
||||
"This plugin is not properly shutting down its async tasks when it is being reloaded. This may cause conflicts with the newly loaded version of the plugin"
|
||||
));
|
@ -5,10 +5,10 @@ Subject: [PATCH] Prevent teleporting dead entities
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index c06ce8822891e7d2a8fa2b649b02555ce6e3373c..c251202cb6b69b4dfa46b6836c6da1664f533738 100644
|
||||
index d15321ac9c11056c253a62d6db8b9b404a2b5d5b..e152c3ac26ad37e547e196331802e30f4839632a 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1515,6 +1515,13 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -1542,6 +1542,13 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
}
|
||||
|
||||
public void internalTeleport(double d0, double d1, double d2, float f, float f1, Set<RelativeMovement> set) { // Paper
|
@ -471,10 +471,10 @@ index 2d5494d2813b773e60ddba6790b750a9a08f21f8..0b210bdf7c1f5962afbd44195af6f84f
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/CrashReport.java b/src/main/java/net/minecraft/CrashReport.java
|
||||
index 226cba0c1eeedd9e80acd603c46b802c183db1fa..1d714d3eff11ed14f218656008190017494d4830 100644
|
||||
index 059b1a0bf048af6a28c322f35da3d3cbbe426546..e047dee632022abfe05865d1e71838be8d5d053a 100644
|
||||
--- a/src/main/java/net/minecraft/CrashReport.java
|
||||
+++ b/src/main/java/net/minecraft/CrashReport.java
|
||||
@@ -32,6 +32,7 @@ public class CrashReport {
|
||||
@@ -34,6 +34,7 @@ public class CrashReport {
|
||||
private final SystemReport systemReport = new SystemReport();
|
||||
|
||||
public CrashReport(String message, Throwable cause) {
|
||||
@ -545,7 +545,7 @@ index 45b4f1c295eda2fcc5067a4b21de247218ef117f..d364bd57b1675c8b21d781c2bc16c3e6
|
||||
throw new SkipPacketException(var13);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index fce3edc97c7df45389bb3754f873a314d42929e4..557fc4e380c00bc2ca34381b36eb3d6a38177209 100644
|
||||
index fe47a38137f7b7fa94c507e790eec4fb7303595f..7f5ecea0ee78a534d7c56fa9e3ad2117b5192c0a 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -195,6 +195,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@ -557,10 +557,10 @@ index fce3edc97c7df45389bb3754f873a314d42929e4..557fc4e380c00bc2ca34381b36eb3d6a
|
||||
paperConfigurations.initializeWorldDefaultsConfiguration(this.registryAccess());
|
||||
org.spigotmc.WatchdogThread.doStart(org.spigotmc.SpigotConfig.timeoutTime, org.spigotmc.SpigotConfig.restartOnCrash);
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 0353b3e3a9d9a0bd44f48a61a02811ec0bad186a..58a44898144af605e6e7d9253d99149ddc12bcbd 100644
|
||||
index a2c3a4b70ba4694fa6ce013bdf601e08f30cadae..8dc958dca402346d94d84c3d5c073cf00c438cee 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -221,7 +221,9 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -223,7 +223,9 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
public final UUID uuid;
|
||||
public boolean hasPhysicsEvent = true; // Paper
|
||||
public static Throwable getAddToWorldStackTrace(Entity entity) {
|
||||
@ -571,7 +571,7 @@ index 0353b3e3a9d9a0bd44f48a61a02811ec0bad186a..58a44898144af605e6e7d9253d99149d
|
||||
}
|
||||
|
||||
@Override public LevelChunk getChunkIfLoaded(int x, int z) { // Paper - this was added in world too but keeping here for NMS ABI
|
||||
@@ -1469,7 +1471,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1488,7 +1490,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
if (entity.isRemoved()) {
|
||||
// Paper start
|
||||
if (DEBUG_ENTITIES) {
|
||||
@ -581,7 +581,7 @@ index 0353b3e3a9d9a0bd44f48a61a02811ec0bad186a..58a44898144af605e6e7d9253d99149d
|
||||
}
|
||||
// Paper end
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.java
|
||||
index 77e19f345bf68d12686a65e669cd597cd92af910..8dbcc1b3a70b6bbea3bd2d15b6d66cc4f9cd53f8 100644
|
||||
index e48b287d6229f8043fba8a417f0b7558d6079783..cae10b963d153fb1777b18054796a45b2809342b 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.java
|
||||
@@ -133,7 +133,7 @@ public class ServerConfigurationPacketListenerImpl extends ServerCommonPacketLis
|
||||
@ -611,19 +611,19 @@ index caeead6c6082855f1651ee28263cc9f60423ca0c..b2bfb3893200362ac35ae60982f203f8
|
||||
final MinecraftServer server;
|
||||
public volatile boolean running;
|
||||
diff --git a/src/main/java/net/minecraft/server/players/OldUsersConverter.java b/src/main/java/net/minecraft/server/players/OldUsersConverter.java
|
||||
index 5db27d7bcaaa2eeaeeb08401513d8d23f6cb63c7..ce43cb0152ba07c6c21e08142d65813d47c3b63b 100644
|
||||
index 6a64c58fff9bbed542bf29a029531996f2a50d00..c24898f8e81e8ab9a1f90bf4439ea6c6f42f0508 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/OldUsersConverter.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/OldUsersConverter.java
|
||||
@@ -359,7 +359,7 @@ public class OldUsersConverter {
|
||||
@@ -358,7 +358,7 @@ public class OldUsersConverter {
|
||||
try {
|
||||
root = NbtIo.readCompressed(new java.io.FileInputStream(file5));
|
||||
root = NbtIo.readCompressed(new java.io.FileInputStream(file5), NbtAccounter.unlimitedHeap());
|
||||
} catch (Exception exception) {
|
||||
- exception.printStackTrace();
|
||||
+ io.papermc.paper.util.TraceUtil.printStackTrace(exception); // Paper
|
||||
ServerInternalException.reportInternalException(exception); // Paper
|
||||
}
|
||||
|
||||
@@ -373,7 +373,7 @@ public class OldUsersConverter {
|
||||
@@ -372,7 +372,7 @@ public class OldUsersConverter {
|
||||
try {
|
||||
NbtIo.writeCompressed(root, new java.io.FileOutputStream(file2));
|
||||
} catch (Exception exception) {
|
@ -792,10 +792,10 @@ index 4379b9948f1eecfe6fd7dea98e298ad5f761019a..3f081183521603824430709886a9cc31
|
||||
LOOK,
|
||||
JUMP,
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 6ad11ded56422417f3407b043c42eb5d17557e60..03ff1e8faec27f042aa9b3b5f5bcbe1abbde2cbd 100644
|
||||
index 66505398cff6f73a5c5d900ebb66450a5137a16a..913c1e4ee2df8160e1cd15a352fc71d61e7e38dc 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2845,5 +2845,11 @@ public final class CraftServer implements Server {
|
||||
@@ -2877,5 +2877,11 @@ public final class CraftServer implements Server {
|
||||
public boolean isStopping() {
|
||||
return net.minecraft.server.MinecraftServer.getServer().hasStopped();
|
||||
}
|
@ -5,11 +5,11 @@ Subject: [PATCH] Option for maximum exp value when merging orbs
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index 39d710d98ca5435e7645ab91c109090c42ffc52f..195735de5f35c0d80a8c5ae4bca20f149ce49f90 100644
|
||||
index c743c9ad7cb68001a32317280ca8bedaae012a66..ee28500547c6e069ce8702bfaa095e7a9abcd30d 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -690,16 +690,30 @@ public class CraftEventFactory {
|
||||
net.minecraft.world.entity.ExperienceOrb xp = (net.minecraft.world.entity.ExperienceOrb) entity;
|
||||
@@ -705,16 +705,30 @@ public class CraftEventFactory {
|
||||
if (entity instanceof net.minecraft.world.entity.ExperienceOrb xp) {
|
||||
double radius = world.spigotConfig.expMerge;
|
||||
if (radius > 0) {
|
||||
+ // Paper start - Maximum exp value when merging - Whole section has been tweaked, see comments for specifics
|
||||
@ -19,8 +19,7 @@ index 39d710d98ca5435e7645ab91c109090c42ffc52f..195735de5f35c0d80a8c5ae4bca20f14
|
||||
+
|
||||
List<Entity> entities = world.getEntities(entity, entity.getBoundingBox().inflate(radius, radius, radius));
|
||||
for (Entity e : entities) {
|
||||
if (e instanceof net.minecraft.world.entity.ExperienceOrb) {
|
||||
net.minecraft.world.entity.ExperienceOrb loopItem = (net.minecraft.world.entity.ExperienceOrb) e;
|
||||
if (e instanceof net.minecraft.world.entity.ExperienceOrb loopItem) {
|
||||
- if (!loopItem.isRemoved()) {
|
||||
+ // Paper start
|
||||
+ if (!loopItem.isRemoved() && !(maxValue > 0 && loopItem.value >= maxValue)) {
|
||||
@ -36,7 +35,8 @@ index 39d710d98ca5435e7645ab91c109090c42ffc52f..195735de5f35c0d80a8c5ae4bca20f14
|
||||
}
|
||||
}
|
||||
}
|
||||
+ } // Paper end - End iteration skip check - All tweaking ends here
|
||||
}
|
||||
+ } // Paper end - End iteration skip check - All tweaking ends here
|
||||
}
|
||||
// Spigot end
|
||||
} else if (!(entity instanceof ServerPlayer)) {
|
||||
|
@ -9,12 +9,12 @@ Plugins can cancel this if they want to ensure experience orbs do not lose impor
|
||||
metadata such as spawn reason, or conditionally move data from source to target.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index 195735de5f35c0d80a8c5ae4bca20f149ce49f90..c634a4b0d835df3ad6129ca03e11668f715ab8d2 100644
|
||||
index ee28500547c6e069ce8702bfaa095e7a9abcd30d..839deebc72a575eea5db4decd82c8c8b1884e621 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -700,7 +700,7 @@ public class CraftEventFactory {
|
||||
if (e instanceof net.minecraft.world.entity.ExperienceOrb) {
|
||||
net.minecraft.world.entity.ExperienceOrb loopItem = (net.minecraft.world.entity.ExperienceOrb) e;
|
||||
@@ -714,7 +714,7 @@ public class CraftEventFactory {
|
||||
for (Entity e : entities) {
|
||||
if (e instanceof net.minecraft.world.entity.ExperienceOrb loopItem) {
|
||||
// Paper start
|
||||
- if (!loopItem.isRemoved() && !(maxValue > 0 && loopItem.value >= maxValue)) {
|
||||
+ if (!loopItem.isRemoved() && !(maxValue > 0 && loopItem.value >= maxValue) && new com.destroystokyo.paper.event.entity.ExperienceOrbMergeEvent((org.bukkit.entity.ExperienceOrb) entity.getBukkitEntity(), (org.bukkit.entity.ExperienceOrb) loopItem.getBukkitEntity()).callEvent()) { // Paper - ExperienceOrbMergeEvent
|
@ -6,10 +6,10 @@ Subject: [PATCH] Fix PotionEffect ignores icon flag
|
||||
Co-authored-by: Tamion <70228790+notTamion@users.noreply.github.com>
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
index 904f34f52659e864d148204cb0eebb9b381cc24a..38cad5b0d7e6018adda56b3292280738c46622e9 100644
|
||||
index 1b7f2a23d475727644e22a60de0b2c7bfa7ca68f..f5b9d1fe0d672e11b6295aefc9e182606dbebf88 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
@@ -443,7 +443,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||
@@ -444,7 +444,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||
|
||||
@Override
|
||||
public boolean addPotionEffect(PotionEffect effect, boolean force) {
|
||||
@ -18,7 +18,7 @@ index 904f34f52659e864d148204cb0eebb9b381cc24a..38cad5b0d7e6018adda56b3292280738
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -464,7 +464,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||
@@ -465,7 +465,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||
@Override
|
||||
public PotionEffect getPotionEffect(PotionEffectType type) {
|
||||
MobEffectInstance handle = this.getHandle().getEffect(CraftPotionEffectType.bukkitToMinecraft(type));
|
||||
@ -27,7 +27,7 @@ index 904f34f52659e864d148204cb0eebb9b381cc24a..38cad5b0d7e6018adda56b3292280738
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -476,7 +476,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||
@@ -477,7 +477,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||
public Collection<PotionEffect> getActivePotionEffects() {
|
||||
List<PotionEffect> effects = new ArrayList<PotionEffect>();
|
||||
for (MobEffectInstance handle : this.getHandle().activeEffects.values()) {
|
@ -8,7 +8,7 @@ Adds a new method to fetch the location of a player's bed without generating any
|
||||
getPotentialBedLocation - Gets the last known location of a player's bed. This does not preform any check if the bed is still valid and does not load any chunks.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
index 6a9ab8bab7eb443f83e939bed17cb6fc9d1f3906..4ac714e39804fc8d269a717e8abf98f5814319e8 100644
|
||||
index 03b3e5a49658ea6341cd303b75be36a328907863..9541ebf81c3c2c282c6d04f5e51b309e69d0802e 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
@@ -12,6 +12,7 @@ import net.minecraft.nbt.CompoundTag;
|
||||
@ -19,7 +19,7 @@ index 6a9ab8bab7eb443f83e939bed17cb6fc9d1f3906..4ac714e39804fc8d269a717e8abf98f5
|
||||
import net.minecraft.server.level.ServerPlayer;
|
||||
import net.minecraft.world.MenuProvider;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
@@ -130,6 +131,22 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
||||
@@ -131,6 +132,22 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
||||
return this.getHandle().sleepCounter;
|
||||
}
|
||||
|
@ -10,10 +10,10 @@ Adds a 5 second grace period for any async tasks to finish and warns
|
||||
if any are still running after that delay just as reload does.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index fdaf757cbbc90841747989add56c13f252f645e5..6b7bacb0ea667c488b09da8c2a8a685d3a86608e 100644
|
||||
index e230a6e3810929c2f9ac70a98c9fc41734ec06c2..81d4870060ea418fecfdd01f1357899038c95fe9 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -912,6 +912,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -958,6 +958,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
// CraftBukkit start
|
||||
if (this.server != null) {
|
||||
this.server.disablePlugins();
|
||||
@ -22,10 +22,10 @@ index fdaf757cbbc90841747989add56c13f252f645e5..6b7bacb0ea667c488b09da8c2a8a685d
|
||||
// CraftBukkit end
|
||||
this.getConnection().stop();
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 03ff1e8faec27f042aa9b3b5f5bcbe1abbde2cbd..8d78720a613c089ad1bd2d78b83da8a42b76fc76 100644
|
||||
index 913c1e4ee2df8160e1cd15a352fc71d61e7e38dc..e12b1d7c30d4365130f5761614b095971e047241 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1020,6 +1020,31 @@ public final class CraftServer implements Server {
|
||||
@@ -1015,6 +1015,31 @@ public final class CraftServer implements Server {
|
||||
org.spigotmc.WatchdogThread.hasStarted = true; // Paper - Disable watchdog early timeout on reload
|
||||
}
|
||||
|
@ -13,10 +13,10 @@ A config is provided if you rather let players use these exploits, and let
|
||||
them destroy the worlds End Portals and get on top of the nether easy.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
index c0227cda09b9ca508c1de1fbe1e57afd743a9426..93529defa5d36bb9b4c69eedda9b7ac3d0a189ce 100644
|
||||
index 120151da61398ea8afcd658a8407efcf738b9476..b7cf13fe4a0af243c0e76d75439b28d5018dadb9 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
@@ -169,6 +169,7 @@ public class Explosion {
|
||||
@@ -191,6 +191,7 @@ public class Explosion {
|
||||
for (float f1 = 0.3F; f > 0.0F; f -= 0.22500001F) {
|
||||
BlockPos blockposition = BlockPos.containing(d4, d5, d6);
|
||||
BlockState iblockdata = this.level.getBlockState(blockposition);
|
||||
@ -24,20 +24,11 @@ index c0227cda09b9ca508c1de1fbe1e57afd743a9426..93529defa5d36bb9b4c69eedda9b7ac3
|
||||
FluidState fluid = iblockdata.getFluidState(); // Paper
|
||||
|
||||
if (!this.level.isInWorldBounds(blockposition)) {
|
||||
@@ -371,7 +372,7 @@ public class Explosion {
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
- if (!iblockdata.isAir()) {
|
||||
+ if (!iblockdata.isAir() && iblockdata.isDestroyable()) { // Paper
|
||||
BlockPos blockposition1 = blockposition.immutable();
|
||||
|
||||
this.level.getProfiler().push("explosion_blocks");
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index 046fa6e5b2013c0872176592dd8cc6681a9b308a..7825f6185a9a73dd395cdb6d86947d33d8512200 100644
|
||||
index 7a604d2679c65b15e6d651e65c0475404aee9592..121f82c3e27d0c1e935871ab0e7c994393e73398 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -518,6 +518,10 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -521,6 +521,10 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
public boolean setBlock(BlockPos pos, BlockState state, int flags, int maxUpdateDepth) {
|
||||
// CraftBukkit start - tree generation
|
||||
if (this.captureTreeGeneration) {
|
||||
@ -49,10 +40,10 @@ index 046fa6e5b2013c0872176592dd8cc6681a9b308a..7825f6185a9a73dd395cdb6d86947d33
|
||||
if (blockstate == null) {
|
||||
blockstate = CapturedBlockState.getTreeBlockState(this, pos, flags);
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/Block.java b/src/main/java/net/minecraft/world/level/block/Block.java
|
||||
index 7646b66bc5ba0288608de0d836c7307e02eebe67..36b196c8834c4eb873bfca0b12f1fc2b421ea071 100644
|
||||
index bdf5443d5974d316b9b216291fadae4346a3123f..2c190473b98899e86d8bcd5a81c72bbc0a85b2a9 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/Block.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/Block.java
|
||||
@@ -88,6 +88,19 @@ public class Block extends BlockBehaviour implements ItemLike {
|
||||
@@ -90,6 +90,19 @@ public class Block extends BlockBehaviour implements ItemLike {
|
||||
protected final StateDefinition<Block, BlockState> stateDefinition;
|
||||
private BlockState defaultBlockState;
|
||||
// Paper start
|
||||
@ -73,10 +64,10 @@ index 7646b66bc5ba0288608de0d836c7307e02eebe67..36b196c8834c4eb873bfca0b12f1fc2b
|
||||
public co.aikar.timings.Timing getTiming() {
|
||||
if (timing == null) {
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/piston/PistonBaseBlock.java b/src/main/java/net/minecraft/world/level/block/piston/PistonBaseBlock.java
|
||||
index e4e4ad933db6484589dc2b51ef2f5a6745ffb891..6b0f70907236065bc2769541bf430ccc66df5081 100644
|
||||
index b3732a6246a2b011e36c5c35fa2ac7749e75db16..bb6c38bb7a054b94a63690f6fd6036d6f376dae4 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/piston/PistonBaseBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/piston/PistonBaseBlock.java
|
||||
@@ -199,6 +199,12 @@ public class PistonBaseBlock extends DirectionalBlock {
|
||||
@@ -212,6 +212,12 @@ public class PistonBaseBlock extends DirectionalBlock {
|
||||
@Override
|
||||
public boolean triggerEvent(BlockState state, Level world, BlockPos pos, int type, int data) {
|
||||
Direction enumdirection = (Direction) state.getValue(PistonBaseBlock.FACING);
|
||||
@ -89,7 +80,7 @@ index e4e4ad933db6484589dc2b51ef2f5a6745ffb891..6b0f70907236065bc2769541bf430ccc
|
||||
BlockState iblockdata1 = (BlockState) state.setValue(PistonBaseBlock.EXTENDED, true);
|
||||
|
||||
if (!world.isClientSide) {
|
||||
@@ -232,7 +238,7 @@ public class PistonBaseBlock extends DirectionalBlock {
|
||||
@@ -245,7 +251,7 @@ public class PistonBaseBlock extends DirectionalBlock {
|
||||
BlockState iblockdata2 = (BlockState) ((BlockState) Blocks.MOVING_PISTON.defaultBlockState().setValue(MovingPistonBlock.FACING, enumdirection)).setValue(MovingPistonBlock.TYPE, this.isSticky ? PistonType.STICKY : PistonType.DEFAULT);
|
||||
|
||||
world.setBlock(pos, iblockdata2, 20);
|
||||
@ -98,7 +89,7 @@ index e4e4ad933db6484589dc2b51ef2f5a6745ffb891..6b0f70907236065bc2769541bf430ccc
|
||||
world.blockUpdated(pos, iblockdata2.getBlock());
|
||||
iblockdata2.updateNeighbourShapes(world, pos, 2);
|
||||
if (this.isSticky) {
|
||||
@@ -261,7 +267,14 @@ public class PistonBaseBlock extends DirectionalBlock {
|
||||
@@ -274,7 +280,14 @@ public class PistonBaseBlock extends DirectionalBlock {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@ -115,10 +106,19 @@ index e4e4ad933db6484589dc2b51ef2f5a6745ffb891..6b0f70907236065bc2769541bf430ccc
|
||||
|
||||
world.playSound((Player) null, pos, SoundEvents.PISTON_CONTRACT, SoundSource.BLOCKS, 0.5F, world.random.nextFloat() * 0.15F + 0.6F);
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
|
||||
index 916d7b35145345cb3bf5ca46df38eae0512c4e95..a5942b6683d38f067f8ca1dfbe467b72df242632 100644
|
||||
index b4241ccdf972feec3dc2802ceafeef4f004c62d5..c64213fe3ec0bd34cd1b31ae18eff1fecbcf63d6 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
|
||||
@@ -229,7 +229,7 @@ public abstract class BlockBehaviour implements FeatureElement {
|
||||
@@ -182,7 +182,7 @@ public abstract class BlockBehaviour implements FeatureElement {
|
||||
/** @deprecated */
|
||||
@Deprecated
|
||||
public void onExplosionHit(BlockState state, Level world, BlockPos pos, Explosion explosion, BiConsumer<ItemStack, BlockPos> stackMerger) {
|
||||
- if (!state.isAir() && explosion.getBlockInteraction() != Explosion.BlockInteraction.TRIGGER_BLOCK) {
|
||||
+ if (!state.isAir() && explosion.getBlockInteraction() != Explosion.BlockInteraction.TRIGGER_BLOCK && state.isDestroyable()) { // Paper
|
||||
Block block = state.getBlock();
|
||||
boolean flag = explosion.getIndirectSourceEntity() instanceof Player;
|
||||
|
||||
@@ -278,7 +278,7 @@ public abstract class BlockBehaviour implements FeatureElement {
|
||||
/** @deprecated */
|
||||
@Deprecated
|
||||
public boolean canBeReplaced(BlockState state, BlockPlaceContext context) {
|
||||
@ -127,7 +127,7 @@ index 916d7b35145345cb3bf5ca46df38eae0512c4e95..a5942b6683d38f067f8ca1dfbe467b72
|
||||
}
|
||||
|
||||
/** @deprecated */
|
||||
@@ -891,6 +891,12 @@ public abstract class BlockBehaviour implements FeatureElement {
|
||||
@@ -958,6 +958,12 @@ public abstract class BlockBehaviour implements FeatureElement {
|
||||
return this.legacySolid;
|
||||
}
|
||||
|
||||
@ -140,7 +140,7 @@ index 916d7b35145345cb3bf5ca46df38eae0512c4e95..a5942b6683d38f067f8ca1dfbe467b72
|
||||
public boolean isValidSpawn(BlockGetter world, BlockPos pos, EntityType<?> type) {
|
||||
return this.getBlock().properties.isValidSpawn.test(this.asState(), world, pos, type);
|
||||
}
|
||||
@@ -994,7 +1000,7 @@ public abstract class BlockBehaviour implements FeatureElement {
|
||||
@@ -1061,7 +1067,7 @@ public abstract class BlockBehaviour implements FeatureElement {
|
||||
}
|
||||
|
||||
public PushReaction getPistonPushReaction() {
|
@ -15,7 +15,7 @@ Previously maps would load all chunks in a certain radius depending on
|
||||
five ticks that movement occur in anyways.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/item/MapItem.java b/src/main/java/net/minecraft/world/item/MapItem.java
|
||||
index 592bdf191f8787cf35d8844f66371c92179545ad..709928f6220c2148f95afa94c34df2a87cff0e1f 100644
|
||||
index 6b6132943123c209b4cb49c5aadd913f2a16837c..0e2aef26fb89a435da4907a530507a86c6caa746 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/MapItem.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/MapItem.java
|
||||
@@ -134,9 +134,9 @@ public class MapItem extends ComplexItem {
|
@ -6,7 +6,7 @@ Subject: [PATCH] Use seed based lookup for Treasure Maps - Fixes lag from
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/item/MapItem.java b/src/main/java/net/minecraft/world/item/MapItem.java
|
||||
index 709928f6220c2148f95afa94c34df2a87cff0e1f..53515854d05a0c27a65f71193424236a21b11f5f 100644
|
||||
index 0e2aef26fb89a435da4907a530507a86c6caa746..b27a464cecb0efc2656d85e3c546f262e79de9a4 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/MapItem.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/MapItem.java
|
||||
@@ -250,14 +250,13 @@ public class MapItem extends ComplexItem {
|
@ -32,10 +32,10 @@ This patch fixes https://bugs.mojang.com/browse/MC-188840
|
||||
This patch also fixes rail duping and carpet duping.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/piston/PistonBaseBlock.java b/src/main/java/net/minecraft/world/level/block/piston/PistonBaseBlock.java
|
||||
index 6b0f70907236065bc2769541bf430ccc66df5081..929241e479a42011f073fb9d144739b6504132b1 100644
|
||||
index bb6c38bb7a054b94a63690f6fd6036d6f376dae4..565da027ca7c395f9b965505cbe9e85e62367834 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/piston/PistonBaseBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/piston/PistonBaseBlock.java
|
||||
@@ -413,14 +413,26 @@ public class PistonBaseBlock extends DirectionalBlock {
|
||||
@@ -426,14 +426,26 @@ public class PistonBaseBlock extends DirectionalBlock {
|
||||
}
|
||||
|
||||
for (j = list.size() - 1; j >= 0; --j) {
|
@ -7,7 +7,7 @@ If the falling block dies during teleportation (entity#move), then we need
|
||||
to detect that by placing a check after the move.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||
index c431ba283c31cf9bb7bfdb05dc8c181c9e1e0eb3..5164c2bfb32275beff01b6e76dfbd9d031231bc6 100644
|
||||
index 9be45ff8139c9d385c1deb1200e3718ed3add801..fc33d05cf1a3cceb220dab1ee1da33ffe37834db 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||
@@ -131,6 +131,11 @@ public class FallingBlockEntity extends Entity {
|
@ -14,10 +14,10 @@ behaviour, we need to move all of this dangerous logic outside
|
||||
of the move call and into an appropriate place in the tick method.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index c251202cb6b69b4dfa46b6836c6da1664f533738..3f9f2e4b64df72f3f01aed191d57766978c5886c 100644
|
||||
index e152c3ac26ad37e547e196331802e30f4839632a..fd9f05c51e4a475d2bc8b2c39b0811d053f03dbe 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1341,6 +1341,11 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -1368,6 +1368,11 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
|
||||
this.player.move(MoverType.PLAYER, new Vec3(d6, d7, d8));
|
||||
this.player.onGround = packet.isOnGround(); // CraftBukkit - SPIGOT-5810, SPIGOT-5835, SPIGOT-6828: reset by this.player.move
|
@ -5,10 +5,10 @@ Subject: [PATCH] Inventory getHolder method without block snapshot
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java
|
||||
index c064022d248ff3e0b52c0e815ab90527f9132fb7..3680f101036d98814fe47b707baeeb8e55bfc4b7 100644
|
||||
index 75eb794f796b31c0c5ef80a6d27a56711a522f5e..e824fe361286a5f41b137be92d799eef54ae4b87 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java
|
||||
@@ -538,6 +538,13 @@ public class CraftInventory implements Inventory {
|
||||
@@ -543,6 +543,13 @@ public class CraftInventory implements Inventory {
|
||||
return this.inventory.getOwner();
|
||||
}
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add and implement PlayerRecipeBookClickEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 3f9f2e4b64df72f3f01aed191d57766978c5886c..292a80afecb7a67e5e5900578867612d91ca82a5 100644
|
||||
index fd9f05c51e4a475d2bc8b2c39b0811d053f03dbe..4041e3543c65d42920aafe2fed4de410d7d43198 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2959,16 +2959,40 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -2967,16 +2967,40 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
if (!this.player.containerMenu.stillValid(this.player)) {
|
||||
ServerGamePacketListenerImpl.LOGGER.debug("Player {} interacted with invalid menu {}", this.player, this.player.containerMenu);
|
||||
} else {
|
@ -236,7 +236,7 @@ index 8d12a6da0f0679fd14c2a498f9645bd04b2d8ed7..290a231deb203eb46cb91eb23c28d8e9
|
||||
return object instanceof ChunkMap.TrackedEntity ? ((ChunkMap.TrackedEntity) object).entity.getId() == this.entity.getId() : false;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 8ecb398ca26753e602c2862bf0c35b76f9a413c0..082509d2ab18380b37868decef3fdff6542bf764 100644
|
||||
index b3d50a16748a295aa952c22e90708ea33a7af992..1ad820b4954f11d2bab92708eb0c44739317603e 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -56,6 +56,7 @@ import net.minecraft.network.syncher.EntityDataSerializers;
|
||||
@ -247,7 +247,7 @@ index 8ecb398ca26753e602c2862bf0c35b76f9a413c0..082509d2ab18380b37868decef3fdff6
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
import net.minecraft.server.level.ServerPlayer;
|
||||
@@ -481,6 +482,38 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -486,6 +487,38 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
|
||||
public boolean updatingSectionStatus = false;
|
||||
// Paper end
|
@ -9,10 +9,10 @@ on harddrives.
|
||||
-DPaper.enable-sync-chunk-writes=true to enable
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java
|
||||
index bdf520c32847658fefaf2bde33bac16ea807002f..c5598adb8cbcbcf7277c2fd4dd72c243d44d9700 100644
|
||||
index 7edce6f8d1f313a9e1e100704d625e317f779fa0..1643186bcb2caf5d29fd551afd35830726dbb80a 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java
|
||||
@@ -145,7 +145,7 @@ public class DedicatedServerProperties extends Settings<DedicatedServerPropertie
|
||||
@@ -144,7 +144,7 @@ public class DedicatedServerProperties extends Settings<DedicatedServerPropertie
|
||||
this.maxWorldSize = this.get("max-world-size", (integer) -> {
|
||||
return Mth.clamp(integer, 1, 29999984);
|
||||
}, 29999984);
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add permission for command blocks
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
index 0ff4372afa4b159acc59e3dbd2e9efbd7b7ab6a2..1685dd08ef6331e133d752cd9ce3874c9eda5a05 100644
|
||||
index b7e6d8441e8444c36919c126a8adeaeed02df08c..a9ede0d719e866655ab48fb5d0263c7d1bdcff60 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
@@ -399,7 +399,7 @@ public class ServerPlayerGameMode {
|
||||
@ -18,10 +18,10 @@ index 0ff4372afa4b159acc59e3dbd2e9efbd7b7ab6a2..1685dd08ef6331e133d752cd9ce3874c
|
||||
return false;
|
||||
} else if (this.player.blockActionRestricted(this.level, pos, this.gameModeForPlayer)) {
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 292a80afecb7a67e5e5900578867612d91ca82a5..6add371484deca6ed041e434fea5dc54c8db12d9 100644
|
||||
index 4041e3543c65d42920aafe2fed4de410d7d43198..bb457858e3f4d335ca5eb0c2a51b9a3b456a0b1f 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -778,7 +778,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -781,7 +781,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel());
|
||||
if (!this.server.isCommandBlockEnabled()) {
|
||||
this.player.sendSystemMessage(Component.translatable("advMode.notEnabled"));
|
||||
@ -30,7 +30,7 @@ index 292a80afecb7a67e5e5900578867612d91ca82a5..6add371484deca6ed041e434fea5dc54
|
||||
this.player.sendSystemMessage(Component.translatable("advMode.notAllowed"));
|
||||
} else {
|
||||
BaseCommandBlock commandblocklistenerabstract = null;
|
||||
@@ -845,7 +845,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -848,7 +848,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel());
|
||||
if (!this.server.isCommandBlockEnabled()) {
|
||||
this.player.sendSystemMessage(Component.translatable("advMode.notEnabled"));
|
||||
@ -40,7 +40,7 @@ index 292a80afecb7a67e5e5900578867612d91ca82a5..6add371484deca6ed041e434fea5dc54
|
||||
} else {
|
||||
BaseCommandBlock commandblocklistenerabstract = packet.getCommandBlock(this.player.level());
|
||||
diff --git a/src/main/java/net/minecraft/world/level/BaseCommandBlock.java b/src/main/java/net/minecraft/world/level/BaseCommandBlock.java
|
||||
index 9c7b7434ccd64668eb5d7bb61d03a9cb4105ea6e..e05eb08a9c229b371887676da510df948b896a85 100644
|
||||
index ac0aeb53176069d0835b6b08c8d871edae846763..c56f5173fda6b38c2dcaea196217f2f5a7d7c641 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/BaseCommandBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/BaseCommandBlock.java
|
||||
@@ -198,7 +198,7 @@ public abstract class BaseCommandBlock implements CommandSource {
|
||||
@ -53,10 +53,10 @@ index 9c7b7434ccd64668eb5d7bb61d03a9cb4105ea6e..e05eb08a9c229b371887676da510df94
|
||||
} else {
|
||||
if (player.getCommandSenderWorld().isClientSide) {
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/CommandBlock.java b/src/main/java/net/minecraft/world/level/block/CommandBlock.java
|
||||
index 061a56e3828767cd6576d5a9edde5f3498e609d0..2e7c03b00bc941b86df6a7f1b2b188c9f0aede22 100644
|
||||
index 840226771819024de2c6e84f08f6e354e96474ba..7ef14e4441a329c680a5dfe4bfb5033ffcb8f9d5 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/CommandBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/CommandBlock.java
|
||||
@@ -130,7 +130,7 @@ public class CommandBlock extends BaseEntityBlock implements GameMasterBlock {
|
||||
@@ -143,7 +143,7 @@ public class CommandBlock extends BaseEntityBlock implements GameMasterBlock {
|
||||
public InteractionResult use(BlockState state, Level world, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hit) {
|
||||
BlockEntity tileentity = world.getBlockEntity(pos);
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Ensure Entity AABB's are never invalid
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 082509d2ab18380b37868decef3fdff6542bf764..78af47c54f8dd3b1b4f81b740bcd438132c27947 100644
|
||||
index 1ad820b4954f11d2bab92708eb0c44739317603e..76a1803f806d3bf1a54dae15d8155d6a0920cf07 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -721,8 +721,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -726,8 +726,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
}
|
||||
|
||||
public void setPos(double x, double y, double z) {
|
||||
@ -19,7 +19,7 @@ index 082509d2ab18380b37868decef3fdff6542bf764..78af47c54f8dd3b1b4f81b740bcd4381
|
||||
}
|
||||
|
||||
protected AABB makeBoundingBox() {
|
||||
@@ -4202,6 +4202,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -4244,6 +4244,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
}
|
||||
|
||||
public final void setPosRaw(double x, double y, double z) {
|
||||
@ -31,7 +31,7 @@ index 082509d2ab18380b37868decef3fdff6542bf764..78af47c54f8dd3b1b4f81b740bcd4381
|
||||
// Paper start - rewrite chunk system
|
||||
if (this.updatingSectionStatus) {
|
||||
LOGGER.error("Refusing to update position for entity " + this + " to position " + new Vec3(x, y, z) + " since it is processing a section status update", new Throwable());
|
||||
@@ -4225,6 +4230,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -4267,6 +4272,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
this.levelCallback.onMove();
|
||||
}
|
||||
|
@ -8,10 +8,10 @@ makes it so that the server keeps the last difficulty used instead
|
||||
of restoring the server.properties every single load.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 6b7bacb0ea667c488b09da8c2a8a685d3a86608e..219e191ff4d590aee9b7a704ba6fe84c3c12f43a 100644
|
||||
index 81d4870060ea418fecfdd01f1357899038c95fe9..87e0cc467a2139e763130a375387b6df46336992 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -782,7 +782,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -828,7 +828,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
if (worldserver.getWorld().getKeepSpawnInMemory()) worldloadlistener.stop(); // Paper
|
||||
// CraftBukkit start
|
||||
// this.updateMobSpawningFlags();
|
||||
@ -20,7 +20,7 @@ index 6b7bacb0ea667c488b09da8c2a8a685d3a86608e..219e191ff4d590aee9b7a704ba6fe84c
|
||||
|
||||
this.forceTicks = false;
|
||||
// CraftBukkit end
|
||||
@@ -1726,11 +1726,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1828,11 +1828,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
}
|
||||
|
||||
@ -40,7 +40,7 @@ index 6b7bacb0ea667c488b09da8c2a8a685d3a86608e..219e191ff4d590aee9b7a704ba6fe84c
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1744,7 +1747,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1846,7 +1849,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
while (iterator.hasNext()) {
|
||||
ServerLevel worldserver = (ServerLevel) iterator.next();
|
||||
|
||||
@ -50,7 +50,7 @@ index 6b7bacb0ea667c488b09da8c2a8a685d3a86608e..219e191ff4d590aee9b7a704ba6fe84c
|
||||
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/commands/DifficultyCommand.java b/src/main/java/net/minecraft/server/commands/DifficultyCommand.java
|
||||
index 89be3991ef4fb2deb7276c5409cb571a7fb1f821..9c272f7cf8cbd2bbe147e57f7fabe135b6ff5c0b 100644
|
||||
index 997a96a21440ae72696d68f8031ece4ba487d3ef..d0f851ca4d91791da26902d7d516b0fdace8cc95 100644
|
||||
--- a/src/main/java/net/minecraft/server/commands/DifficultyCommand.java
|
||||
+++ b/src/main/java/net/minecraft/server/commands/DifficultyCommand.java
|
||||
@@ -49,7 +49,7 @@ public class DifficultyCommand {
|
||||
@ -63,7 +63,7 @@ index 89be3991ef4fb2deb7276c5409cb571a7fb1f821..9c272f7cf8cbd2bbe147e57f7fabe135
|
||||
return Component.translatable("commands.difficulty.success", difficulty.getDisplayName());
|
||||
}, true);
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index 557fc4e380c00bc2ca34381b36eb3d6a38177209..9e631002278e21f1e0a3989573e7d5b2e1a82dd8 100644
|
||||
index 7f5ecea0ee78a534d7c56fa9e3ad2117b5192c0a..ac918da8234553e4d88664b240feddc1fea8bd6b 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -325,7 +325,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@ -76,10 +76,10 @@ index 557fc4e380c00bc2ca34381b36eb3d6a38177209..9e631002278e21f1e0a3989573e7d5b2
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 49d341605ac7e82c5dcdcc960b6581aa7e1fb8f3..a3c1797549e3b149f425f857bbf8564c5ef1e30e 100644
|
||||
index b2e980c1f2e2ec417f75fbd7bdd2188fdb4eba23..898403dad5e9bac4b565e1c75871245fe5cd7908 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -1204,7 +1204,7 @@ public class ServerPlayer extends Player {
|
||||
@@ -1208,7 +1208,7 @@ public class ServerPlayer extends Player {
|
||||
this.isChangingDimension = true; // CraftBukkit - Set teleport invulnerability only if player changing worlds
|
||||
|
||||
this.connection.send(new ClientboundRespawnPacket(this.createCommonSpawnInfo(worldserver), (byte) 3));
|
||||
@ -89,10 +89,10 @@ index 49d341605ac7e82c5dcdcc960b6581aa7e1fb8f3..a3c1797549e3b149f425f857bbf8564c
|
||||
|
||||
playerlist.sendPlayerPermissionLevel(this);
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 6add371484deca6ed041e434fea5dc54c8db12d9..0080136d9aaead083fd1d94d2f7a0df250e3d9d8 100644
|
||||
index bb457858e3f4d335ca5eb0c2a51b9a3b456a0b1f..110456e28adeeef790940b9281801d9926244b37 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -3162,7 +3162,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -3170,7 +3170,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
public void handleChangeDifficulty(ServerboundChangeDifficultyPacket packet) {
|
||||
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel());
|
||||
if (this.player.hasPermissions(2) || this.isSingleplayerOwner()) {
|
||||
@ -102,10 +102,10 @@ index 6add371484deca6ed041e434fea5dc54c8db12d9..0080136d9aaead083fd1d94d2f7a0df2
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 8d78720a613c089ad1bd2d78b83da8a42b76fc76..2ac9b9001f60e2b4c2b660cc104387e49141bcf5 100644
|
||||
index e12b1d7c30d4365130f5761614b095971e047241..d7a9673e7f07f5bc6739fe814fa2f9205c764b06 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -959,8 +959,8 @@ public final class CraftServer implements Server {
|
||||
@@ -954,8 +954,8 @@ public final class CraftServer implements Server {
|
||||
org.spigotmc.SpigotConfig.init((File) this.console.options.valueOf("spigot-settings")); // Spigot
|
||||
this.console.paperConfigurations.reloadConfigs(this.console);
|
||||
for (ServerLevel world : this.console.getAllLevels()) {
|
||||
@ -117,10 +117,10 @@ index 8d78720a613c089ad1bd2d78b83da8a42b76fc76..2ac9b9001f60e2b4c2b660cc104387e4
|
||||
for (SpawnCategory spawnCategory : SpawnCategory.values()) {
|
||||
if (CraftSpawnCategory.isValidForLimits(spawnCategory)) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 2d9a298e6f364d7ea6fec689833a72b58aba3c17..5fc0c6652f2dff1b41bb447407a1780bd609c6bb 100644
|
||||
index fcf2571a7aa9e93a82171d4a8ae8c11ee7452994..b57554333fd90da1f1ebc006cb1d0ebbfca9a499 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -1153,7 +1153,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -1159,7 +1159,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
|
||||
@Override
|
||||
public void setDifficulty(Difficulty difficulty) {
|
@ -7,10 +7,10 @@ Don't constantly send format: false for all formatting options when parent alrea
|
||||
has it false
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java b/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java
|
||||
index 19a102792fab30f8f6a7364d0a9b4063d76f1489..7c36d2bd36926c0ae5a0db6a97bd47a85566cf26 100644
|
||||
index 516b3fef4d388366df09f0dd88deadbcc0b7d344..730d8e3cf2d9ca05b2d6219cf1856b8721871a37 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java
|
||||
@@ -47,6 +47,7 @@ public final class CraftChatMessage {
|
||||
@@ -46,6 +46,7 @@ public final class CraftChatMessage {
|
||||
// Separate pattern with no group 3, new lines are part of previous string
|
||||
private static final Pattern INCREMENTAL_PATTERN_KEEP_NEWLINES = Pattern.compile("(" + String.valueOf(org.bukkit.ChatColor.COLOR_CHAR) + "[0-9a-fk-orx])|((?:(?:https?):\\/\\/)?(?:[-\\w_\\.]{2,}\\.[a-z]{2,4}.*?(?=[\\.\\?!,;:]?(?:[" + String.valueOf(org.bukkit.ChatColor.COLOR_CHAR) + " ]|$))))", Pattern.CASE_INSENSITIVE);
|
||||
// ChatColor.b does not explicitly reset, its more of empty
|
||||
@ -18,7 +18,7 @@ index 19a102792fab30f8f6a7364d0a9b4063d76f1489..7c36d2bd36926c0ae5a0db6a97bd47a8
|
||||
private static final Style RESET = Style.EMPTY.withBold(false).withItalic(false).withUnderlined(false).withStrikethrough(false).withObfuscated(false);
|
||||
|
||||
private final List<Component> list = new ArrayList<Component>();
|
||||
@@ -68,6 +69,7 @@ public final class CraftChatMessage {
|
||||
@@ -67,6 +68,7 @@ public final class CraftChatMessage {
|
||||
Matcher matcher = (keepNewlines ? StringMessage.INCREMENTAL_PATTERN_KEEP_NEWLINES : StringMessage.INCREMENTAL_PATTERN).matcher(message);
|
||||
String match = null;
|
||||
boolean needsAdd = false;
|
||||
@ -26,7 +26,7 @@ index 19a102792fab30f8f6a7364d0a9b4063d76f1489..7c36d2bd36926c0ae5a0db6a97bd47a8
|
||||
while (matcher.find()) {
|
||||
int groupId = 0;
|
||||
while ((match = matcher.group(++groupId)) == null) {
|
||||
@@ -113,7 +115,26 @@ public final class CraftChatMessage {
|
||||
@@ -112,7 +114,26 @@ public final class CraftChatMessage {
|
||||
throw new AssertionError("Unexpected message format");
|
||||
}
|
||||
} else { // Color resets formatting
|
@ -22,10 +22,10 @@ wants it to collect even faster, they can restore that setting back to 1 instead
|
||||
Not adding it to .getType() though to keep behavior consistent with vanilla for performance reasons.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 2ac9b9001f60e2b4c2b660cc104387e49141bcf5..c71a409a457deea6817b863ddbb8bcbf64206544 100644
|
||||
index d7a9673e7f07f5bc6739fe814fa2f9205c764b06..d355b46f23201163b70995a883994fcea1ac1689 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -386,7 +386,7 @@ public final class CraftServer implements Server {
|
||||
@@ -381,7 +381,7 @@ public final class CraftServer implements Server {
|
||||
this.overrideSpawnLimits();
|
||||
console.autosavePeriod = this.configuration.getInt("ticks-per.autosave");
|
||||
this.warningState = WarningState.value(this.configuration.getString("settings.deprecated-verbose"));
|
||||
@ -34,7 +34,7 @@ index 2ac9b9001f60e2b4c2b660cc104387e49141bcf5..c71a409a457deea6817b863ddbb8bcbf
|
||||
this.minimumAPI = this.configuration.getString("settings.minimum-api");
|
||||
this.loadIcon();
|
||||
|
||||
@@ -939,7 +939,7 @@ public final class CraftServer implements Server {
|
||||
@@ -934,7 +934,7 @@ public final class CraftServer implements Server {
|
||||
this.console.setMotd(config.motd);
|
||||
this.overrideSpawnLimits();
|
||||
this.warningState = WarningState.value(this.configuration.getString("settings.deprecated-verbose"));
|
||||
@ -44,10 +44,10 @@ index 2ac9b9001f60e2b4c2b660cc104387e49141bcf5..c71a409a457deea6817b863ddbb8bcbf
|
||||
this.printSaveWarning = false;
|
||||
this.console.autosavePeriod = this.configuration.getInt("ticks-per.autosave");
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 5fc0c6652f2dff1b41bb447407a1780bd609c6bb..8306f8cce689260111fbf88b31515440a44d3a8c 100644
|
||||
index b57554333fd90da1f1ebc006cb1d0ebbfca9a499..2d90be2537faf281adc50f856daf3b4e8b842568 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -282,7 +282,13 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -283,7 +283,13 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
|
||||
@Override
|
||||
public Chunk getChunkAt(int x, int z) {
|
||||
@ -62,7 +62,7 @@ index 5fc0c6652f2dff1b41bb447407a1780bd609c6bb..8306f8cce689260111fbf88b31515440
|
||||
return new CraftChunk(chunk);
|
||||
}
|
||||
|
||||
@@ -296,6 +302,12 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -297,6 +303,12 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
return new CraftChunk(this.getHandle(), x, z);
|
||||
}
|
||||
|
||||
@ -75,7 +75,7 @@ index 5fc0c6652f2dff1b41bb447407a1780bd609c6bb..8306f8cce689260111fbf88b31515440
|
||||
@Override
|
||||
public Chunk getChunkAt(Block block) {
|
||||
Preconditions.checkArgument(block != null, "null block");
|
||||
@@ -361,7 +373,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -362,7 +374,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
public boolean unloadChunkRequest(int x, int z) {
|
||||
org.spigotmc.AsyncCatcher.catchOp("chunk unload"); // Spigot
|
||||
if (this.isChunkLoaded(x, z)) {
|
||||
@ -84,7 +84,7 @@ index 5fc0c6652f2dff1b41bb447407a1780bd609c6bb..8306f8cce689260111fbf88b31515440
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -447,9 +459,12 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -448,9 +460,12 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
org.spigotmc.AsyncCatcher.catchOp("chunk load"); // Spigot
|
||||
// Paper start - Optimize this method
|
||||
ChunkPos chunkPos = new ChunkPos(x, z);
|
||||
@ -98,7 +98,7 @@ index 5fc0c6652f2dff1b41bb447407a1780bd609c6bb..8306f8cce689260111fbf88b31515440
|
||||
if (immediate == null) {
|
||||
immediate = world.getChunkSource().chunkMap.getUnloadingChunk(x, z);
|
||||
}
|
||||
@@ -457,7 +472,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -458,7 +473,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
if (!(immediate instanceof ImposterProtoChunk) && !(immediate instanceof net.minecraft.world.level.chunk.LevelChunk)) {
|
||||
return false; // not full status
|
||||
}
|
||||
@ -107,7 +107,7 @@ index 5fc0c6652f2dff1b41bb447407a1780bd609c6bb..8306f8cce689260111fbf88b31515440
|
||||
world.getChunk(x, z); // make sure we're at ticket level 32 or lower
|
||||
return true;
|
||||
}
|
||||
@@ -483,7 +498,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -484,7 +499,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
// we do this so we do not re-read the chunk data on disk
|
||||
}
|
||||
|
||||
@ -116,7 +116,7 @@ index 5fc0c6652f2dff1b41bb447407a1780bd609c6bb..8306f8cce689260111fbf88b31515440
|
||||
world.getChunkSource().getChunk(x, z, ChunkStatus.FULL, true);
|
||||
return true;
|
||||
// Paper end
|
||||
@@ -2263,6 +2278,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -2269,6 +2284,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
io.papermc.paper.chunk.system.ChunkSystem.scheduleChunkLoad(this.getHandle(), x, z, gen, ChunkStatus.FULL, true, priority, (c) -> {
|
||||
net.minecraft.server.MinecraftServer.getServer().scheduleOnMain(() -> {
|
||||
net.minecraft.world.level.chunk.LevelChunk chunk = (net.minecraft.world.level.chunk.LevelChunk)c;
|
@ -1,18 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Shane Freeder <theboyetronic@gmail.com>
|
||||
Date: Sat, 7 Mar 2020 00:07:51 +0000
|
||||
Subject: [PATCH] Validate tripwire hook placement before update
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/TripWireHookBlock.java b/src/main/java/net/minecraft/world/level/block/TripWireHookBlock.java
|
||||
index a5f8c7d9d9998eebce7f15e01c157651b9831516..4a516828e5c6abd63511ee7c93fcff11203cf8d0 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/TripWireHookBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/TripWireHookBlock.java
|
||||
@@ -175,6 +175,7 @@ public class TripWireHookBlock extends Block {
|
||||
|
||||
this.emitState(world, pos, flag4, flag5, flag2, flag3);
|
||||
if (!beingRemoved) {
|
||||
+ if (world.getBlockState(pos).getBlock() == Blocks.TRIPWIRE_HOOK) // Paper - validate
|
||||
world.setBlock(pos, (BlockState) iblockdata3.setValue(TripWireHookBlock.FACING, enumdirection), 3);
|
||||
if (flag1) {
|
||||
this.notifyNeighbors(world, pos, enumdirection);
|
Loading…
Reference in New Issue
Block a user