mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-22 00:47:38 +01:00
more more work (757)
This commit is contained in:
parent
71ae391eb3
commit
22227ccf26
@ -7,71 +7,70 @@ Also don't fire level events or game events if stalactite
|
||||
drip is cancelled
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/core/cauldron/CauldronInteraction.java b/src/main/java/net/minecraft/core/cauldron/CauldronInteraction.java
|
||||
index 4c9334dde0734a3550a810845cee53f474e9c96b..50fd3e43b4971cd72efd1f609f0cdc4b0f57bed4 100644
|
||||
index 6de21246693afd20fce867e6c2480f912e1b639a..50e9643c88252d6afbcea1763cc3f7063f0d35b4 100644
|
||||
--- a/src/main/java/net/minecraft/core/cauldron/CauldronInteraction.java
|
||||
+++ b/src/main/java/net/minecraft/core/cauldron/CauldronInteraction.java
|
||||
@@ -80,7 +80,7 @@ public interface CauldronInteraction {
|
||||
} else {
|
||||
@@ -81,7 +81,7 @@ public interface CauldronInteraction {
|
||||
if (potioncontents != null && potioncontents.is(Potions.WATER)) {
|
||||
if (!world.isClientSide) {
|
||||
// CraftBukkit start
|
||||
- if (!LayeredCauldronBlock.changeLevel(iblockdata, world, blockposition, Blocks.WATER_CAULDRON.defaultBlockState(), entityhuman, CauldronLevelChangeEvent.ChangeReason.BOTTLE_EMPTY)) {
|
||||
+ if (!LayeredCauldronBlock.changeLevel(iblockdata, world, blockposition, Blocks.WATER_CAULDRON.defaultBlockState(), entityhuman, CauldronLevelChangeEvent.ChangeReason.BOTTLE_EMPTY, false)) { // Paper - Call CauldronLevelChangeEvent
|
||||
return InteractionResult.SUCCESS;
|
||||
return ItemInteractionResult.SUCCESS;
|
||||
}
|
||||
// CraftBukkit end
|
||||
@@ -128,7 +128,7 @@ public interface CauldronInteraction {
|
||||
if ((Integer) iblockdata.getValue(LayeredCauldronBlock.LEVEL) != 3 && PotionUtils.getPotion(itemstack) == Potions.WATER) {
|
||||
if (!world.isClientSide) {
|
||||
// CraftBukkit start
|
||||
- if (!LayeredCauldronBlock.changeLevel(iblockdata, world, blockposition, iblockdata.cycle(LayeredCauldronBlock.LEVEL), entityhuman, CauldronLevelChangeEvent.ChangeReason.BOTTLE_EMPTY)) {
|
||||
+ if (!LayeredCauldronBlock.changeLevel(iblockdata, world, blockposition, iblockdata.cycle(LayeredCauldronBlock.LEVEL), entityhuman, CauldronLevelChangeEvent.ChangeReason.BOTTLE_EMPTY, false)) { // Paper - Call CauldronLevelChangeEvent
|
||||
return InteractionResult.SUCCESS;
|
||||
}
|
||||
// CraftBukkit end
|
||||
@@ -212,7 +212,7 @@ public interface CauldronInteraction {
|
||||
@@ -136,7 +136,7 @@ public interface CauldronInteraction {
|
||||
if (potioncontents != null && potioncontents.is(Potions.WATER)) {
|
||||
if (!world.isClientSide) {
|
||||
// CraftBukkit start
|
||||
- if (!LayeredCauldronBlock.changeLevel(iblockdata, world, blockposition, iblockdata.cycle(LayeredCauldronBlock.LEVEL), entityhuman, CauldronLevelChangeEvent.ChangeReason.BOTTLE_EMPTY)) {
|
||||
+ if (!LayeredCauldronBlock.changeLevel(iblockdata, world, blockposition, iblockdata.cycle(LayeredCauldronBlock.LEVEL), entityhuman, CauldronLevelChangeEvent.ChangeReason.BOTTLE_EMPTY, false)) { // Paper - Call CauldronLevelChangeEvent
|
||||
return ItemInteractionResult.SUCCESS;
|
||||
}
|
||||
// CraftBukkit end
|
||||
@@ -222,7 +222,7 @@ public interface CauldronInteraction {
|
||||
} else {
|
||||
if (!world.isClientSide) {
|
||||
// CraftBukkit start
|
||||
- if (!LayeredCauldronBlock.changeLevel(state, world, pos, Blocks.CAULDRON.defaultBlockState(), player, CauldronLevelChangeEvent.ChangeReason.BUCKET_FILL)) {
|
||||
+ if (!LayeredCauldronBlock.changeLevel(state, world, pos, Blocks.CAULDRON.defaultBlockState(), player, CauldronLevelChangeEvent.ChangeReason.BUCKET_FILL, false)) { // Paper - Call CauldronLevelChangeEvent
|
||||
return InteractionResult.SUCCESS;
|
||||
return ItemInteractionResult.SUCCESS;
|
||||
}
|
||||
// CraftBukkit end
|
||||
@@ -233,7 +233,7 @@ public interface CauldronInteraction {
|
||||
static InteractionResult emptyBucket(Level world, BlockPos pos, Player player, InteractionHand hand, ItemStack stack, BlockState state, SoundEvent soundEvent) {
|
||||
@@ -243,7 +243,7 @@ public interface CauldronInteraction {
|
||||
static ItemInteractionResult emptyBucket(Level world, BlockPos pos, Player player, InteractionHand hand, ItemStack stack, BlockState state, SoundEvent soundEvent) {
|
||||
if (!world.isClientSide) {
|
||||
// CraftBukkit start
|
||||
- if (!LayeredCauldronBlock.changeLevel(state, world, pos, state, player, CauldronLevelChangeEvent.ChangeReason.BUCKET_EMPTY)) {
|
||||
+ if (!LayeredCauldronBlock.changeLevel(state, world, pos, state, player, CauldronLevelChangeEvent.ChangeReason.BUCKET_EMPTY, false)) { // Paper - Call CauldronLevelChangeEvent
|
||||
return InteractionResult.SUCCESS;
|
||||
return ItemInteractionResult.SUCCESS;
|
||||
}
|
||||
// CraftBukkit end
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/CauldronBlock.java b/src/main/java/net/minecraft/world/level/block/CauldronBlock.java
|
||||
index 588b3e911d9b22dad2928ea9e32e8a8a3a8e9b96..47b6b83842201620bd6620f5acf11bb14334e35d 100644
|
||||
index 8d5ad9848d9652b4fd7179c425c47a683ee169ef..c9968934f4ecaa8d81e545f279b3001c7b1ce545 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/CauldronBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/CauldronBlock.java
|
||||
@@ -43,10 +43,18 @@ public class CauldronBlock extends AbstractCauldronBlock {
|
||||
@@ -44,9 +44,19 @@ public class CauldronBlock extends AbstractCauldronBlock {
|
||||
public void handlePrecipitation(BlockState state, Level world, BlockPos pos, Biome.Precipitation precipitation) {
|
||||
if (CauldronBlock.shouldHandlePrecipitation(world, precipitation)) {
|
||||
if (precipitation == Biome.Precipitation.RAIN) {
|
||||
- world.setBlockAndUpdate(pos, Blocks.WATER_CAULDRON.defaultBlockState());
|
||||
+ // Paper start - Call CauldronLevelChangeEvent
|
||||
+ if (!LayeredCauldronBlock.changeLevel(state, world, pos, Blocks.WATER_CAULDRON.defaultBlockState(), null, CauldronLevelChangeEvent.ChangeReason.NATURAL_FILL, false)) { // avoid duplicate game event
|
||||
+ return;
|
||||
+ }
|
||||
+ // Paper end - Call CauldronLevelChangeEvent
|
||||
world.gameEvent((Entity) null, GameEvent.BLOCK_CHANGE, pos);
|
||||
world.setBlockAndUpdate(pos, Blocks.WATER_CAULDRON.defaultBlockState());
|
||||
world.gameEvent((Entity) null, (Holder) GameEvent.BLOCK_CHANGE, pos);
|
||||
} else if (precipitation == Biome.Precipitation.SNOW) {
|
||||
- world.setBlockAndUpdate(pos, Blocks.POWDER_SNOW_CAULDRON.defaultBlockState());
|
||||
+ // Paper start - Call CauldronLevelChangeEvent
|
||||
+ if (!LayeredCauldronBlock.changeLevel(state, world, pos, Blocks.POWDER_SNOW_CAULDRON.defaultBlockState(), null, CauldronLevelChangeEvent.ChangeReason.NATURAL_FILL, false)) { // avoid duplicate game event
|
||||
+ return;
|
||||
+ }
|
||||
+ // Paper end - Call CauldronLevelChangeEvent
|
||||
world.gameEvent((Entity) null, GameEvent.BLOCK_CHANGE, pos);
|
||||
world.setBlockAndUpdate(pos, Blocks.POWDER_SNOW_CAULDRON.defaultBlockState());
|
||||
world.gameEvent((Entity) null, (Holder) GameEvent.BLOCK_CHANGE, pos);
|
||||
}
|
||||
|
||||
@@ -64,11 +72,19 @@ public class CauldronBlock extends AbstractCauldronBlock {
|
||||
@@ -65,11 +75,19 @@ public class CauldronBlock extends AbstractCauldronBlock {
|
||||
|
||||
if (fluid == Fluids.WATER) {
|
||||
iblockdata1 = Blocks.WATER_CAULDRON.defaultBlockState();
|
||||
@ -94,10 +93,10 @@ index 588b3e911d9b22dad2928ea9e32e8a8a3a8e9b96..47b6b83842201620bd6620f5acf11bb1
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/LayeredCauldronBlock.java b/src/main/java/net/minecraft/world/level/block/LayeredCauldronBlock.java
|
||||
index 18ca086e28f4295cb9303919222d7c8ae0ca5d9a..542bc6be48d5c53eee988156e7aa6ecfccb51069 100644
|
||||
index 7c67efa6e344870b764eb39d5508190349e2e911..b222ac8e5b966c515be2aca86083f5640853cd29 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/LayeredCauldronBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/LayeredCauldronBlock.java
|
||||
@@ -101,7 +101,13 @@ public class LayeredCauldronBlock extends AbstractCauldronBlock {
|
||||
@@ -102,7 +102,13 @@ public class LayeredCauldronBlock extends AbstractCauldronBlock {
|
||||
}
|
||||
|
||||
// CraftBukkit start
|
||||
@ -112,12 +111,12 @@ index 18ca086e28f4295cb9303919222d7c8ae0ca5d9a..542bc6be48d5c53eee988156e7aa6ecf
|
||||
CraftBlockState newState = CraftBlockStates.getBlockState(world, blockposition);
|
||||
newState.setData(newBlock);
|
||||
|
||||
@@ -114,7 +120,7 @@ public class LayeredCauldronBlock extends AbstractCauldronBlock {
|
||||
@@ -115,7 +121,7 @@ public class LayeredCauldronBlock extends AbstractCauldronBlock {
|
||||
return false;
|
||||
}
|
||||
newState.update(true);
|
||||
- world.gameEvent(GameEvent.BLOCK_CHANGE, blockposition, GameEvent.Context.of(newBlock));
|
||||
+ if (sendGameEvent) world.gameEvent(GameEvent.BLOCK_CHANGE, blockposition, GameEvent.Context.of(newBlock)); // Paper - Call CauldronLevelChangeEvent
|
||||
- world.gameEvent((Holder) GameEvent.BLOCK_CHANGE, blockposition, GameEvent.Context.of(newBlock));
|
||||
+ if (sendGameEvent) world.gameEvent((Holder) GameEvent.BLOCK_CHANGE, blockposition, GameEvent.Context.of(newBlock)); // Paper - Call CauldronLevelChangeEvent
|
||||
return true;
|
||||
}
|
||||
// CraftBukkit end
|
@ -7,10 +7,10 @@ Powder snow cauldrons should turn to water when
|
||||
extinguishing an entity
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/LayeredCauldronBlock.java b/src/main/java/net/minecraft/world/level/block/LayeredCauldronBlock.java
|
||||
index 542bc6be48d5c53eee988156e7aa6ecfccb51069..42c1e3dfec23d6a7d832bf73d47ecae1212ec2c9 100644
|
||||
index b222ac8e5b966c515be2aca86083f5640853cd29..fa5366961861370c2366e6f0ff026a6d65128316 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/LayeredCauldronBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/LayeredCauldronBlock.java
|
||||
@@ -69,7 +69,7 @@ public class LayeredCauldronBlock extends AbstractCauldronBlock {
|
||||
@@ -70,7 +70,7 @@ public class LayeredCauldronBlock extends AbstractCauldronBlock {
|
||||
if (!world.isClientSide && entity.isOnFire() && this.isEntityInsideContent(state, pos, entity)) {
|
||||
// CraftBukkit start
|
||||
if (entity.mayInteract(world, pos)) {
|
||||
@ -19,7 +19,7 @@ index 542bc6be48d5c53eee988156e7aa6ecfccb51069..42c1e3dfec23d6a7d832bf73d47ecae1
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -79,6 +79,7 @@ public class LayeredCauldronBlock extends AbstractCauldronBlock {
|
||||
@@ -80,6 +80,7 @@ public class LayeredCauldronBlock extends AbstractCauldronBlock {
|
||||
|
||||
}
|
||||
|
||||
@ -27,7 +27,7 @@ index 542bc6be48d5c53eee988156e7aa6ecfccb51069..42c1e3dfec23d6a7d832bf73d47ecae1
|
||||
private void handleEntityOnFireInside(BlockState state, Level world, BlockPos pos) {
|
||||
if (this.precipitationType == Biome.Precipitation.SNOW) {
|
||||
LayeredCauldronBlock.lowerFillLevel((BlockState) Blocks.WATER_CAULDRON.defaultBlockState().setValue(LayeredCauldronBlock.LEVEL, (Integer) state.getValue(LayeredCauldronBlock.LEVEL)), world, pos);
|
||||
@@ -87,6 +88,15 @@ public class LayeredCauldronBlock extends AbstractCauldronBlock {
|
||||
@@ -88,6 +89,15 @@ public class LayeredCauldronBlock extends AbstractCauldronBlock {
|
||||
}
|
||||
|
||||
}
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add PlayerStopUsingItemEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 5de5ca787905d9e0133e5f75280748526c568203..2b7325d3bcea2175ec22a45101f5bbaf29c2231a 100644
|
||||
index 7f8e82a1d5fa1ca665a66d2fb1342163f7c7a733..f3ca6f6c7a8f2dc51e263ee879412bf2806b0946 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -4045,6 +4045,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -4027,6 +4027,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
|
||||
public void releaseUsingItem() {
|
||||
if (!this.useItem.isEmpty()) {
|
@ -23,10 +23,10 @@ index ff99336e0b8131ae161cfa5c4fc83c6905e3dbc8..5e5a018433414af76eaa1e781f61612d
|
||||
}
|
||||
});
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 03a9f82ac2af6cb64081c2bb758cb02a7ffd5b89..024f32155feb31365c8233f94b1e15ed85e929fb 100644
|
||||
index d4dc2e3a89b76009bb1ce2c3b03515fcf308efa0..8aa6044a60e0148d2841e7618889fbefdc8b8f60 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -2235,6 +2235,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -2192,6 +2192,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
}
|
||||
|
||||
public void onTickingStart(Entity entity) {
|
@ -13,7 +13,7 @@ public net.minecraft.world.entity.item.FallingBlockEntity blockState
|
||||
Co-authored-by: Lukas Planz <lukas.planz@web.de>
|
||||
|
||||
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 c0477f913867c67809978a4f240303151d81e6ea..a52c2fc38fd97ffa1684270443646d605ec35830 100644
|
||||
index cc00bf81de902cfc587bcf6f18e861fd4339c91e..d504d10fbe45dfe3f2f3d08d2473df6cd18f6dcf 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||
@@ -67,6 +67,7 @@ public class FallingBlockEntity extends Entity {
|
||||
@ -24,7 +24,7 @@ index c0477f913867c67809978a4f240303151d81e6ea..a52c2fc38fd97ffa1684270443646d60
|
||||
|
||||
public FallingBlockEntity(EntityType<? extends FallingBlockEntity> type, Level world) {
|
||||
super(type, world);
|
||||
@@ -169,7 +170,7 @@ public class FallingBlockEntity extends Entity {
|
||||
@@ -171,7 +172,7 @@ public class FallingBlockEntity extends Entity {
|
||||
}
|
||||
|
||||
if (!this.onGround() && !flag1) {
|
||||
@ -33,7 +33,7 @@ index c0477f913867c67809978a4f240303151d81e6ea..a52c2fc38fd97ffa1684270443646d60
|
||||
if (this.dropItem && this.level().getGameRules().getBoolean(GameRules.RULE_DOENTITYDROPS)) {
|
||||
this.spawnAtLocation((ItemLike) block);
|
||||
}
|
||||
@@ -315,6 +316,7 @@ public class FallingBlockEntity extends Entity {
|
||||
@@ -317,6 +318,7 @@ public class FallingBlockEntity extends Entity {
|
||||
}
|
||||
|
||||
nbt.putBoolean("CancelDrop", this.cancelDrop);
|
||||
@ -41,7 +41,7 @@ index c0477f913867c67809978a4f240303151d81e6ea..a52c2fc38fd97ffa1684270443646d60
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -342,6 +344,11 @@ public class FallingBlockEntity extends Entity {
|
||||
@@ -344,6 +346,11 @@ public class FallingBlockEntity extends Entity {
|
||||
this.blockState = Blocks.SAND.defaultBlockState();
|
||||
}
|
||||
|
@ -5,22 +5,22 @@ Subject: [PATCH] Add support for Proxy Protocol
|
||||
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index d16c0311142e44ec1048818221796c09ab7a90d8..f9056ee057a22a11288405cd42cd0ba4c9d120c3 100644
|
||||
index d104cf1064630698035025acbfbbf1f5e3da142a..4dd185f68ff99f598d9a6557d8bec2d254af052f 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -30,6 +30,7 @@ dependencies {
|
||||
@@ -31,6 +31,7 @@ dependencies {
|
||||
log4jPlugins.annotationProcessorConfigurationName("org.apache.logging.log4j:log4j-core:2.19.0") // Paper - Needed to generate meta for our Log4j plugins
|
||||
runtimeOnly(log4jPlugins.output)
|
||||
alsoShade(log4jPlugins.output)
|
||||
+ implementation("io.netty:netty-codec-haproxy:4.1.97.Final") // Paper - Add support for proxy protocol
|
||||
// Paper end
|
||||
implementation("org.apache.logging.log4j:log4j-iostreams:2.19.0") // Paper - remove exclusion
|
||||
implementation("org.apache.logging.log4j:log4j-iostreams:2.22.1") // Paper - remove exclusion
|
||||
implementation("org.ow2.asm:asm-commons:9.7")
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerConnectionListener.java b/src/main/java/net/minecraft/server/network/ServerConnectionListener.java
|
||||
index 87abd6274f9da9367094bad0c28acfa47e01c50e..4f330a44c77a7ec3237a86fda04921a8c4a1c00f 100644
|
||||
index c63c194c44646e6bc1a59426552787011fc2ced5..96355e1da8feb6687ea0069dda4a82fcd7e25e8a 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerConnectionListener.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerConnectionListener.java
|
||||
@@ -121,6 +121,29 @@ public class ServerConnectionListener {
|
||||
@@ -123,6 +123,29 @@ public class ServerConnectionListener {
|
||||
Connection object = j > 0 ? new RateKickingConnection(j) : new Connection(PacketFlow.SERVERBOUND); // CraftBukkit - decompile error
|
||||
|
||||
//ServerConnectionListener.this.connections.add(object); // Paper
|
@ -8,7 +8,7 @@ instance of CraftOfflinePlayer the world was incorrect
|
||||
due to the logic for reading the NBT not being up-to-date.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java b/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java
|
||||
index 0c1b5f625a351905e082b2c2a63bfd737101527e..ef2dfa30686bba3eb510bf95172174cc9972422e 100644
|
||||
index 411b280ac3e27e72091db813c0c9b69b62df6097..8caee0181f256e2ffd4e880274859eaf5f81ae96 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java
|
||||
@@ -37,6 +37,7 @@ import org.bukkit.profile.PlayerProfile;
|
@ -5,7 +5,7 @@ Subject: [PATCH] Fix FurnaceInventory for smokers and blast furnaces
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftTileInventoryConverter.java b/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftTileInventoryConverter.java
|
||||
index 8d3f71689087d687e6400e2ea9750a6fb3535bf1..149683821a248fbbd93d0417085f0cb0e86a1398 100644
|
||||
index 4a4996f8653edaf3182887821a8762caceab58ee..acb80ea99df024a30d2b8a8567d90379842b9dd3 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftTileInventoryConverter.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftTileInventoryConverter.java
|
||||
@@ -65,7 +65,7 @@ public abstract class CraftTileInventoryConverter implements CraftInventoryCreat
|
@ -5,24 +5,24 @@ Subject: [PATCH] Sanitize sent BlockEntity NBT
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundBlockEntityDataPacket.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundBlockEntityDataPacket.java
|
||||
index d79284a790569141c2ac8178d6ecc20b17cdd0d3..3944852921335c78a04a9dc301882ab5b152b1ed 100644
|
||||
index df38a2ffb29394b27a11e5150fc99ecf38331796..3fbf48941d28ffb473c14d15aea334e83a34f961 100644
|
||||
--- a/src/main/java/net/minecraft/network/protocol/game/ClientboundBlockEntityDataPacket.java
|
||||
+++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundBlockEntityDataPacket.java
|
||||
@@ -17,7 +17,7 @@ public class ClientboundBlockEntityDataPacket implements Packet<ClientGamePacket
|
||||
private final CompoundTag tag;
|
||||
@@ -29,7 +29,7 @@ public class ClientboundBlockEntityDataPacket implements Packet<ClientGamePacket
|
||||
|
||||
public static ClientboundBlockEntityDataPacket create(BlockEntity blockEntity, Function<BlockEntity, CompoundTag> nbtGetter) {
|
||||
- return new ClientboundBlockEntityDataPacket(blockEntity.getBlockPos(), blockEntity.getType(), nbtGetter.apply(blockEntity));
|
||||
+ return new ClientboundBlockEntityDataPacket(blockEntity.getBlockPos(), blockEntity.getType(), blockEntity.sanitizeSentNbt(nbtGetter.apply(blockEntity))); // Paper - Sanitize sent data
|
||||
public static ClientboundBlockEntityDataPacket create(BlockEntity blockEntity, BiFunction<BlockEntity, RegistryAccess, CompoundTag> nbtGetter) {
|
||||
RegistryAccess registryAccess = blockEntity.getLevel().registryAccess();
|
||||
- return new ClientboundBlockEntityDataPacket(blockEntity.getBlockPos(), blockEntity.getType(), nbtGetter.apply(blockEntity, registryAccess));
|
||||
+ return new ClientboundBlockEntityDataPacket(blockEntity.getBlockPos(), blockEntity.getType(), blockEntity.sanitizeSentNbt(nbtGetter.apply(blockEntity, registryAccess))); // Paper - Sanitize sent data
|
||||
}
|
||||
|
||||
public static ClientboundBlockEntityDataPacket create(BlockEntity blockEntity) {
|
||||
diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java
|
||||
index a44a82d2d5ed4d675dc1a184d5b6b935fda575dd..03b6aa2e3bd871ae59e761866b53a10f72b3cdac 100644
|
||||
index ac900dfdc5c90e9e60d47efa734be8f0a5b20dca..ec1cb034d840633240f2b379b09f7d2f1c8971a5 100644
|
||||
--- a/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java
|
||||
+++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java
|
||||
@@ -145,6 +145,7 @@ public class ClientboundLevelChunkPacketData {
|
||||
CompoundTag compoundTag = blockEntity.getUpdateTag();
|
||||
@@ -154,6 +154,7 @@ public class ClientboundLevelChunkPacketData {
|
||||
CompoundTag compoundTag = blockEntity.getUpdateTag(blockEntity.getLevel().registryAccess());
|
||||
BlockPos blockPos = blockEntity.getBlockPos();
|
||||
int i = SectionPos.sectionRelative(blockPos.getX()) << 4 | SectionPos.sectionRelative(blockPos.getZ());
|
||||
+ blockEntity.sanitizeSentNbt(compoundTag); // Paper - Sanitize sent data
|
||||
@ -30,13 +30,13 @@ index a44a82d2d5ed4d675dc1a184d5b6b935fda575dd..03b6aa2e3bd871ae59e761866b53a10f
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
|
||||
index 4893eaf93738da860014ddf3ad003334c9ebc9fa..20201430ee8f28245aa845acb172d0f5d80458ff 100644
|
||||
index df945a152747bea0452ec18c09d59598903aa91f..a7dfad2696e7145af1355a5db132af14d09a6f30 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
|
||||
@@ -253,4 +253,11 @@ public abstract class BlockEntity {
|
||||
return null;
|
||||
@@ -357,6 +357,14 @@ public abstract class BlockEntity {
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
+ // Paper start - Sanitize sent data
|
||||
+ public CompoundTag sanitizeSentNbt(CompoundTag tag) {
|
||||
+ tag.remove("PublicBukkitValues");
|
||||
@ -44,4 +44,7 @@ index 4893eaf93738da860014ddf3ad003334c9ebc9fa..20201430ee8f28245aa845acb172d0f5
|
||||
+ return tag;
|
||||
+ }
|
||||
+ // Paper end - Sanitize sent data
|
||||
}
|
||||
+
|
||||
private static class ComponentHelper {
|
||||
|
||||
public static final Codec<DataComponentMap> COMPONENTS_CODEC = DataComponentMap.CODEC.optionalFieldOf("components", DataComponentMap.EMPTY).codec();
|
@ -0,0 +1,19 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Nassim Jahnke <nassim@njahnke.dev>
|
||||
Date: Thu, 2 Jun 2022 20:35:58 +0200
|
||||
Subject: [PATCH] Disable component selector resolving in books by default
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/item/WrittenBookItem.java b/src/main/java/net/minecraft/world/item/WrittenBookItem.java
|
||||
index 46383a9f8bd1075ea56847f5fd8437df0a5d4941..0a5182c52fe2fef05dabbeb5ed13487f9175efbe 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/WrittenBookItem.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/WrittenBookItem.java
|
||||
@@ -54,7 +54,7 @@ public class WrittenBookItem extends Item {
|
||||
|
||||
public static boolean resolveBookComponents(ItemStack book, CommandSourceStack commandSource, @Nullable Player player) {
|
||||
WrittenBookContent writtenBookContent = book.get(DataComponents.WRITTEN_BOOK_CONTENT);
|
||||
- if (writtenBookContent != null && !writtenBookContent.resolved()) {
|
||||
+ if (io.papermc.paper.configuration.GlobalConfiguration.get().itemValidation.resolveSelectorsInBooks && writtenBookContent != null && !writtenBookContent.resolved()) { // Paper - Disable component selector resolving in books by default
|
||||
WrittenBookContent writtenBookContent2 = writtenBookContent.resolve(commandSource, player);
|
||||
if (writtenBookContent2 != null) {
|
||||
book.set(DataComponents.WRITTEN_BOOK_CONTENT, writtenBookContent2);
|
@ -5,22 +5,22 @@ Subject: [PATCH] Prevent entity loading causing async lookups
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index f08908238cc9680310a2b37089b051bf6fdf5ee3..936ce33bffd93ed7210b6659c27c476e1db348bb 100644
|
||||
index 3bd13975934e8f61b41c4c08b73ead6e0f45ffac..bcf4e77ed17fa35d509b33568793a38278e2b718 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -727,6 +727,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -740,6 +740,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
|
||||
public void baseTick() {
|
||||
this.level().getProfiler().push("entityBaseTick");
|
||||
+ if (firstTick && this instanceof net.minecraft.world.entity.NeutralMob neutralMob) neutralMob.tickInitialPersistentAnger(level); // Paper - Prevent entity loading causing async lookups
|
||||
this.feetBlockState = null;
|
||||
this.inBlockState = null;
|
||||
if (this.isPassenger() && this.getVehicle().isRemoved()) {
|
||||
this.stopRiding();
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/NeutralMob.java b/src/main/java/net/minecraft/world/entity/NeutralMob.java
|
||||
index fa64c7baa7587f2cfe80b78ed83be011239618cf..47d5a0928f3c86d71f851738bfe7beedc98cfbb3 100644
|
||||
index 7bb01b28b07bf2b31897cc5ab1f44fc0387958bb..a0d0a3330bb43807172fde1ee21644380517b40c 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/NeutralMob.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/NeutralMob.java
|
||||
@@ -42,18 +42,11 @@ public interface NeutralMob {
|
||||
@@ -42,24 +42,11 @@ public interface NeutralMob {
|
||||
UUID uuid = nbt.getUUID("AngryAt");
|
||||
|
||||
this.setPersistentAngerTarget(uuid);
|
||||
@ -28,11 +28,17 @@ index fa64c7baa7587f2cfe80b78ed83be011239618cf..47d5a0928f3c86d71f851738bfe7beed
|
||||
-
|
||||
- if (entity != null) {
|
||||
- if (entity instanceof Mob) {
|
||||
- this.setLastHurtByMob((Mob) entity);
|
||||
- Mob entityinsentient = (Mob) entity;
|
||||
-
|
||||
- this.setTarget(entityinsentient);
|
||||
- this.setLastHurtByMob(entityinsentient);
|
||||
- }
|
||||
-
|
||||
- if (entity.getType() == EntityType.PLAYER) {
|
||||
- this.setLastHurtByPlayer((Player) entity);
|
||||
- if (entity instanceof Player) {
|
||||
- Player entityhuman = (Player) entity;
|
||||
-
|
||||
- this.setTarget(entityhuman);
|
||||
- this.setLastHurtByPlayer(entityhuman);
|
||||
- }
|
||||
-
|
||||
- }
|
||||
@ -44,7 +50,7 @@ index fa64c7baa7587f2cfe80b78ed83be011239618cf..47d5a0928f3c86d71f851738bfe7beed
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -127,4 +120,27 @@ public interface NeutralMob {
|
||||
@@ -133,4 +120,28 @@ public interface NeutralMob {
|
||||
|
||||
@Nullable
|
||||
LivingEntity getTarget();
|
||||
@ -60,14 +66,15 @@ index fa64c7baa7587f2cfe80b78ed83be011239618cf..47d5a0928f3c86d71f851738bfe7beed
|
||||
+ Entity entity = ((ServerLevel) level).getEntity(target);
|
||||
+
|
||||
+ if (entity != null) {
|
||||
+ if (entity instanceof Mob) {
|
||||
+ this.setLastHurtByMob((Mob) entity);
|
||||
+ if (entity instanceof Mob mob) {
|
||||
+ this.setTarget(mob);
|
||||
+ this.setLastHurtByMob(mob);
|
||||
+ }
|
||||
+
|
||||
+ if (entity.getType() == EntityType.PLAYER) {
|
||||
+ this.setLastHurtByPlayer((Player) entity);
|
||||
+ if (entity instanceof Player player) {
|
||||
+ this.setTarget(player);
|
||||
+ this.setLastHurtByPlayer(player);
|
||||
+ }
|
||||
+
|
||||
+ }
|
||||
+ }
|
||||
+ // Paper end - Prevent entity loading causing async lookups
|
@ -7,10 +7,10 @@ There are no plans to support creating worlds while worlds are
|
||||
being ticked themselvess.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 88821acddee03c30c2630d3d6c39cc93702ed35b..2a96d128dd42b937b16e25274b39fb66c3d9a097 100644
|
||||
index 79f7e0fb2f1aa6af441c6e09d2c443d7d4bb47ef..00457548d43e1d2143d1f6027593a1178f02564a 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -307,6 +307,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -314,6 +314,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
// Spigot end
|
||||
public final io.papermc.paper.configuration.PaperConfigurations paperConfigurations; // Paper - add paper configuration files
|
||||
public static long currentTickLong = 0L; // Paper - track current tick as a long
|
||||
@ -18,7 +18,7 @@ index 88821acddee03c30c2630d3d6c39cc93702ed35b..2a96d128dd42b937b16e25274b39fb66
|
||||
|
||||
public static <S extends MinecraftServer> S spin(Function<Thread, S> serverFactory) {
|
||||
AtomicReference<S> atomicreference = new AtomicReference();
|
||||
@@ -1501,7 +1502,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1558,7 +1559,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.getFunctions().tick();
|
||||
MinecraftTimings.commandFunctionsTimer.stopTiming(); // Spigot // Paper
|
||||
this.profiler.popPush("levels");
|
||||
@ -27,7 +27,7 @@ index 88821acddee03c30c2630d3d6c39cc93702ed35b..2a96d128dd42b937b16e25274b39fb66
|
||||
|
||||
// CraftBukkit start
|
||||
// Run tasks that are waiting on processing
|
||||
@@ -1533,6 +1534,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1590,6 +1591,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
// Paper end - Perf: Optimize time updates
|
||||
MinecraftTimings.timeUpdateTimer.stopTiming(); // Spigot // Paper
|
||||
|
||||
@ -36,7 +36,7 @@ index 88821acddee03c30c2630d3d6c39cc93702ed35b..2a96d128dd42b937b16e25274b39fb66
|
||||
while (iterator.hasNext()) {
|
||||
ServerLevel worldserver = (ServerLevel) iterator.next();
|
||||
worldserver.hasPhysicsEvent = org.bukkit.event.block.BlockPhysicsEvent.getHandlerList().getRegisteredListeners().length > 0; // Paper - BlockPhysicsEvent
|
||||
@@ -1571,6 +1574,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1630,6 +1633,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.profiler.pop();
|
||||
worldserver.explosionDensityCache.clear(); // Paper - Optimize explosions
|
||||
}
|
||||
@ -45,7 +45,7 @@ index 88821acddee03c30c2630d3d6c39cc93702ed35b..2a96d128dd42b937b16e25274b39fb66
|
||||
this.profiler.popPush("connection");
|
||||
MinecraftTimings.connectionTimer.startTiming(); // Spigot // Paper
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index f3b461baac5a5de61f6b1c00251961bd25eb4773..562953515e21adc1cffadfe3ffb803c2d5059df0 100644
|
||||
index 70de655fd319863260bbfb0316fad892ba2f4af0..199cc5ff46a41cc15467444b3900d171803666bd 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -886,6 +886,11 @@ public final class CraftServer implements Server {
|
||||
@ -60,7 +60,7 @@ index f3b461baac5a5de61f6b1c00251961bd25eb4773..562953515e21adc1cffadfe3ffb803c2
|
||||
public DedicatedPlayerList getHandle() {
|
||||
return this.playerList;
|
||||
}
|
||||
@@ -1145,6 +1150,7 @@ public final class CraftServer implements Server {
|
||||
@@ -1146,6 +1151,7 @@ public final class CraftServer implements Server {
|
||||
@Override
|
||||
public World createWorld(WorldCreator creator) {
|
||||
Preconditions.checkState(this.console.getAllLevels().iterator().hasNext(), "Cannot create additional worlds on STARTUP");
|
||||
@ -68,7 +68,7 @@ index f3b461baac5a5de61f6b1c00251961bd25eb4773..562953515e21adc1cffadfe3ffb803c2
|
||||
Preconditions.checkArgument(creator != null, "WorldCreator cannot be null");
|
||||
|
||||
String name = creator.name();
|
||||
@@ -1317,6 +1323,7 @@ public final class CraftServer implements Server {
|
||||
@@ -1330,6 +1336,7 @@ public final class CraftServer implements Server {
|
||||
|
||||
@Override
|
||||
public boolean unloadWorld(World world, boolean save) {
|
@ -18,10 +18,10 @@ index 27e52ee93ab591e97f37705de64cb5b62c06e253..3d792957f27fd4bdfad8d76262a8e2a2
|
||||
int j = this.angerByUuid.removeInt(entity.getUUID());
|
||||
i += j;
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java b/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java
|
||||
index b5185fcb635fbf5e5ed9d6cc9cc517cb46ada5aa..937f81a859953498abe73bea560c86e6560e1c33 100644
|
||||
index e428ccc1a3e79b010cd8559879a07909c24cca47..ddd60be52dce5773c80934be5aa5705db239e3dd 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java
|
||||
@@ -488,6 +488,15 @@ public class Warden extends Monster implements VibrationSystem {
|
||||
@@ -482,6 +482,15 @@ public class Warden extends Monster implements VibrationSystem {
|
||||
@VisibleForTesting
|
||||
public void increaseAngerAt(@Nullable Entity entity, int amount, boolean listening) {
|
||||
if (!this.isNoAi() && this.canTargetEntity(entity)) {
|
||||
@ -35,5 +35,5 @@ index b5185fcb635fbf5e5ed9d6cc9cc517cb46ada5aa..937f81a859953498abe73bea560c86e6
|
||||
+ amount = event.getNewAnger() - activeAnger;
|
||||
+ // Paper end - Add WardenAngerChangeEvent
|
||||
WardenAi.setDigCooldown(this);
|
||||
boolean flag1 = !(this.getBrain().getMemory(MemoryModuleType.ATTACK_TARGET).orElse(null) instanceof Player); // CraftBukkit - decompile error
|
||||
boolean flag1 = !(this.getTarget() instanceof Player);
|
||||
int j = this.angerManagement.increaseAnger(entity, amount);
|
@ -11,10 +11,10 @@ distance trigger. This adds a config option to ignore that
|
||||
and use the exact dimension key of the worlds involved.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/advancements/critereon/LocationPredicate.java b/src/main/java/net/minecraft/advancements/critereon/LocationPredicate.java
|
||||
index 079e3af44a964321d360b979f64f572057235ab8..8f2c00cd70bc99855f23f3db58567233a1fda84e 100644
|
||||
index 5be2d877162922d6f29592e723b7d5aff14e1515..37174de2319e353b2f989d8321758a081c655a3f 100644
|
||||
--- a/src/main/java/net/minecraft/advancements/critereon/LocationPredicate.java
|
||||
+++ b/src/main/java/net/minecraft/advancements/critereon/LocationPredicate.java
|
||||
@@ -62,7 +62,7 @@ public record LocationPredicate(
|
||||
@@ -42,7 +42,7 @@ public record LocationPredicate(
|
||||
public boolean matches(ServerLevel world, double x, double y, double z) {
|
||||
if (this.position.isPresent() && !this.position.get().matches(x, y, z)) {
|
||||
return false;
|
||||
@ -24,10 +24,10 @@ index 079e3af44a964321d360b979f64f572057235ab8..8f2c00cd70bc99855f23f3db58567233
|
||||
} else {
|
||||
BlockPos blockPos = BlockPos.containing(x, y, z);
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 3f8f0e88339d847c44120b7657161bf43402db74..c99a672dd2d2e4972e9d4025e10e8863d0af1e6a 100644
|
||||
index c9c5e667c2aa26db1fb0038e40598d04a7c80889..22e9009e2943a70f21da6fa1ceefb5cfc9d20dab 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -1272,6 +1272,12 @@ public class ServerPlayer extends Player {
|
||||
@@ -1339,6 +1339,12 @@ public class ServerPlayer extends Player {
|
||||
ResourceKey<Level> maindimensionkey = CraftDimensionUtil.getMainDimensionKey(origin);
|
||||
ResourceKey<Level> maindimensionkey1 = CraftDimensionUtil.getMainDimensionKey(this.level());
|
||||
|
@ -53,7 +53,7 @@ index ffe6881d93153838cd23f125980b832e6fd1d0eb..f5cbe9ae5802fa48e57092b1e5ca8a5f
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java b/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java
|
||||
index 440660dfa70d57e94ae4eef1dce783aee5034f7e..67c9009b735429e887e706baf50a6023d572a46c 100644
|
||||
index 4705aed1dd98378c146bf9e346df1a17f719ad36..daf3c26fce7569761951bfd5594c6726d854a9ff 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java
|
||||
@@ -258,4 +258,14 @@ public class DummyGeneratorAccess implements WorldGenLevel {
|
@ -5,12 +5,12 @@ Subject: [PATCH] Nameable Banner API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBanner.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBanner.java
|
||||
index 2b7fcd30b6eb0ab60b44de31ad0e0b20033f45c5..0a80bd370dd41ffbfbbe6b0d88cd6fa8a47a5725 100644
|
||||
index 26ae3fe910964193c7fb22b8b644d5c0476f8d3d..0f8de5b87deeaf2aca043c017576f7c54c4a2f8e 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBanner.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBanner.java
|
||||
@@ -108,4 +108,26 @@ public class CraftBanner extends CraftBlockEntityState<BannerBlockEntity> implem
|
||||
public CraftBanner copy() {
|
||||
return new CraftBanner(this);
|
||||
@@ -110,4 +110,26 @@ public class CraftBanner extends CraftBlockEntityState<BannerBlockEntity> implem
|
||||
public CraftBanner copy(Location location) {
|
||||
return new CraftBanner(this, location);
|
||||
}
|
||||
+
|
||||
+ // Paper start
|
@ -8,10 +8,10 @@ in command blocks, and if called asynchronously, would throw
|
||||
an error
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/BaseCommandBlock.java b/src/main/java/net/minecraft/world/level/BaseCommandBlock.java
|
||||
index c56f5173fda6b38c2dcaea196217f2f5a7d7c641..524b0f1086c01888fe0b76e180c40915d16a1eb9 100644
|
||||
index e40069d937de5fd00741ae6873abeecc46b93732..552f7ab11dc09fa69034f009235cb22429a9ed11 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/BaseCommandBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/BaseCommandBlock.java
|
||||
@@ -172,6 +172,7 @@ public abstract class BaseCommandBlock implements CommandSource {
|
||||
@@ -177,6 +177,7 @@ public abstract class BaseCommandBlock implements CommandSource {
|
||||
@Override
|
||||
public void sendSystemMessage(Component message) {
|
||||
if (this.trackOutput) {
|
||||
@ -20,10 +20,10 @@ index c56f5173fda6b38c2dcaea196217f2f5a7d7c641..524b0f1086c01888fe0b76e180c40915
|
||||
Date date = new Date();
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 562953515e21adc1cffadfe3ffb803c2d5059df0..e849e706660bf0b0ef1748dfee3ba75e5aff9863 100644
|
||||
index 199cc5ff46a41cc15467444b3900d171803666bd..d2a02210553363fb87882904abcfbe2ccd95fa78 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1880,7 +1880,7 @@ public final class CraftServer implements Server {
|
||||
@@ -1899,7 +1899,7 @@ public final class CraftServer implements Server {
|
||||
// Paper end
|
||||
Set<CommandSender> recipients = new HashSet<>();
|
||||
for (Permissible permissible : this.getPluginManager().getPermissionSubscriptions(permission)) {
|
@ -7,10 +7,10 @@ The previous solution caused a bunch of bandaid fixes inorder to resolve edge ca
|
||||
Just simply prevent them from being added to the world instead.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 024f32155feb31365c8233f94b1e15ed85e929fb..57f54e3399f9d2d7fecdae62858d20e50caf7afd 100644
|
||||
index 8aa6044a60e0148d2841e7618889fbefdc8b8f60..90500b6a5b3612c85a06660fe67e89351d4c0fd1 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1231,6 +1231,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1237,6 +1237,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
// WorldServer.LOGGER.warn("Tried to add entity {} but it was marked as removed already", EntityTypes.getKey(entity.getType())); // CraftBukkit
|
||||
return false;
|
||||
} else {
|
@ -7,10 +7,10 @@ Remove in 1.19 along with the SplashPotion and
|
||||
LingeringPotion interfaces
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftThrownPotion.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftThrownPotion.java
|
||||
index d5f1681a476c8fe2ae128a84910f4bf04063b75a..d3aeb4b614b2b17d9613aa3ffa34ebfc81666f79 100644
|
||||
index a5edfd484737b5f6af8aa1d9a1d31d7d2710f7da..ca87f0d59e6cf4b214b8322701ad0c16e49bad48 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftThrownPotion.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftThrownPotion.java
|
||||
@@ -13,7 +13,7 @@ import org.bukkit.entity.ThrownPotion;
|
||||
@@ -14,7 +14,7 @@ import org.bukkit.entity.ThrownPotion;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.potion.PotionEffect;
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add Player#getFishHook
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
index b895b3972dc48ec91dba9d44546508badef73865..98ee3a7eff6cd1dd3fdbd7cc6a94deebcefbc565 100644
|
||||
index 6c500a2ccc050fc44076e443032b0ef9d87a7de8..79faf3c64891899bf5d6d119154aba02d4665b3b 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
@@ -162,6 +162,15 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
||||
@@ -160,6 +160,15 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
||||
return new Location(worldServer.getWorld(), bed.getX(), bed.getY(), bed.getZ());
|
||||
}
|
||||
// Paper end
|
@ -15,7 +15,7 @@ to account for the case where the chunk is _not_ currently loaded
|
||||
and then later loaded.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/gameevent/DynamicGameEventListener.java b/src/main/java/net/minecraft/world/level/gameevent/DynamicGameEventListener.java
|
||||
index 53eeb59257e3e943cbe7dc113674135077f0c20d..fc316f6c6db1d39bb24daa1d272e5128c71320dd 100644
|
||||
index af9437bddf69546a1a78eca7e858ac8d2e68ed0a..134b4ceec0ec5a2475881e739d6579fa5984c3dd 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/gameevent/DynamicGameEventListener.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/gameevent/DynamicGameEventListener.java
|
||||
@@ -41,7 +41,7 @@ public class DynamicGameEventListener<T extends GameEventListener> {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add various missing EntityDropItemEvent calls
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 936ce33bffd93ed7210b6659c27c476e1db348bb..319bb4d94f8221e20557c0e0805c581447e2ee57 100644
|
||||
index bcf4e77ed17fa35d509b33568793a38278e2b718..3f2293ae7b84c9ec8455f41121adbaf7dbd7da71 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -2491,6 +2491,14 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -2519,6 +2519,14 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
stack.setCount(0); // Paper - destroy this item - if this ever leaks due to game bugs, ensure it doesn't dupe
|
||||
|
||||
entityitem.setDefaultPickUpDelay();
|
||||
@ -24,10 +24,10 @@ index 936ce33bffd93ed7210b6659c27c476e1db348bb..319bb4d94f8221e20557c0e0805c5814
|
||||
EntityDropItemEvent event = new EntityDropItemEvent(this.getBukkitEntity(), (org.bukkit.entity.Item) entityitem.getBukkitEntity());
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/Dolphin.java b/src/main/java/net/minecraft/world/entity/animal/Dolphin.java
|
||||
index 1a37be6015fb5c11301850d455a4f3807076c9be..45646c69ea73936a8916756fde37dd3f39db0d04 100644
|
||||
index ff5d117e4740fe1762b5d1f547fc5cb89ab8515b..1b1cb0e4d54e52ebe794199e386c54c5d84b3719 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/Dolphin.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/Dolphin.java
|
||||
@@ -593,7 +593,7 @@ public class Dolphin extends WaterAnimal {
|
||||
@@ -583,7 +583,7 @@ public class Dolphin extends WaterAnimal {
|
||||
float f2 = 0.02F * Dolphin.this.random.nextFloat();
|
||||
|
||||
entityitem.setDeltaMovement((double) (0.3F * -Mth.sin(Dolphin.this.getYRot() * 0.017453292F) * Mth.cos(Dolphin.this.getXRot() * 0.017453292F) + Mth.cos(f1) * f2), (double) (0.3F * Mth.sin(Dolphin.this.getXRot() * 0.017453292F) * 1.5F), (double) (0.3F * Mth.cos(Dolphin.this.getYRot() * 0.017453292F) * Mth.cos(Dolphin.this.getXRot() * 0.017453292F) + Mth.sin(f1) * f2));
|
||||
@ -37,10 +37,10 @@ index 1a37be6015fb5c11301850d455a4f3807076c9be..45646c69ea73936a8916756fde37dd3f
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/Fox.java b/src/main/java/net/minecraft/world/entity/animal/Fox.java
|
||||
index 4ac32078cb074a78a2bb83307013b849f8d59f23..4c2e090a72dbd5bfb928e6ccbcedb1a25231d5b1 100644
|
||||
index 82ced9f42dced65322a55579bb764fb4dc7c1b66..1aa5485f2608000e4ac07350d1c537bc9bd92de4 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/Fox.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/Fox.java
|
||||
@@ -513,14 +513,14 @@ public class Fox extends Animal implements VariantHolder<Fox.Type> {
|
||||
@@ -507,14 +507,14 @@ public class Fox extends Animal implements VariantHolder<Fox.Type> {
|
||||
entityitem.setPickUpDelay(40);
|
||||
entityitem.setThrower(this);
|
||||
this.playSound(SoundEvents.FOX_SPIT, 1.0F, 1.0F);
|
||||
@ -58,10 +58,10 @@ index 4ac32078cb074a78a2bb83307013b849f8d59f23..4c2e090a72dbd5bfb928e6ccbcedb1a2
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java b/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java
|
||||
index ee1b2c1fec4b76a821e1d52fbb07e1f302b2efa1..110dd5418b0512a2f27f0c4d5a5f1812356a6a12 100644
|
||||
index 3b2cf9ca8447321d64ffdb4fdb9569d736d63dbb..923806900ef6248576e71260d40e9caf2c8943e8 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java
|
||||
@@ -357,8 +357,7 @@ public class Goat extends Animal {
|
||||
@@ -361,8 +361,7 @@ public class Goat extends Animal {
|
||||
double d2 = (double) Mth.randomBetween(this.random, -0.2F, 0.2F);
|
||||
ItemEntity entityitem = new ItemEntity(this.level(), vec3d.x(), vec3d.y(), vec3d.z(), itemstack, d0, d1, d2);
|
||||
|
||||
@ -72,10 +72,10 @@ index ee1b2c1fec4b76a821e1d52fbb07e1f302b2efa1..110dd5418b0512a2f27f0c4d5a5f1812
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java b/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java
|
||||
index 1d9913cbc7fd0c6e29278b02c38703b52af1245b..0e85e3ab58d848b119212fa7d2eb4f92d3efe29b 100644
|
||||
index 11236a1c1705600c2317f0ea4e3b712327352b40..a0c52ce65d4035d135b1536c7408a6867a553447 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java
|
||||
@@ -352,8 +352,9 @@ public class Sniffer extends Animal {
|
||||
@@ -350,8 +350,9 @@ public class Sniffer extends Animal {
|
||||
|
||||
entityitem.setDefaultPickUpDelay();
|
||||
this.finalizeSpawnChildFromBreeding(world, other, (AgeableMob) null);
|
@ -5,10 +5,10 @@ Subject: [PATCH] Fix Bee flower NPE
|
||||
|
||||
|
||||
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 91ea960ba223bae42655c581b9b6c0981f333c9b..f9521a6e115f0c975a7885b024c99eae300b63bf 100644
|
||||
index d317b8500e8d2c280e52140440cf2b9cb61c3b28..0dfb8109fd8c022b079da00f6a0e3fc85b57bf7a 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/Bee.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/Bee.java
|
||||
@@ -810,7 +810,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
|
||||
@@ -794,7 +794,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
|
||||
++this.pollinatingTicks;
|
||||
if (this.pollinatingTicks > 600) {
|
||||
Bee.this.savedFlowerPos = null;
|
@ -5,10 +5,10 @@ Subject: [PATCH] Fix Spigot Config not using commands.spam-exclusions
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 19bc63da6bca5b3ff62bb2a148b35e0d3f93bb1d..c26eea3adbe7013ee226f2337e85e423aac11977 100644
|
||||
index ae440c8b7597d08ae62dfe301b20886f82c720ca..31813e06e626455d72915683c7aaa7782b9b792d 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2299,7 +2299,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -2373,7 +2373,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
}
|
||||
// Spigot end
|
||||
// this.chatSpamTickCount += 20;
|
@ -5,10 +5,10 @@ Subject: [PATCH] More Teleport API
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index c26eea3adbe7013ee226f2337e85e423aac11977..f2b865d4e28c3d99d50088c61d0b93bf47300a02 100644
|
||||
index 31813e06e626455d72915683c7aaa7782b9b792d..3e641c26695cb1c40a6bde64ac090c4899538e80 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1558,11 +1558,17 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -1559,11 +1559,17 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
return false; // CraftBukkit - Return event status
|
||||
}
|
||||
|
||||
@ -29,7 +29,7 @@ index c26eea3adbe7013ee226f2337e85e423aac11977..f2b865d4e28c3d99d50088c61d0b93bf
|
||||
d0 = to.getX();
|
||||
d1 = to.getY();
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
index 46bc34741394740de46546bd4ce7db35c757316c..79e58d7a72a599cd84d479be62f72c523e37dd07 100644
|
||||
index 113ca1d16cb7650d72f488cdaa9e670d51dc85f0..b6fef2ca5b564c293cb602cb8e300d35dba89b1f 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
@@ -219,15 +219,36 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
@ -71,7 +71,7 @@ index 46bc34741394740de46546bd4ce7db35c757316c..79e58d7a72a599cd84d479be62f72c52
|
||||
|
||||
// Let the server handle cross world teleports
|
||||
if (location.getWorld() != null && !location.getWorld().equals(this.getWorld())) {
|
||||
@@ -948,6 +969,39 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
@@ -958,6 +979,39 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
return CraftEntity.perm;
|
||||
}
|
||||
|
||||
@ -112,10 +112,10 @@ index 46bc34741394740de46546bd4ce7db35c757316c..79e58d7a72a599cd84d479be62f72c52
|
||||
private final org.bukkit.entity.Entity.Spigot spigot = new org.bukkit.entity.Entity.Spigot()
|
||||
{
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index b0e552d959f349878fc36f136f4d541f85d032fe..c5175427fdb6e990c47c014f99d1784959d83658 100644
|
||||
index d2f98aeb4a209e9ed4a7b6bddba8a299fc21d002..15f2dec16042c79303b88b6dfb1ba17ec13a5f56 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -1197,13 +1197,101 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -1273,13 +1273,101 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
|
||||
@Override
|
||||
public void setRotation(float yaw, float pitch) {
|
||||
@ -218,7 +218,7 @@ index b0e552d959f349878fc36f136f4d541f85d032fe..c5175427fdb6e990c47c014f99d17849
|
||||
location.checkFinite();
|
||||
|
||||
ServerPlayer entity = this.getHandle();
|
||||
@@ -1216,7 +1304,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -1292,7 +1380,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -227,7 +227,7 @@ index b0e552d959f349878fc36f136f4d541f85d032fe..c5175427fdb6e990c47c014f99d17849
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1225,7 +1313,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -1301,7 +1389,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
// To = Players new Location if Teleport is Successful
|
||||
Location to = location;
|
||||
// Create & Call the Teleport Event.
|
||||
@ -236,7 +236,7 @@ index b0e552d959f349878fc36f136f4d541f85d032fe..c5175427fdb6e990c47c014f99d17849
|
||||
this.server.getPluginManager().callEvent(event);
|
||||
|
||||
// Return False to inform the Plugin that the Teleport was unsuccessful/cancelled.
|
||||
@@ -1234,7 +1322,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -1310,7 +1398,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
}
|
||||
|
||||
// If this player is riding another entity, we must dismount before teleporting.
|
||||
@ -245,7 +245,7 @@ index b0e552d959f349878fc36f136f4d541f85d032fe..c5175427fdb6e990c47c014f99d17849
|
||||
|
||||
// SPIGOT-5509: Wakeup, similar to riding
|
||||
if (this.isSleeping()) {
|
||||
@@ -1250,13 +1338,19 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -1326,13 +1414,19 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
ServerLevel toWorld = ((CraftWorld) to.getWorld()).getHandle();
|
||||
|
||||
// Close any foreign inventory
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add EntityPortalReadyEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 319bb4d94f8221e20557c0e0805c581447e2ee57..8b44dc6cfddf77bdfe3684d1cdb15bb9125c4137 100644
|
||||
index 3f2293ae7b84c9ec8455f41121adbaf7dbd7da71..4b54b3e121508fb1590654123e86c6c5de54a755 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -2832,6 +2832,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -2862,6 +2862,13 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
if (true && !this.isPassenger() && this.portalTime++ >= i) { // CraftBukkit
|
||||
this.level().getProfiler().push("portal");
|
||||
this.portalTime = i;
|
||||
@ -22,7 +22,7 @@ index 319bb4d94f8221e20557c0e0805c581447e2ee57..8b44dc6cfddf77bdfe3684d1cdb15bb9
|
||||
this.setPortalCooldown();
|
||||
// CraftBukkit start
|
||||
if (this instanceof ServerPlayer) {
|
||||
@@ -2839,6 +2846,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -2869,6 +2876,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
} else {
|
||||
this.changeDimension(worldserver1);
|
||||
}
|
@ -9,10 +9,10 @@ should be supported. Some entities (for whatever
|
||||
reason) use the level's random in some places.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||
index 78acc580d66917e52d89632e3f0b7c1e979714d4..d0dac3dc89b9bb645a1d8498802fb8c6bff6a78e 100644
|
||||
index 1817e8876f13695578b0a5b2f75e738b3286db48..b392fda26982517cbc2c04156897184275ce69e5 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||
@@ -67,7 +67,12 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
||||
@@ -71,7 +71,12 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
||||
}
|
||||
|
||||
public ItemEntity(Level world, double x, double y, double z, ItemStack stack) {
|
||||
@ -27,10 +27,10 @@ index 78acc580d66917e52d89632e3f0b7c1e979714d4..d0dac3dc89b9bb645a1d8498802fb8c6
|
||||
|
||||
public ItemEntity(Level world, double x, double y, double z, ItemStack stack, double velocityX, double velocityY, double velocityZ) {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
||||
index 16f9d38687c0fdda18468b5bfb61b09b98254968..e712bd07ea2946167782473a536e0c72fab4bccd 100644
|
||||
index 4772e7978858263702312669f400d3da9c486730..f1f352ec0e51f5db59254841a06c176c5a876fc9 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
||||
@@ -44,7 +44,7 @@ public class PrimedTnt extends Entity implements TraceableEntity {
|
||||
@@ -42,7 +42,7 @@ public class PrimedTnt extends Entity implements TraceableEntity {
|
||||
public PrimedTnt(Level world, double x, double y, double z, @Nullable LivingEntity igniter) {
|
||||
this(EntityType.TNT, world);
|
||||
this.setPos(x, y, z);
|
@ -7,10 +7,10 @@ Minecraft's prediction system does not handle block entities, so if we are manua
|
||||
block breaking we need to set it after the prediction is finished. This fixes block entities not showing when cancelling the BlockBreakEvent.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
index 8f4c9b99b638cfce8cc7c55f6369f62e757f4e48..f3389dc345d8b6e5389ae37848d9b268d4bbad83 100644
|
||||
index d8c5f8e584976a97bd909bfa20023993ab776952..77e78808171daac78502ef3fcc70f03579eaa9e3 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
@@ -62,6 +62,8 @@ public class ServerPlayerGameMode {
|
||||
@@ -61,6 +61,8 @@ public class ServerPlayerGameMode {
|
||||
private BlockPos delayedDestroyPos;
|
||||
private int delayedTickStart;
|
||||
private int lastSentState;
|
||||
@ -19,7 +19,7 @@ index 8f4c9b99b638cfce8cc7c55f6369f62e757f4e48..f3389dc345d8b6e5389ae37848d9b268
|
||||
|
||||
public ServerPlayerGameMode(ServerPlayer player) {
|
||||
this.gameModeForPlayer = GameType.DEFAULT_MODE;
|
||||
@@ -188,10 +190,7 @@ public class ServerPlayerGameMode {
|
||||
@@ -191,10 +193,7 @@ public class ServerPlayerGameMode {
|
||||
this.player.connection.send(new ClientboundBlockUpdatePacket(pos, this.level.getBlockState(pos)));
|
||||
this.debugLogging(pos, false, sequence, "may not interact");
|
||||
// Update any tile entity data for this block
|
||||
@ -31,7 +31,7 @@ index 8f4c9b99b638cfce8cc7c55f6369f62e757f4e48..f3389dc345d8b6e5389ae37848d9b268
|
||||
// CraftBukkit end
|
||||
return;
|
||||
}
|
||||
@@ -202,10 +201,7 @@ public class ServerPlayerGameMode {
|
||||
@@ -205,10 +204,7 @@ public class ServerPlayerGameMode {
|
||||
// Let the client know the block still exists
|
||||
this.player.connection.send(new ClientboundBlockUpdatePacket(this.level, pos));
|
||||
// Update any tile entity data for this block
|
||||
@ -43,7 +43,7 @@ index 8f4c9b99b638cfce8cc7c55f6369f62e757f4e48..f3389dc345d8b6e5389ae37848d9b268
|
||||
return;
|
||||
}
|
||||
// CraftBukkit end
|
||||
@@ -387,10 +383,12 @@ public class ServerPlayerGameMode {
|
||||
@@ -390,10 +386,12 @@ public class ServerPlayerGameMode {
|
||||
}
|
||||
|
||||
// Update any tile entity data for this block
|
||||
@ -57,10 +57,10 @@ index 8f4c9b99b638cfce8cc7c55f6369f62e757f4e48..f3389dc345d8b6e5389ae37848d9b268
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index f2b865d4e28c3d99d50088c61d0b93bf47300a02..faa43550844fd3a3595bd9621b5730c209a54124 100644
|
||||
index 3e641c26695cb1c40a6bde64ac090c4899538e80..d20baa57c5367861fb5b3b6ea746a6391b6115cc 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1704,8 +1704,28 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -1706,8 +1706,28 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
return;
|
||||
}
|
||||
// Paper end - Don't allow digging into unloaded chunks
|
@ -5,10 +5,10 @@ Subject: [PATCH] Warn on plugins accessing faraway chunks
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index 1ed82afbc3aaa826f8067c65fdfc3ffce36a2ce5..59dba562e17e9463c1e00dee4979b61a0f68643e 100644
|
||||
index 12a104fd9aa6c02a4e983f9651e07804a8df606e..37c81d6c95efaab12a05075e6397ab2548c76722 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -345,7 +345,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -339,7 +339,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
}
|
||||
|
||||
private static boolean isInWorldBoundsHorizontal(BlockPos pos) {
|
||||
@ -18,7 +18,7 @@ index 1ed82afbc3aaa826f8067c65fdfc3ffce36a2ce5..59dba562e17e9463c1e00dee4979b61a
|
||||
|
||||
private static boolean isOutsideSpawnableHeight(int y) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index f2e4494a31dd7ca7e099c6960a9e6378ecac8727..51e709beb32499f2f56189a0426bba93c43e1c0d 100644
|
||||
index 4efbda6521f36ceae3b5b32ad0c79fa53b48b5bd..6231bc770ea6eb6aba47abbc74b6380fd9360d8c 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -319,9 +319,24 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@ -78,7 +78,7 @@ index f2e4494a31dd7ca7e099c6960a9e6378ecac8727..51e709beb32499f2f56189a0426bba93
|
||||
this.getHandle().setChunkForced(x, z, forced);
|
||||
}
|
||||
|
||||
@@ -967,6 +986,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -976,6 +995,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
|
||||
@Override
|
||||
public int getHighestBlockYAt(int x, int z, org.bukkit.HeightMap heightMap) {
|
||||
@ -86,7 +86,7 @@ index f2e4494a31dd7ca7e099c6960a9e6378ecac8727..51e709beb32499f2f56189a0426bba93
|
||||
// Transient load for this tick
|
||||
return this.world.getChunk(x >> 4, z >> 4).getHeight(CraftHeightMap.toNMS(heightMap), x, z);
|
||||
}
|
||||
@@ -2400,6 +2420,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -2398,6 +2418,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
// Spigot end
|
||||
// Paper start
|
||||
public java.util.concurrent.CompletableFuture<Chunk> getChunkAtAsync(int x, int z, boolean gen, boolean urgent) {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Custom Chat Completion Suggestions API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index c5175427fdb6e990c47c014f99d1784959d83658..ccc706733689f07f9b4e1635db4a0259817f71aa 100644
|
||||
index 15f2dec16042c79303b88b6dfb1ba17ec13a5f56..7d0cf5cba735b3726d8d9594ce0ac88360149680 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -613,6 +613,24 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -688,6 +688,24 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
}
|
||||
// Paper end - Add sendOpLevel API
|
||||
|
@ -10,7 +10,7 @@ potentially waterlogged block states fading.
|
||||
Co-authored-by: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/FrogspawnBlock.java b/src/main/java/net/minecraft/world/level/block/FrogspawnBlock.java
|
||||
index 6e283e8c3db31f03dd95c94887e647b8d82a3604..1a842694c076d71b14733904c2052183d86d1f5d 100644
|
||||
index a3339b47165814238351d307c729af14d5e5d1ff..2c076a5b23c09f634fa6807c207e5e06e1795e8a 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/FrogspawnBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/FrogspawnBlock.java
|
||||
@@ -92,6 +92,11 @@ public class FrogspawnBlock extends Block {
|
||||
@ -26,7 +26,7 @@ index 6e283e8c3db31f03dd95c94887e647b8d82a3604..1a842694c076d71b14733904c2052183
|
||||
world.playSound(null, pos, SoundEvents.FROGSPAWN_HATCH, SoundSource.BLOCKS, 1.0F, 1.0F);
|
||||
this.spawnTadpoles(world, pos, random);
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/ScaffoldingBlock.java b/src/main/java/net/minecraft/world/level/block/ScaffoldingBlock.java
|
||||
index f660e58badfcc2a90e6dd618428a21bf5ad34969..13ee09f93ec325e416a2b29e3608e870e7f06aed 100644
|
||||
index 580c77eeaf88083f2aed2e46e6c57dc1fcf9564c..f4cccbc134b33758cd553a29b9f8e9967517500d 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/ScaffoldingBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/ScaffoldingBlock.java
|
||||
@@ -103,7 +103,7 @@ public class ScaffoldingBlock extends Block implements SimpleWaterloggedBlock {
|
||||
@ -39,7 +39,7 @@ index f660e58badfcc2a90e6dd618428a21bf5ad34969..13ee09f93ec325e416a2b29e3608e870
|
||||
FallingBlockEntity.fall(world, pos, iblockdata1);
|
||||
} else {
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/SnifferEggBlock.java b/src/main/java/net/minecraft/world/level/block/SnifferEggBlock.java
|
||||
index 41bc7180d7657d43215fcb283afe1a9ccdd54e9d..1ff0e5c120418c3e5f92326580af7254fb4c699f 100644
|
||||
index 1eda49c9ce8ee009cb08b18f02f59b37c2118628..38288f20306632e6546c95b4cb1a42806be49975 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/SnifferEggBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/SnifferEggBlock.java
|
||||
@@ -60,12 +60,26 @@ public class SnifferEggBlock extends Block {
|
@ -5,7 +5,7 @@ Subject: [PATCH] Collision API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
|
||||
index fbcf1320ef9c1817b24aa8724cd6cf07319c20b9..5680e9772a2d90e997d2d0aacdda9eddb7edef56 100644
|
||||
index d1c265733941874002f6dfc7543917af88600659..72c275d7da798ee10a224bbd3f4c92abd82601e1 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
|
||||
@@ -539,5 +539,12 @@ public abstract class CraftRegionAccessor implements RegionAccessor {
|
||||
@ -22,10 +22,10 @@ index fbcf1320ef9c1817b24aa8724cd6cf07319c20b9..5680e9772a2d90e997d2d0aacdda9edd
|
||||
// Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
index 79e58d7a72a599cd84d479be62f72c523e37dd07..f6d6b2c7aefc39a6e6e2b0e61fd9afb334bee764 100644
|
||||
index b6fef2ca5b564c293cb602cb8e300d35dba89b1f..92c80776273f6be43b40686c7ab7dd7371b1c06f 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
@@ -1164,4 +1164,20 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
@@ -1174,4 +1174,20 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
return this.getHandle().noPhysics;
|
||||
}
|
||||
// Paper end - missing entity api
|
@ -6,10 +6,10 @@ Subject: [PATCH] Fix suggest command message for brigadier syntax exceptions
|
||||
This is a bug accidentally introduced in upstream CB
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java
|
||||
index 8be58d29f2a4753a241e68bd305b3e30186ca0e9..dd7c1ac97505ce7a846aa8ee91bb654d060acc1a 100644
|
||||
index 412c21ce2dcd772e525432efadff7e1340cb58e9..4114e2b148baf9ddc489eed11fed4aacd0eab401 100644
|
||||
--- a/src/main/java/net/minecraft/commands/Commands.java
|
||||
+++ b/src/main/java/net/minecraft/commands/Commands.java
|
||||
@@ -392,7 +392,7 @@ public class Commands {
|
||||
@@ -395,7 +395,7 @@ public class Commands {
|
||||
if (commandsyntaxexception.getInput() != null && commandsyntaxexception.getCursor() >= 0) {
|
||||
int i = Math.min(commandsyntaxexception.getInput().length(), commandsyntaxexception.getCursor());
|
||||
MutableComponent ichatmutablecomponent = Component.empty().withStyle(ChatFormatting.GRAY).withStyle((chatmodifier) -> {
|
@ -46,10 +46,10 @@ index 6d10396347b69d9243ab902ecc68ede93fa17b7d..af219df5267589300f0ad1d30fa5c81a
|
||||
// Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java
|
||||
index a4252f9078c3ab7e458504496ebcdeb6875724d1..37c5d66dafd877d2231c8d191f5a84748bf24551 100644
|
||||
index 48e8d0cc267706d3d8e29333d7fd6b89fdd88553..841b6cabd319229bff9f830c2fe4de102ad74906 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java
|
||||
@@ -735,4 +735,11 @@ public class CraftBlockData implements BlockData {
|
||||
@@ -736,4 +736,11 @@ public class CraftBlockData implements BlockData {
|
||||
return speed;
|
||||
}
|
||||
// Paper end - destroy speed API
|
@ -106,10 +106,10 @@ index 0000000000000000000000000000000000000000..3c31ff3330c2e925e205c0c9ff4f0b83
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index 608d860b940dee870a3df3d52efaed5e9eab17cf..5675931fe3ea896027a510944fc484f41f5ef555 100644
|
||||
index 784788d8d3d1a07efbd406b6c463e046699081e2..fdff82ed5dbf5176d470b9b6c41acfe6b98c7039 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -274,13 +274,20 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -287,13 +287,20 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
this.server.enablePlugins(org.bukkit.plugin.PluginLoadOrder.STARTUP);
|
||||
// CraftBukkit end
|
||||
|
||||
@ -134,20 +134,20 @@ index 608d860b940dee870a3df3d52efaed5e9eab17cf..5675931fe3ea896027a510944fc484f4
|
||||
DedicatedServer.LOGGER.warn("While this makes the game possible to play without internet access, it also opens up the ability for hackers to connect with any username they choose.");
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
index fb582acfe9e5cb68314ee39e1d54a550d6700e76..b8d8f14c30786321949901ca5184c43bee716355 100644
|
||||
index 49627a02cb15e94e7c3ddfe65aa663d982a34408..21d97c2b533a6528dd73c4e514d49273c120e171 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
@@ -64,6 +64,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||
private final String serverId;
|
||||
@@ -84,6 +84,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||
private final boolean transferred;
|
||||
private ServerPlayer player; // CraftBukkit
|
||||
public boolean iKnowThisMayNotBeTheBestIdeaButPleaseDisableUsernameValidation = false; // Paper - username validation overriding
|
||||
+ private int velocityLoginMessageId = -1; // Paper - Add Velocity IP Forwarding Support
|
||||
|
||||
public ServerLoginPacketListenerImpl(MinecraftServer server, Connection connection) {
|
||||
public ServerLoginPacketListenerImpl(MinecraftServer server, Connection connection, boolean transferred) {
|
||||
this.state = ServerLoginPacketListenerImpl.State.HELLO;
|
||||
@@ -149,6 +150,16 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||
@@ -176,6 +177,16 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||
this.state = ServerLoginPacketListenerImpl.State.KEY;
|
||||
this.connection.send(new ClientboundHelloPacket("", this.server.getKeyPair().getPublic().getEncoded(), this.challenge));
|
||||
this.connection.send(new ClientboundHelloPacket("", this.server.getKeyPair().getPublic().getEncoded(), this.challenge, true));
|
||||
} else {
|
||||
+ // Paper start - Add Velocity IP Forwarding Support
|
||||
+ if (io.papermc.paper.configuration.GlobalConfiguration.get().proxies.velocity.enabled) {
|
||||
@ -162,7 +162,7 @@ index fb582acfe9e5cb68314ee39e1d54a550d6700e76..b8d8f14c30786321949901ca5184c43b
|
||||
// CraftBukkit start
|
||||
// Paper start - Cache authenticator threads
|
||||
authenticatorPool.execute(new Runnable() {
|
||||
@@ -289,6 +300,12 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||
@@ -328,6 +339,12 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||
|
||||
// CraftBukkit start
|
||||
private GameProfile callPlayerPreLoginEvents(GameProfile gameprofile) throws Exception { // Paper - Add more fields to AsyncPlayerPreLoginEvent
|
||||
@ -175,7 +175,7 @@ index fb582acfe9e5cb68314ee39e1d54a550d6700e76..b8d8f14c30786321949901ca5184c43b
|
||||
String playerName = gameprofile.getName();
|
||||
java.net.InetAddress address = ((java.net.InetSocketAddress) this.connection.getRemoteAddress()).getAddress();
|
||||
java.util.UUID uniqueId = gameprofile.getId();
|
||||
@@ -334,6 +351,51 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||
@@ -373,6 +390,51 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||
|
||||
@Override
|
||||
public void handleCustomQueryPacket(ServerboundCustomQueryAnswerPacket packet) {
|
||||
@ -224,11 +224,11 @@ index fb582acfe9e5cb68314ee39e1d54a550d6700e76..b8d8f14c30786321949901ca5184c43b
|
||||
+ return;
|
||||
+ }
|
||||
+ // Paper end - Add Velocity IP Forwarding Support
|
||||
this.disconnect(ServerLoginPacketListenerImpl.DISCONNECT_UNEXPECTED_QUERY);
|
||||
this.disconnect(ServerCommonPacketListenerImpl.DISCONNECT_UNEXPECTED_QUERY);
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index e849e706660bf0b0ef1748dfee3ba75e5aff9863..10450a2bb6973a647fb6969d3c142e7a6a1011a4 100644
|
||||
index d2a02210553363fb87882904abcfbe2ccd95fa78..d5575fcc1458fe3083821792f09f9ed53c12e825 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -815,7 +815,7 @@ public final class CraftServer implements Server {
|
@ -1,19 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Nassim Jahnke <nassim@njahnke.dev>
|
||||
Date: Thu, 2 Jun 2022 20:35:58 +0200
|
||||
Subject: [PATCH] Disable component selector resolving in books by default
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/item/WrittenBookItem.java b/src/main/java/net/minecraft/world/item/WrittenBookItem.java
|
||||
index 81bb0abea7ebd2705f84fae31e4a3d2de92d7d18..793ab8acd7445984cff2628e3f001661dc20c8e5 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/WrittenBookItem.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/WrittenBookItem.java
|
||||
@@ -112,7 +112,7 @@ public class WrittenBookItem extends Item {
|
||||
|
||||
public static boolean resolveBookComponents(ItemStack book, @Nullable CommandSourceStack commandSource, @Nullable Player player) {
|
||||
CompoundTag compoundTag = book.getTag();
|
||||
- if (compoundTag != null && !compoundTag.getBoolean("resolved")) {
|
||||
+ if (io.papermc.paper.configuration.GlobalConfiguration.get().itemValidation.resolveSelectorsInBooks && compoundTag != null && !compoundTag.getBoolean("resolved")) { // Paper - Disable component selector resolving in books by default
|
||||
compoundTag.putBoolean("resolved", true);
|
||||
if (!makeSureTagIsValid(compoundTag)) {
|
||||
return false;
|
Loading…
Reference in New Issue
Block a user