Patches!!! MORE MORE MORE MOOOOORE

This commit is contained in:
Owen1212055 2023-12-06 11:34:54 -05:00
parent cd61b5d98e
commit 9546b9c587
No known key found for this signature in database
GPG Key ID: 2133292072886A30
73 changed files with 265 additions and 267 deletions

View File

@ -6,10 +6,10 @@ Subject: [PATCH] Call BlockGrowEvent for missing blocks
Call the event for pitcher crops and sniffer egg Call the event for pitcher crops and sniffer egg
diff --git a/src/main/java/net/minecraft/world/level/block/PitcherCropBlock.java b/src/main/java/net/minecraft/world/level/block/PitcherCropBlock.java diff --git a/src/main/java/net/minecraft/world/level/block/PitcherCropBlock.java b/src/main/java/net/minecraft/world/level/block/PitcherCropBlock.java
index aca205d641b4a87d093b140585cf04fa4fefca86..1641453fd17938bc8fcdba7f89a0515ebeef20c5 100644 index ba94ff948ccaddc16d3452306722759c115bb90a..acaa13f195467c3ebe70677b8440a88369d41b06 100644
--- a/src/main/java/net/minecraft/world/level/block/PitcherCropBlock.java --- a/src/main/java/net/minecraft/world/level/block/PitcherCropBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/PitcherCropBlock.java +++ b/src/main/java/net/minecraft/world/level/block/PitcherCropBlock.java
@@ -123,7 +123,7 @@ public class PitcherCropBlock extends DoublePlantBlock implements BonemealableBl @@ -130,7 +130,7 @@ public class PitcherCropBlock extends DoublePlantBlock implements BonemealableBl
int i = Math.min(state.getValue(AGE) + amount, 4); int i = Math.min(state.getValue(AGE) + amount, 4);
if (this.canGrow(world, pos, state, i)) { if (this.canGrow(world, pos, state, i)) {
BlockState blockState = state.setValue(AGE, Integer.valueOf(i)); BlockState blockState = state.setValue(AGE, Integer.valueOf(i));
@ -19,10 +19,10 @@ index aca205d641b4a87d093b140585cf04fa4fefca86..1641453fd17938bc8fcdba7f89a0515e
world.setBlock(pos.above(), blockState.setValue(HALF, DoubleBlockHalf.UPPER), 3); world.setBlock(pos.above(), blockState.setValue(HALF, DoubleBlockHalf.UPPER), 3);
} }
diff --git a/src/main/java/net/minecraft/world/level/block/SnifferEggBlock.java b/src/main/java/net/minecraft/world/level/block/SnifferEggBlock.java 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 ecb8224beb0ee65855c7529b69ea56b7b6674664..fab44502b3e22eb8d1311068f88290ce31adb437 100644 index 6c025c0fac9bd6373b99e374b773ca626d47ee6d..02939518ead6463e677ecf5b045ec89aae154e8c 100644
--- a/src/main/java/net/minecraft/world/level/block/SnifferEggBlock.java --- a/src/main/java/net/minecraft/world/level/block/SnifferEggBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/SnifferEggBlock.java +++ b/src/main/java/net/minecraft/world/level/block/SnifferEggBlock.java
@@ -65,8 +65,13 @@ public class SnifferEggBlock extends Block { @@ -72,8 +72,13 @@ public class SnifferEggBlock extends Block {
@Override @Override
public void tick(BlockState state, ServerLevel world, BlockPos pos, RandomSource random) { public void tick(BlockState state, ServerLevel world, BlockPos pos, RandomSource random) {
if (!this.isReadyToHatch(state)) { if (!this.isReadyToHatch(state)) {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Don't enforce icanhasbukkit default if alias block exists
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 7376d3acb27edd7209916e9e9df4ce9b9514e50c..4d2443f40dc2e1b38b7c80e7b5f9ca7a4f84c107 100644 index 97a32d1d4bc4042c72c488eee92dff69f8336464..d1d81ad90ee1c007b46c9afd1f4e918af2834d38 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -361,7 +361,11 @@ public final class CraftServer implements Server { @@ -356,7 +356,11 @@ public final class CraftServer implements Server {
} }
this.commandsConfiguration = YamlConfiguration.loadConfiguration(this.getCommandsConfigFile()); this.commandsConfiguration = YamlConfiguration.loadConfiguration(this.getCommandsConfigFile());
this.commandsConfiguration.options().copyDefaults(true); this.commandsConfiguration.options().copyDefaults(true);

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Add method to remove all active potion effects
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index 1ad5a4703f7164bb530262e1459dc73302cc8e48..6be370a2be88aac6e229210ef625380171504693 100644 index c7381ceae2d15738b72d6bb48ea7d40f7de11c3e..ba2cd9c4cdbd5ddab1300320d7e0ede4d4b7a31a 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -503,6 +503,13 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { @@ -504,6 +504,13 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
return effects; return effects;
} }

View File

@ -6,7 +6,7 @@ Subject: [PATCH] Temp: Pre-init PlayerChunkLoaderData in order to prepopulate
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index ab4cf79e297ada08a0a5e2cbf294a70f9e87c635..c737c5d62407337d3db2899cfc01713a058a6467 100644 index f37ac6edc60545600ccd22bfac072585d11b449b..4b457cbfc56e55e0ae0fee5b69e2e75349702aab 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java --- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -368,6 +368,7 @@ public class Main { @@ -368,6 +368,7 @@ public class Main {

View File

@ -10,7 +10,7 @@ The underlying issue of this is that the client modifies their synced data value
them in order for the client to reset their using item state. them in order for the client to reset their using item state.
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
index e8ad6a1e497f399c5d8cd6a6ec192ddc932e3fb9..1a895a511d8bb20bcaf6ae5534ca70529d65951e 100644 index f58386e952d29a16d160b628a23efbe102791277..82f26186156a487f29ad3abff3f68852e5b8a1f9 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java --- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
@@ -557,6 +557,7 @@ public class ServerPlayerGameMode { @@ -557,6 +557,7 @@ public class ServerPlayerGameMode {
@ -34,10 +34,10 @@ index e8ad6a1e497f399c5d8cd6a6ec192ddc932e3fb9..1a895a511d8bb20bcaf6ae5534ca7052
return enuminteractionresult; return enuminteractionresult;
// CraftBukkit end // CraftBukkit end
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index dc50f0c4514cc239a4639a03e4edbda5c258b867..8b0bcaa4239a0966cf7b7676525c1ab69c25f534 100644 index 28c61453d37132f9bab143202b7d59d368020f6a..09e5d0790b87a4747dd50eb790cdd1ce83de2550 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1924,6 +1924,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @@ -1951,6 +1951,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
} }
if (cancelled) { if (cancelled) {
@ -46,10 +46,10 @@ index dc50f0c4514cc239a4639a03e4edbda5c258b867..8b0bcaa4239a0966cf7b7676525c1ab6
return; return;
} }
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 371f6d2539eac7161a86bb64763b4ee228eccbdf..6d4d46163ffcffa98f400c2656703eb5c4818f40 100644 index f359f63ac8cf3133b63096dad4e3142c6c4b1cbf..bed0a01be1703aad8fbfa549d5799e3f84759f32 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -3811,6 +3811,11 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -3813,6 +3813,11 @@ public abstract class LivingEntity extends Entity implements Attackable {
return ((Byte) this.entityData.get(LivingEntity.DATA_LIVING_ENTITY_FLAGS) & 2) > 0 ? InteractionHand.OFF_HAND : InteractionHand.MAIN_HAND; return ((Byte) this.entityData.get(LivingEntity.DATA_LIVING_ENTITY_FLAGS) & 2) > 0 ? InteractionHand.OFF_HAND : InteractionHand.MAIN_HAND;
} }

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Add event for player editing sign
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
index 6e2c62336537fba187fbbb47c1f52f935683c0d5..21b3be35da5636fa726f36f569142de5d16ac1f3 100644 index ef2f9cae4b06a020f0b9209b69316733df055438..d4df53d022eb58cf43d787ed84bd94fdf1684d69 100644
--- a/src/main/java/net/minecraft/world/item/ItemStack.java --- a/src/main/java/net/minecraft/world/item/ItemStack.java
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java
@@ -502,7 +502,7 @@ public final class ItemStack { @@ -523,7 +523,7 @@ public final class ItemStack {
try { try {
if (world.getBlockEntity(SignItem.openSign) instanceof SignBlockEntity tileentitysign) { if (world.getBlockEntity(SignItem.openSign) instanceof SignBlockEntity tileentitysign) {
if (world.getBlockState(SignItem.openSign).getBlock() instanceof SignBlock blocksign) { if (world.getBlockState(SignItem.openSign).getBlock() instanceof SignBlock blocksign) {
@ -18,10 +18,10 @@ index 6e2c62336537fba187fbbb47c1f52f935683c0d5..21b3be35da5636fa726f36f569142de5
} }
} finally { } finally {
diff --git a/src/main/java/net/minecraft/world/level/block/SignBlock.java b/src/main/java/net/minecraft/world/level/block/SignBlock.java diff --git a/src/main/java/net/minecraft/world/level/block/SignBlock.java b/src/main/java/net/minecraft/world/level/block/SignBlock.java
index 1a1f57cad2eeb5fa1d57e6a07e201ee77065ec90..0c1c6fbcf625da4a28514e0d040deb6c98ba9507 100644 index 8d7295a949280f233d12d24894cd9dd07af1e325..28cba43e42354b87e08ef87b70c274a2fdc0bb48 100644
--- a/src/main/java/net/minecraft/world/level/block/SignBlock.java --- a/src/main/java/net/minecraft/world/level/block/SignBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/SignBlock.java +++ b/src/main/java/net/minecraft/world/level/block/SignBlock.java
@@ -115,7 +115,7 @@ public abstract class SignBlock extends BaseEntityBlock implements SimpleWaterlo @@ -118,7 +118,7 @@ public abstract class SignBlock extends BaseEntityBlock implements SimpleWaterlo
} else if (flag2) { } else if (flag2) {
return InteractionResult.SUCCESS; return InteractionResult.SUCCESS;
} else if (!this.otherPlayerIsEditingSign(player, tileentitysign) && player.mayBuild() && this.hasEditableText(player, tileentitysign, flag1)) { } else if (!this.otherPlayerIsEditingSign(player, tileentitysign) && player.mayBuild() && this.hasEditableText(player, tileentitysign, flag1)) {
@ -30,7 +30,7 @@ index 1a1f57cad2eeb5fa1d57e6a07e201ee77065ec90..0c1c6fbcf625da4a28514e0d040deb6c
return this.getInteractionResult(flag); return this.getInteractionResult(flag);
} else { } else {
return InteractionResult.PASS; return InteractionResult.PASS;
@@ -167,16 +167,33 @@ public abstract class SignBlock extends BaseEntityBlock implements SimpleWaterlo @@ -170,16 +170,33 @@ public abstract class SignBlock extends BaseEntityBlock implements SimpleWaterlo
return blockpropertywood; return blockpropertywood;
} }

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Improve command function perm level checks
diff --git a/src/main/java/net/minecraft/commands/CommandSourceStack.java b/src/main/java/net/minecraft/commands/CommandSourceStack.java diff --git a/src/main/java/net/minecraft/commands/CommandSourceStack.java b/src/main/java/net/minecraft/commands/CommandSourceStack.java
index 0112035219b21550ca14fa1755c43a5547ca4136..56ae02aab93b9a698e9d2f07a0448aa4767169d9 100644 index 20b2cbbc73f6420b6ace9746016527b90d9f01b9..14f4c0a93372a58cf36dc95265b5e210ea1605e5 100644
--- a/src/main/java/net/minecraft/commands/CommandSourceStack.java --- a/src/main/java/net/minecraft/commands/CommandSourceStack.java
+++ b/src/main/java/net/minecraft/commands/CommandSourceStack.java +++ b/src/main/java/net/minecraft/commands/CommandSourceStack.java
@@ -212,8 +212,14 @@ public class CommandSourceStack implements SharedSuggestionProvider, com.destroy @@ -206,8 +206,14 @@ public class CommandSourceStack implements ExecutionCommandSource<CommandSourceS
// CraftBukkit start // CraftBukkit start
public boolean hasPermission(int i, String bukkitPermission) { public boolean hasPermission(int i, String bukkitPermission) {

View File

@ -5,18 +5,18 @@ Subject: [PATCH] Add option to disable block updates
diff --git a/src/main/java/net/minecraft/world/level/block/ChorusPlantBlock.java b/src/main/java/net/minecraft/world/level/block/ChorusPlantBlock.java diff --git a/src/main/java/net/minecraft/world/level/block/ChorusPlantBlock.java b/src/main/java/net/minecraft/world/level/block/ChorusPlantBlock.java
index a6c25647fb37f59307de0d390f8e8cf55504d7d3..2e8bf4463b8da8da50cd14d3f84aba5e930e5710 100644 index a0f63f17eb4e4bcf986f0573dc13be5c11c37f15..d811ed3623446000d3aa0be59c573f7c759bf55a 100644
--- a/src/main/java/net/minecraft/world/level/block/ChorusPlantBlock.java --- a/src/main/java/net/minecraft/world/level/block/ChorusPlantBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/ChorusPlantBlock.java +++ b/src/main/java/net/minecraft/world/level/block/ChorusPlantBlock.java
@@ -21,6 +21,7 @@ public class ChorusPlantBlock extends PipeBlock { @@ -29,6 +29,7 @@ public class ChorusPlantBlock extends PipeBlock {
@Override @Override
public BlockState getStateForPlacement(BlockPlaceContext ctx) { public BlockState getStateForPlacement(BlockPlaceContext ctx) {
+ if (io.papermc.paper.configuration.GlobalConfiguration.get().blockUpdates.disableChorusPlantUpdates) return this.defaultBlockState(); // Paper - add option to disable block updates + if (io.papermc.paper.configuration.GlobalConfiguration.get().blockUpdates.disableChorusPlantUpdates) return this.defaultBlockState(); // Paper - add option to disable block updates
return this.getStateForPlacement(ctx.getLevel(), ctx.getClickedPos()); return getStateWithConnections(ctx.getLevel(), ctx.getClickedPos(), this.defaultBlockState());
} }
@@ -36,6 +37,7 @@ public class ChorusPlantBlock extends PipeBlock { @@ -45,6 +46,7 @@ public class ChorusPlantBlock extends PipeBlock {
@Override @Override
public BlockState updateShape(BlockState state, Direction direction, BlockState neighborState, LevelAccessor world, BlockPos pos, BlockPos neighborPos) { public BlockState updateShape(BlockState state, Direction direction, BlockState neighborState, LevelAccessor world, BlockPos pos, BlockPos neighborPos) {
@ -24,7 +24,7 @@ index a6c25647fb37f59307de0d390f8e8cf55504d7d3..2e8bf4463b8da8da50cd14d3f84aba5e
if (!state.canSurvive(world, pos)) { if (!state.canSurvive(world, pos)) {
world.scheduleTick(pos, this, 1); world.scheduleTick(pos, this, 1);
return super.updateShape(state, direction, neighborState, world, pos, neighborPos); return super.updateShape(state, direction, neighborState, world, pos, neighborPos);
@@ -47,6 +49,7 @@ public class ChorusPlantBlock extends PipeBlock { @@ -56,6 +58,7 @@ public class ChorusPlantBlock extends PipeBlock {
@Override @Override
public void tick(BlockState state, ServerLevel world, BlockPos pos, RandomSource random) { public void tick(BlockState state, ServerLevel world, BlockPos pos, RandomSource random) {
@ -32,7 +32,7 @@ index a6c25647fb37f59307de0d390f8e8cf55504d7d3..2e8bf4463b8da8da50cd14d3f84aba5e
if (!state.canSurvive(world, pos)) { if (!state.canSurvive(world, pos)) {
world.destroyBlock(pos, true); world.destroyBlock(pos, true);
} }
@@ -55,6 +58,7 @@ public class ChorusPlantBlock extends PipeBlock { @@ -64,6 +67,7 @@ public class ChorusPlantBlock extends PipeBlock {
@Override @Override
public boolean canSurvive(BlockState state, LevelReader world, BlockPos pos) { public boolean canSurvive(BlockState state, LevelReader world, BlockPos pos) {
@ -41,10 +41,10 @@ index a6c25647fb37f59307de0d390f8e8cf55504d7d3..2e8bf4463b8da8da50cd14d3f84aba5e
boolean bl = !world.getBlockState(pos.above()).isAir() && !blockState.isAir(); boolean bl = !world.getBlockState(pos.above()).isAir() && !blockState.isAir();
diff --git a/src/main/java/net/minecraft/world/level/block/HugeMushroomBlock.java b/src/main/java/net/minecraft/world/level/block/HugeMushroomBlock.java diff --git a/src/main/java/net/minecraft/world/level/block/HugeMushroomBlock.java b/src/main/java/net/minecraft/world/level/block/HugeMushroomBlock.java
index 3c6d97b51c6fec130b80e5965afa2c49d48843c9..1dd44eb0ab977093660e8fe6f49338e7f5ef7b28 100644 index 4fe30b867d7fc39c53307496458b3e438d4f2397..e049e702f58053431bf3e438ea37850c86ae3b7b 100644
--- a/src/main/java/net/minecraft/world/level/block/HugeMushroomBlock.java --- a/src/main/java/net/minecraft/world/level/block/HugeMushroomBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/HugeMushroomBlock.java +++ b/src/main/java/net/minecraft/world/level/block/HugeMushroomBlock.java
@@ -27,6 +27,7 @@ public class HugeMushroomBlock extends Block { @@ -34,6 +34,7 @@ public class HugeMushroomBlock extends Block {
@Override @Override
public BlockState getStateForPlacement(BlockPlaceContext ctx) { public BlockState getStateForPlacement(BlockPlaceContext ctx) {
@ -52,7 +52,7 @@ index 3c6d97b51c6fec130b80e5965afa2c49d48843c9..1dd44eb0ab977093660e8fe6f49338e7
BlockGetter blockGetter = ctx.getLevel(); BlockGetter blockGetter = ctx.getLevel();
BlockPos blockPos = ctx.getClickedPos(); BlockPos blockPos = ctx.getClickedPos();
return this.defaultBlockState().setValue(DOWN, Boolean.valueOf(!blockGetter.getBlockState(blockPos.below()).is(this))).setValue(UP, Boolean.valueOf(!blockGetter.getBlockState(blockPos.above()).is(this))).setValue(NORTH, Boolean.valueOf(!blockGetter.getBlockState(blockPos.north()).is(this))).setValue(EAST, Boolean.valueOf(!blockGetter.getBlockState(blockPos.east()).is(this))).setValue(SOUTH, Boolean.valueOf(!blockGetter.getBlockState(blockPos.south()).is(this))).setValue(WEST, Boolean.valueOf(!blockGetter.getBlockState(blockPos.west()).is(this))); return this.defaultBlockState().setValue(DOWN, Boolean.valueOf(!blockGetter.getBlockState(blockPos.below()).is(this))).setValue(UP, Boolean.valueOf(!blockGetter.getBlockState(blockPos.above()).is(this))).setValue(NORTH, Boolean.valueOf(!blockGetter.getBlockState(blockPos.north()).is(this))).setValue(EAST, Boolean.valueOf(!blockGetter.getBlockState(blockPos.east()).is(this))).setValue(SOUTH, Boolean.valueOf(!blockGetter.getBlockState(blockPos.south()).is(this))).setValue(WEST, Boolean.valueOf(!blockGetter.getBlockState(blockPos.west()).is(this)));
@@ -34,16 +35,19 @@ public class HugeMushroomBlock extends Block { @@ -41,16 +42,19 @@ public class HugeMushroomBlock extends Block {
@Override @Override
public BlockState updateShape(BlockState state, Direction direction, BlockState neighborState, LevelAccessor world, BlockPos pos, BlockPos neighborPos) { public BlockState updateShape(BlockState state, Direction direction, BlockState neighborState, LevelAccessor world, BlockPos pos, BlockPos neighborPos) {
@ -73,10 +73,10 @@ index 3c6d97b51c6fec130b80e5965afa2c49d48843c9..1dd44eb0ab977093660e8fe6f49338e7
} }
diff --git a/src/main/java/net/minecraft/world/level/block/NoteBlock.java b/src/main/java/net/minecraft/world/level/block/NoteBlock.java diff --git a/src/main/java/net/minecraft/world/level/block/NoteBlock.java b/src/main/java/net/minecraft/world/level/block/NoteBlock.java
index 910864cfeac085648e6c671b0f9480417324d36e..e46d84750bdd7c940f400efda226e12a3fdc3848 100644 index f32334f9e0f13a227bef8ffb135dda82b2ec39f2..ff16075fbfe664c73a46bc4b002450867974114e 100644
--- a/src/main/java/net/minecraft/world/level/block/NoteBlock.java --- a/src/main/java/net/minecraft/world/level/block/NoteBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/NoteBlock.java +++ b/src/main/java/net/minecraft/world/level/block/NoteBlock.java
@@ -58,11 +58,13 @@ public class NoteBlock extends Block { @@ -65,11 +65,13 @@ public class NoteBlock extends Block {
@Override @Override
public BlockState getStateForPlacement(BlockPlaceContext ctx) { public BlockState getStateForPlacement(BlockPlaceContext ctx) {
@ -90,7 +90,7 @@ index 910864cfeac085648e6c671b0f9480417324d36e..e46d84750bdd7c940f400efda226e12a
boolean flag = direction.getAxis() == Direction.Axis.Y; boolean flag = direction.getAxis() == Direction.Axis.Y;
return flag ? this.setInstrument(world, pos, state) : super.updateShape(state, direction, neighborState, world, pos, neighborPos); return flag ? this.setInstrument(world, pos, state) : super.updateShape(state, direction, neighborState, world, pos, neighborPos);
@@ -70,6 +72,7 @@ public class NoteBlock extends Block { @@ -77,6 +79,7 @@ public class NoteBlock extends Block {
@Override @Override
public void neighborChanged(BlockState state, Level world, BlockPos pos, Block sourceBlock, BlockPos sourcePos, boolean notify) { public void neighborChanged(BlockState state, Level world, BlockPos pos, Block sourceBlock, BlockPos sourcePos, boolean notify) {
@ -98,7 +98,7 @@ index 910864cfeac085648e6c671b0f9480417324d36e..e46d84750bdd7c940f400efda226e12a
boolean flag1 = world.hasNeighborSignal(pos); boolean flag1 = world.hasNeighborSignal(pos);
if (flag1 != (Boolean) state.getValue(NoteBlock.POWERED)) { if (flag1 != (Boolean) state.getValue(NoteBlock.POWERED)) {
@@ -107,7 +110,7 @@ public class NoteBlock extends Block { @@ -114,7 +117,7 @@ public class NoteBlock extends Block {
} else if (world.isClientSide) { } else if (world.isClientSide) {
return InteractionResult.SUCCESS; return InteractionResult.SUCCESS;
} else { } else {
@ -108,10 +108,10 @@ index 910864cfeac085648e6c671b0f9480417324d36e..e46d84750bdd7c940f400efda226e12a
this.playNote(player, state, world, pos); this.playNote(player, state, world, pos);
player.awardStat(Stats.TUNE_NOTEBLOCK); player.awardStat(Stats.TUNE_NOTEBLOCK);
diff --git a/src/main/java/net/minecraft/world/level/block/TripWireBlock.java b/src/main/java/net/minecraft/world/level/block/TripWireBlock.java diff --git a/src/main/java/net/minecraft/world/level/block/TripWireBlock.java b/src/main/java/net/minecraft/world/level/block/TripWireBlock.java
index a4ceb86f2c1bbd7d76d07532ed8a512722b01381..d78e5c5014f2af8c14ba5896d94b3100aaecedf9 100644 index 1a0c5fb62e80681604110e95c1ae7b3684c21946..2f947997ca746d18544940ef67ff550a95946edd 100644
--- a/src/main/java/net/minecraft/world/level/block/TripWireBlock.java --- a/src/main/java/net/minecraft/world/level/block/TripWireBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/TripWireBlock.java +++ b/src/main/java/net/minecraft/world/level/block/TripWireBlock.java
@@ -53,6 +53,7 @@ public class TripWireBlock extends Block { @@ -66,6 +66,7 @@ public class TripWireBlock extends Block {
@Override @Override
public BlockState getStateForPlacement(BlockPlaceContext ctx) { public BlockState getStateForPlacement(BlockPlaceContext ctx) {
@ -119,7 +119,7 @@ index a4ceb86f2c1bbd7d76d07532ed8a512722b01381..d78e5c5014f2af8c14ba5896d94b3100
Level world = ctx.getLevel(); Level world = ctx.getLevel();
BlockPos blockposition = ctx.getClickedPos(); BlockPos blockposition = ctx.getClickedPos();
@@ -61,11 +62,13 @@ public class TripWireBlock extends Block { @@ -74,11 +75,13 @@ public class TripWireBlock extends Block {
@Override @Override
public BlockState updateShape(BlockState state, Direction direction, BlockState neighborState, LevelAccessor world, BlockPos pos, BlockPos neighborPos) { public BlockState updateShape(BlockState state, Direction direction, BlockState neighborState, LevelAccessor world, BlockPos pos, BlockPos neighborPos) {
@ -133,7 +133,7 @@ index a4ceb86f2c1bbd7d76d07532ed8a512722b01381..d78e5c5014f2af8c14ba5896d94b3100
if (!oldState.is(state.getBlock())) { if (!oldState.is(state.getBlock())) {
this.updateSource(world, pos, state); this.updateSource(world, pos, state);
} }
@@ -73,6 +76,7 @@ public class TripWireBlock extends Block { @@ -86,6 +89,7 @@ public class TripWireBlock extends Block {
@Override @Override
public void onRemove(BlockState state, Level world, BlockPos pos, BlockState newState, boolean moved) { public void onRemove(BlockState state, Level world, BlockPos pos, BlockState newState, boolean moved) {
@ -141,15 +141,15 @@ index a4ceb86f2c1bbd7d76d07532ed8a512722b01381..d78e5c5014f2af8c14ba5896d94b3100
if (!moved && !state.is(newState.getBlock())) { if (!moved && !state.is(newState.getBlock())) {
this.updateSource(world, pos, (BlockState) state.setValue(TripWireBlock.POWERED, true), true); // Paper - fix state inconsistency this.updateSource(world, pos, (BlockState) state.setValue(TripWireBlock.POWERED, true), true); // Paper - fix state inconsistency
} }
@@ -80,6 +84,7 @@ public class TripWireBlock extends Block { @@ -93,6 +97,7 @@ public class TripWireBlock extends Block {
@Override @Override
public void playerWillDestroy(Level world, BlockPos pos, BlockState state, Player player) { public BlockState playerWillDestroy(Level world, BlockPos pos, BlockState state, Player player) {
+ if (io.papermc.paper.configuration.GlobalConfiguration.get().blockUpdates.disableTripwireUpdates) return; // Paper - prevent disarming tripwires + if (io.papermc.paper.configuration.GlobalConfiguration.get().blockUpdates.disableTripwireUpdates) return state; // Paper - prevent disarming tripwires
if (!world.isClientSide && !player.getMainHandItem().isEmpty() && player.getMainHandItem().is(Items.SHEARS)) { if (!world.isClientSide && !player.getMainHandItem().isEmpty() && player.getMainHandItem().is(Items.SHEARS)) {
world.setBlock(pos, (BlockState) state.setValue(TripWireBlock.DISARMED, true), 4); world.setBlock(pos, (BlockState) state.setValue(TripWireBlock.DISARMED, true), 4);
world.gameEvent((Entity) player, GameEvent.SHEAR, pos); world.gameEvent((Entity) player, GameEvent.SHEAR, pos);
@@ -89,6 +94,7 @@ public class TripWireBlock extends Block { @@ -102,6 +107,7 @@ public class TripWireBlock extends Block {
} }
private void updateSource(Level world, BlockPos pos, BlockState state) { private void updateSource(Level world, BlockPos pos, BlockState state) {
@ -157,7 +157,7 @@ index a4ceb86f2c1bbd7d76d07532ed8a512722b01381..d78e5c5014f2af8c14ba5896d94b3100
// Paper start - fix state inconsistency // Paper start - fix state inconsistency
this.updateSource(world, pos, state, false); this.updateSource(world, pos, state, false);
} }
@@ -127,6 +133,7 @@ public class TripWireBlock extends Block { @@ -140,6 +146,7 @@ public class TripWireBlock extends Block {
@Override @Override
public void entityInside(BlockState state, Level world, BlockPos pos, Entity entity) { public void entityInside(BlockState state, Level world, BlockPos pos, Entity entity) {
@ -165,7 +165,7 @@ index a4ceb86f2c1bbd7d76d07532ed8a512722b01381..d78e5c5014f2af8c14ba5896d94b3100
if (!new io.papermc.paper.event.entity.EntityInsideBlockEvent(entity.getBukkitEntity(), org.bukkit.craftbukkit.block.CraftBlock.at(world, pos)).callEvent()) { return; } // Paper if (!new io.papermc.paper.event.entity.EntityInsideBlockEvent(entity.getBukkitEntity(), org.bukkit.craftbukkit.block.CraftBlock.at(world, pos)).callEvent()) { return; } // Paper
if (!world.isClientSide) { if (!world.isClientSide) {
if (!(Boolean) state.getValue(TripWireBlock.POWERED)) { if (!(Boolean) state.getValue(TripWireBlock.POWERED)) {
@@ -137,6 +144,7 @@ public class TripWireBlock extends Block { @@ -150,6 +157,7 @@ public class TripWireBlock extends Block {
@Override @Override
public void tick(BlockState state, ServerLevel world, BlockPos pos, RandomSource random) { public void tick(BlockState state, ServerLevel world, BlockPos pos, RandomSource random) {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Call missing BlockDispenseEvent
diff --git a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java diff --git a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
index c0baec6ae9bd90410f47aa04d7c7704233375d1a..e9b748a81ec223a701b56d2dc890c9eb223d8474 100644 index dd017c33ff89a516022378160410bc41cce9222e..105bb94b844c5ee85b53aca95360e7b2caf374cc 100644
--- a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java --- a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
+++ b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java +++ b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
@@ -1106,6 +1106,13 @@ public interface DispenseItemBehavior { @@ -1114,6 +1114,13 @@ public interface DispenseItemBehavior {
this.setSuccess(true); this.setSuccess(true);
if (iblockdata.is(Blocks.RESPAWN_ANCHOR)) { if (iblockdata.is(Blocks.RESPAWN_ANCHOR)) {
if ((Integer) iblockdata.getValue(RespawnAnchorBlock.CHARGE) != 4) { if ((Integer) iblockdata.getValue(RespawnAnchorBlock.CHARGE) != 4) {
@ -22,7 +22,7 @@ index c0baec6ae9bd90410f47aa04d7c7704233375d1a..e9b748a81ec223a701b56d2dc890c9eb
RespawnAnchorBlock.charge((Entity) null, worldserver, blockposition, iblockdata); RespawnAnchorBlock.charge((Entity) null, worldserver, blockposition, iblockdata);
stack.shrink(1); stack.shrink(1);
} else { } else {
@@ -1128,6 +1135,13 @@ public interface DispenseItemBehavior { @@ -1136,6 +1143,13 @@ public interface DispenseItemBehavior {
Optional<BlockState> optional = HoneycombItem.getWaxed(iblockdata); Optional<BlockState> optional = HoneycombItem.getWaxed(iblockdata);
if (optional.isPresent()) { if (optional.isPresent()) {
@ -36,7 +36,7 @@ index c0baec6ae9bd90410f47aa04d7c7704233375d1a..e9b748a81ec223a701b56d2dc890c9eb
worldserver.setBlockAndUpdate(blockposition, (BlockState) optional.get()); worldserver.setBlockAndUpdate(blockposition, (BlockState) optional.get());
worldserver.levelEvent(3003, blockposition, 0); worldserver.levelEvent(3003, blockposition, 0);
stack.shrink(1); stack.shrink(1);
@@ -1153,6 +1167,12 @@ public interface DispenseItemBehavior { @@ -1161,6 +1175,12 @@ public interface DispenseItemBehavior {
if (!worldserver.getBlockState(blockposition1).is(BlockTags.CONVERTABLE_TO_MUD)) { if (!worldserver.getBlockState(blockposition1).is(BlockTags.CONVERTABLE_TO_MUD)) {
return this.defaultDispenseItemBehavior.dispense(pointer, stack); return this.defaultDispenseItemBehavior.dispense(pointer, stack);
} else { } else {
@ -50,10 +50,10 @@ index c0baec6ae9bd90410f47aa04d7c7704233375d1a..e9b748a81ec223a701b56d2dc890c9eb
for (int k = 0; k < 5; ++k) { for (int k = 0; k < 5; ++k) {
worldserver.sendParticles(ParticleTypes.SPLASH, (double) blockposition.getX() + worldserver.random.nextDouble(), (double) (blockposition.getY() + 1), (double) blockposition.getZ() + worldserver.random.nextDouble(), 1, 0.0D, 0.0D, 0.0D, 1.0D); worldserver.sendParticles(ParticleTypes.SPLASH, (double) blockposition.getX() + worldserver.random.nextDouble(), (double) (blockposition.getY() + 1), (double) blockposition.getZ() + worldserver.random.nextDouble(), 1, 0.0D, 0.0D, 0.0D, 1.0D);
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 81066d1d4e7a5818018469d5659c15dc2d5a43bf..e51a54275aeab85158ee9685b2f6d0f5f3a0b58a 100644 index 4c14bcf9396b4ee9649c4647b485797f6fce06f3..e4551a6d984928457af4fb6cc2d0bf3673ef8fb1 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -2102,6 +2102,32 @@ public class CraftEventFactory { @@ -2101,6 +2101,32 @@ public class CraftEventFactory {
} }
// Paper end // Paper end

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Don't load chunks for supporting block checks
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index e8a21de2434aa089079827eca16d803993d05c65..bf77b0dae2ca25437df7386d2196da24d681e2ed 100644 index dfa077ad2e632bc71be41917d5923edae12f7738..36a6eb05f983f0137590c8ed1ec154affd9cdbd3 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java --- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -1356,7 +1356,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { @@ -1361,7 +1361,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
} }
protected BlockPos getOnPos(float offset) { protected BlockPos getOnPos(float offset) {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Add Sign#getInteractableSideFor
diff --git a/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java diff --git a/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java
index e34f7426df5d6c94fcc4101b28702e6c1d9fccff..9eea2982e92e9bc7a53962dc6b21de60f9e5a4c7 100644 index 6a876198008d4c6487e96989c38c331b71818ad3..68f95a8eb4aa659e62394bf98ecd5f5d46879cbf 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java --- a/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java
@@ -64,13 +64,18 @@ public class SignBlockEntity extends BlockEntity implements CommandSource { // C @@ -66,13 +66,18 @@ public class SignBlockEntity extends BlockEntity implements CommandSource { // C
} }
public boolean isFacingFrontText(net.minecraft.world.entity.player.Player player) { public boolean isFacingFrontText(net.minecraft.world.entity.player.Player player) {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] fix item meta for tadpole buckets
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
index b72da22c626ff5c41e877209d9a5a2939526d18f..9469b0d5d8a46ac17c3998a4b537a4feb1deb3b0 100644 index 5f6b93be9e81df8fae9a5ab160a232b65ce7b8bc..c77634ec9c4e7a9eaacc81de7f95e9452b393a52 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
@@ -355,6 +355,7 @@ public final class CraftItemFactory implements ItemFactory { @@ -358,6 +358,7 @@ public final class CraftItemFactory implements ItemFactory {
case COD_BUCKET: case COD_BUCKET:
case PUFFERFISH_BUCKET: case PUFFERFISH_BUCKET:
case SALMON_BUCKET: case SALMON_BUCKET:
@ -17,10 +17,10 @@ index b72da22c626ff5c41e877209d9a5a2939526d18f..9469b0d5d8a46ac17c3998a4b537a4fe
case GLOW_ITEM_FRAME: case GLOW_ITEM_FRAME:
case PAINTING: case PAINTING:
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
index b758cf51923f9e227c287680287dc18525bed4a0..ff9e42299d46764cd53f72c730716102c6b8aa3c 100644 index 220ccd03d6f326b3747602e0e4e7ffee8173dc03..3660ad55cc7e1f6e571887aac9c0215803f1ce41 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
@@ -600,6 +600,7 @@ public final class CraftItemStack extends ItemStack { @@ -603,6 +603,7 @@ public final class CraftItemStack extends ItemStack {
case COD_BUCKET: case COD_BUCKET:
case PUFFERFISH_BUCKET: case PUFFERFISH_BUCKET:
case SALMON_BUCKET: case SALMON_BUCKET:

View File

@ -47,10 +47,10 @@ index f393e0844889c967d9e83d9a1e73c134fcb6e33b..f8996ee643a46db301577f6c523f24e9
CraftMetaArmor(Map<String, Object> map) { CraftMetaArmor(Map<String, Object> map) {
super(map); super(map);
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
index f6d2785b05b4c0a4393be706a90d7cc4388399bf..2510297df2f6ca80672c1dcbd35c0b1e0ce18ccb 100644 index cbf1a518406bf478811c737e6dabf0a8c451d16c..039197efb05432b8139fbabe92338572c1bf078e 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
@@ -489,7 +489,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @@ -490,7 +490,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
continue; continue;
} }

View File

@ -208,10 +208,10 @@ index 172202accf4448a933fcf1ff820316c7910dd7f7..50ee7656580d386db473c054f5c5ec57
return null; return null;
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index adc90af7ee07ce5f714bfc92b870c4d78e5c6dc9..daf519f6eb367ef2404d33929e69fe44b6f8bb07 100644 index 4c4594e96c57ae374bcf2d70004bd12d1da1b758..d252f0313b1d73758782249060e7c57afb5c5418 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1641,23 +1641,23 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -1648,23 +1648,23 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
} }
@Override @Override
@ -240,7 +240,7 @@ index adc90af7ee07ce5f714bfc92b870c4d78e5c6dc9..daf519f6eb367ef2404d33929e69fe44
if (kickPlayer) { if (kickPlayer) {
this.kickPlayer(reason); this.kickPlayer(reason);
} }
@@ -1665,12 +1665,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -1672,12 +1672,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
} }
@Override @Override
@ -256,10 +256,10 @@ index adc90af7ee07ce5f714bfc92b870c4d78e5c6dc9..daf519f6eb367ef2404d33929e69fe44
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/profile/CraftPlayerProfile.java b/src/main/java/org/bukkit/craftbukkit/profile/CraftPlayerProfile.java diff --git a/src/main/java/org/bukkit/craftbukkit/profile/CraftPlayerProfile.java b/src/main/java/org/bukkit/craftbukkit/profile/CraftPlayerProfile.java
index 533d143969592f9a4f4d1ea1660474264150f211..c08006a010606fac5d290889a3ad9fdf9008ee72 100644 index 6422c58907ee289359a11054fec1e4de6f495ae3..bc6151cfeb7ace4755414614723ee830081094af 100644
--- a/src/main/java/org/bukkit/craftbukkit/profile/CraftPlayerProfile.java --- a/src/main/java/org/bukkit/craftbukkit/profile/CraftPlayerProfile.java
+++ b/src/main/java/org/bukkit/craftbukkit/profile/CraftPlayerProfile.java +++ b/src/main/java/org/bukkit/craftbukkit/profile/CraftPlayerProfile.java
@@ -31,7 +31,7 @@ import org.bukkit.profile.PlayerProfile; @@ -28,7 +28,7 @@ import org.bukkit.profile.PlayerProfile;
import org.bukkit.profile.PlayerTextures; import org.bukkit.profile.PlayerTextures;
@SerializableAs("PlayerProfile") @SerializableAs("PlayerProfile")
@ -268,7 +268,7 @@ index 533d143969592f9a4f4d1ea1660474264150f211..c08006a010606fac5d290889a3ad9fdf
@Nonnull @Nonnull
public static GameProfile validateSkullProfile(@Nonnull GameProfile gameProfile) { public static GameProfile validateSkullProfile(@Nonnull GameProfile gameProfile) {
@@ -126,7 +126,7 @@ public final class CraftPlayerProfile implements PlayerProfile, com.destroystoky @@ -123,7 +123,7 @@ public final class CraftPlayerProfile implements PlayerProfile, com.destroystoky
} }
@Override @Override
@ -277,7 +277,7 @@ index 533d143969592f9a4f4d1ea1660474264150f211..c08006a010606fac5d290889a3ad9fdf
return CompletableFuture.supplyAsync(this::getUpdatedProfile, Util.PROFILE_EXECUTOR); // Paper - not a good idea to use BLOCKING OPERATIONS on the worldgen executor return CompletableFuture.supplyAsync(this::getUpdatedProfile, Util.PROFILE_EXECUTOR); // Paper - not a good idea to use BLOCKING OPERATIONS on the worldgen executor
} }
@@ -285,4 +285,71 @@ public final class CraftPlayerProfile implements PlayerProfile, com.destroystoky @@ -277,4 +277,71 @@ public final class CraftPlayerProfile implements PlayerProfile, com.destroystoky
// Paper - diff on change // Paper - diff on change
return profile; return profile;
} }

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Fix possible NPE on painting creation
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
index 7ef90fbdbcdb12ae0f3837fb003112115ab7ecfe..4289cce80f9861b809062a29c0d89b9dbd0ba8cd 100644 index 096e1cc920f5f48fe59b9419827c3cbb7adefe14..ee8819884868b70f2a3644141eca1d92abe2b7a8 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java --- a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
@@ -917,6 +917,7 @@ public abstract class CraftRegionAccessor implements RegionAccessor { @@ -951,6 +951,7 @@ public abstract class CraftRegionAccessor implements RegionAccessor {
AABB bb = (ItemFrame.class.isAssignableFrom(clazz)) AABB bb = (ItemFrame.class.isAssignableFrom(clazz))
? net.minecraft.world.entity.decoration.ItemFrame.calculateBoundingBox(null, pos, CraftBlock.blockFaceToNotch(dir).getOpposite(), width, height) ? net.minecraft.world.entity.decoration.ItemFrame.calculateBoundingBox(null, pos, CraftBlock.blockFaceToNotch(dir).getOpposite(), width, height)
: HangingEntity.calculateBoundingBox(null, pos, CraftBlock.blockFaceToNotch(dir).getOpposite(), width, height); : HangingEntity.calculateBoundingBox(null, pos, CraftBlock.blockFaceToNotch(dir).getOpposite(), width, height);
@ -16,7 +16,7 @@ index 7ef90fbdbcdb12ae0f3837fb003112115ab7ecfe..4289cce80f9861b809062a29c0d89b9d
List<net.minecraft.world.entity.Entity> list = (List<net.minecraft.world.entity.Entity>) this.getHandle().getEntities(null, bb); List<net.minecraft.world.entity.Entity> list = (List<net.minecraft.world.entity.Entity>) this.getHandle().getEntities(null, bb);
for (Iterator<net.minecraft.world.entity.Entity> it = list.iterator(); !taken && it.hasNext(); ) { for (Iterator<net.minecraft.world.entity.Entity> it = list.iterator(); !taken && it.hasNext(); ) {
net.minecraft.world.entity.Entity e = it.next(); net.minecraft.world.entity.Entity e = it.next();
@@ -943,7 +944,8 @@ public abstract class CraftRegionAccessor implements RegionAccessor { @@ -977,7 +978,8 @@ public abstract class CraftRegionAccessor implements RegionAccessor {
if (Painting.class.isAssignableFrom(clazz)) { if (Painting.class.isAssignableFrom(clazz)) {
if (this.isNormalWorld() && randomizeData) { if (this.isNormalWorld() && randomizeData) {
entity = net.minecraft.world.entity.decoration.Painting.create(world, pos, dir).orElse(null); entity = net.minecraft.world.entity.decoration.Painting.create(world, pos, dir).orElse(null);

View File

@ -5,18 +5,18 @@ Subject: [PATCH] ExperienceOrb should call EntitySpawnEvent
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index e51a54275aeab85158ee9685b2f6d0f5f3a0b58a..df3feea9ed025bd7be39dfe1f1e1fdc4c1e77035 100644 index e4551a6d984928457af4fb6cc2d0bf3673ef8fb1..8f78b9e714c472f59f3abf565c53bd87a6811674 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -722,7 +722,10 @@ public class CraftEventFactory { @@ -737,7 +737,10 @@ public class CraftEventFactory {
} else if (entity instanceof net.minecraft.world.entity.ExperienceOrb) { // Spigot start - SPIGOT-7523: Merge after spawn event and only merge if the event was not cancelled (gets checked above)
net.minecraft.world.entity.ExperienceOrb xp = (net.minecraft.world.entity.ExperienceOrb) entity; if (entity instanceof net.minecraft.world.entity.ExperienceOrb xp) {
double radius = world.spigotConfig.expMerge; double radius = world.spigotConfig.expMerge;
- if (radius > 0) { - if (radius > 0) {
+ // Paper start - Call EntitySpawnEvent for ExperienceOrb entities. + // Paper start - Call EntitySpawnEvent for ExperienceOrb entities.
+ event = CraftEventFactory.callEntitySpawnEvent(entity); + event = CraftEventFactory.callEntitySpawnEvent(entity);
+ if (radius > 0 && !event.isCancelled() && !entity.isRemoved()) { + if (radius > 0 && !event.isCancelled() && !entity.isRemoved()) {
+ // Paper end + // Paper end
// Paper start - Maximum exp value when merging - Whole section has been tweaked, see comments for specifics // Paper start - Maximum exp value when merging - Whole section has been tweaked, see comments for specifics
final int maxValue = world.paperConfig().entities.behavior.experienceMergeMaxValue; final int maxValue = world.paperConfig().entities.behavior.experienceMergeMaxValue;
final boolean mergeUnconditionally = world.paperConfig().entities.behavior.experienceMergeMaxValue <= 0; final boolean mergeUnconditionally = world.paperConfig().entities.behavior.experienceMergeMaxValue <= 0;

View File

@ -9,10 +9,10 @@ Minecraft now ticks signs in order to validate the playerWhoMayEdit field. This
private net.minecraft.world.level.block.entity.SignBlockEntity playerWhoMayEdit private net.minecraft.world.level.block.entity.SignBlockEntity playerWhoMayEdit
diff --git a/src/main/java/net/minecraft/world/level/block/CeilingHangingSignBlock.java b/src/main/java/net/minecraft/world/level/block/CeilingHangingSignBlock.java diff --git a/src/main/java/net/minecraft/world/level/block/CeilingHangingSignBlock.java b/src/main/java/net/minecraft/world/level/block/CeilingHangingSignBlock.java
index 6c9d163b9f857806461dc72e54713f1a4f3a5c31..0bd8ea3143b2e9755d492af4596622d1dca1afaf 100644 index cee371fde78e7e95e166b138d9437e5e8087f7c7..90fe181d035e43c4cc220cbb984f8f8c7fd29602 100644
--- a/src/main/java/net/minecraft/world/level/block/CeilingHangingSignBlock.java --- a/src/main/java/net/minecraft/world/level/block/CeilingHangingSignBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/CeilingHangingSignBlock.java +++ b/src/main/java/net/minecraft/world/level/block/CeilingHangingSignBlock.java
@@ -144,6 +144,6 @@ public class CeilingHangingSignBlock extends SignBlock { @@ -154,6 +154,6 @@ public class CeilingHangingSignBlock extends SignBlock {
@Nullable @Nullable
@Override @Override
public <T extends BlockEntity> BlockEntityTicker<T> getTicker(Level world, BlockState state, BlockEntityType<T> type) { public <T extends BlockEntity> BlockEntityTicker<T> getTicker(Level world, BlockState state, BlockEntityType<T> type) {
@ -21,10 +21,10 @@ index 6c9d163b9f857806461dc72e54713f1a4f3a5c31..0bd8ea3143b2e9755d492af4596622d1
} }
} }
diff --git a/src/main/java/net/minecraft/world/level/block/SignBlock.java b/src/main/java/net/minecraft/world/level/block/SignBlock.java diff --git a/src/main/java/net/minecraft/world/level/block/SignBlock.java b/src/main/java/net/minecraft/world/level/block/SignBlock.java
index 0c1c6fbcf625da4a28514e0d040deb6c98ba9507..614777d15bcf4141a89d0a0f7bd880526c668ffd 100644 index 28cba43e42354b87e08ef87b70c274a2fdc0bb48..ade170b4c76ad4a36eb2fba831d438642c096205 100644
--- a/src/main/java/net/minecraft/world/level/block/SignBlock.java --- a/src/main/java/net/minecraft/world/level/block/SignBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/SignBlock.java +++ b/src/main/java/net/minecraft/world/level/block/SignBlock.java
@@ -207,6 +207,6 @@ public abstract class SignBlock extends BaseEntityBlock implements SimpleWaterlo @@ -210,6 +210,6 @@ public abstract class SignBlock extends BaseEntityBlock implements SimpleWaterlo
@Nullable @Nullable
@Override @Override
public <T extends BlockEntity> BlockEntityTicker<T> getTicker(Level world, BlockState state, BlockEntityType<T> type) { public <T extends BlockEntity> BlockEntityTicker<T> getTicker(Level world, BlockState state, BlockEntityType<T> type) {
@ -33,10 +33,10 @@ index 0c1c6fbcf625da4a28514e0d040deb6c98ba9507..614777d15bcf4141a89d0a0f7bd88052
} }
} }
diff --git a/src/main/java/net/minecraft/world/level/block/WallHangingSignBlock.java b/src/main/java/net/minecraft/world/level/block/WallHangingSignBlock.java diff --git a/src/main/java/net/minecraft/world/level/block/WallHangingSignBlock.java b/src/main/java/net/minecraft/world/level/block/WallHangingSignBlock.java
index d818d3ea6d28aa6ffb62127d4efd585d6f2935d1..ae232311f12c72ff62d3d18f25e3ebf46ce1ace2 100644 index 32a463104593ecf00d44c449edda24a13ac8224e..484a2a689f240f1916e911459111782e91c20940 100644
--- a/src/main/java/net/minecraft/world/level/block/WallHangingSignBlock.java --- a/src/main/java/net/minecraft/world/level/block/WallHangingSignBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/WallHangingSignBlock.java +++ b/src/main/java/net/minecraft/world/level/block/WallHangingSignBlock.java
@@ -167,6 +167,6 @@ public class WallHangingSignBlock extends SignBlock { @@ -177,6 +177,6 @@ public class WallHangingSignBlock extends SignBlock {
@Nullable @Nullable
@Override @Override
public <T extends BlockEntity> BlockEntityTicker<T> getTicker(Level world, BlockState state, BlockEntityType<T> type) { public <T extends BlockEntity> BlockEntityTicker<T> getTicker(Level world, BlockState state, BlockEntityType<T> type) {
@ -45,10 +45,10 @@ index d818d3ea6d28aa6ffb62127d4efd585d6f2935d1..ae232311f12c72ff62d3d18f25e3ebf4
} }
} }
diff --git a/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java diff --git a/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java
index 9eea2982e92e9bc7a53962dc6b21de60f9e5a4c7..38cde466714e5663cd416b6afd5d2558e139ec09 100644 index 68f95a8eb4aa659e62394bf98ecd5f5d46879cbf..bc01970c5ef9cde4a75394d6977837e924a38463 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java --- a/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java
@@ -367,6 +367,12 @@ public class SignBlockEntity extends BlockEntity implements CommandSource { // C @@ -365,6 +365,12 @@ public class SignBlockEntity extends BlockEntity implements CommandSource { // C
@Nullable @Nullable
public UUID getPlayerWhoMayEdit() { public UUID getPlayerWhoMayEdit() {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Make Amethyst throw both Spread and Grow Events
diff --git a/src/main/java/net/minecraft/world/level/block/BuddingAmethystBlock.java b/src/main/java/net/minecraft/world/level/block/BuddingAmethystBlock.java diff --git a/src/main/java/net/minecraft/world/level/block/BuddingAmethystBlock.java b/src/main/java/net/minecraft/world/level/block/BuddingAmethystBlock.java
index 4dae2a98070affd84bc4523a927dc9cbfe7379c6..2548244c089dff583c8c424dcaa5504caedf3f10 100644 index 79f1fb45447350b5bedee8ce3efe6c150aa9772c..ee24eac5e37a2fd0c8c37365ea10d03749beb9a7 100644
--- a/src/main/java/net/minecraft/world/level/block/BuddingAmethystBlock.java --- a/src/main/java/net/minecraft/world/level/block/BuddingAmethystBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/BuddingAmethystBlock.java +++ b/src/main/java/net/minecraft/world/level/block/BuddingAmethystBlock.java
@@ -38,7 +38,13 @@ public class BuddingAmethystBlock extends AmethystBlock { @@ -45,7 +45,13 @@ public class BuddingAmethystBlock extends AmethystBlock {
if (block != null) { if (block != null) {
BlockState iblockdata2 = (BlockState) ((BlockState) block.defaultBlockState().setValue(AmethystClusterBlock.FACING, enumdirection)).setValue(AmethystClusterBlock.WATERLOGGED, iblockdata1.getFluidState().getType() == Fluids.WATER); BlockState iblockdata2 = (BlockState) ((BlockState) block.defaultBlockState().setValue(AmethystClusterBlock.FACING, enumdirection)).setValue(AmethystClusterBlock.WATERLOGGED, iblockdata1.getFluidState().getType() == Fluids.WATER);

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Implement PlayerFailMoveEvent
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 8b0bcaa4239a0966cf7b7676525c1ab69c25f534..2553942e143e5acd0dc6158434d160000a98ea8c 100644 index 09e5d0790b87a4747dd50eb790cdd1ce83de2550..c01d38b673303b06ad0a932641446b1a8f4fda8c 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1292,8 +1292,8 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @@ -1317,8 +1317,8 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
double d0 = ServerGamePacketListenerImpl.clampHorizontal(packet.getX(this.player.getX())); final double toX = d0; // Paper - OBFHELPER double d0 = ServerGamePacketListenerImpl.clampHorizontal(packet.getX(this.player.getX())); final double toX = d0; // Paper - OBFHELPER
double d1 = ServerGamePacketListenerImpl.clampVertical(packet.getY(this.player.getY())); final double toY = d1; double d1 = ServerGamePacketListenerImpl.clampVertical(packet.getY(this.player.getY())); final double toY = d1;
double d2 = ServerGamePacketListenerImpl.clampHorizontal(packet.getZ(this.player.getZ())); final double toZ = d2; // Paper - OBFHELPER double d2 = ServerGamePacketListenerImpl.clampHorizontal(packet.getZ(this.player.getZ())); final double toZ = d2; // Paper - OBFHELPER
@ -19,8 +19,8 @@ index 8b0bcaa4239a0966cf7b7676525c1ab69c25f534..2553942e143e5acd0dc6158434d16000
if (this.player.isPassenger()) { if (this.player.isPassenger()) {
this.player.absMoveTo(this.player.getX(), this.player.getY(), this.player.getZ(), f, f1); this.player.absMoveTo(this.player.getX(), this.player.getY(), this.player.getZ(), f, f1);
@@ -1359,8 +1359,14 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @@ -1385,8 +1385,14 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
} }
// Paper start - Prevent moving into unloaded chunks // Paper start - Prevent moving into unloaded chunks
if (this.player.level().paperConfig().chunks.preventMovingIntoUnloadedChunks && (this.player.getX() != toX || this.player.getZ() != toZ) && !worldserver.areChunksLoadedForMove(this.player.getBoundingBox().expandTowards(new Vec3(toX, toY, toZ).subtract(this.player.position())))) { if (this.player.level().paperConfig().chunks.preventMovingIntoUnloadedChunks && (this.player.getX() != toX || this.player.getZ() != toZ) && !worldserver.areChunksLoadedForMove(this.player.getBoundingBox().expandTowards(new Vec3(toX, toY, toZ).subtract(this.player.position())))) {
+ // Paper start - Add fail move event + // Paper start - Add fail move event
@ -34,24 +34,33 @@ index 8b0bcaa4239a0966cf7b7676525c1ab69c25f534..2553942e143e5acd0dc6158434d16000
} }
// Paper end // Paper end
@@ -1369,9 +1375,16 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @@ -1395,9 +1401,16 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
if (d10 - d9 > Math.max(f2, Math.pow((double) (org.spigotmc.SpigotConfig.movedTooQuicklyMultiplier * (float) i * speed), 2)) && !this.isSingleplayerOwner()) { if (d10 - d9 > Math.max(f2, Math.pow((double) (org.spigotmc.SpigotConfig.movedTooQuicklyMultiplier * (float) i * speed), 2)) && !this.isSingleplayerOwner()) {
// CraftBukkit end // CraftBukkit end
+ // Paper start - Add fail move event + // Paper start - Add fail move event
+ io.papermc.paper.event.player.PlayerFailMoveEvent event = fireFailMove(io.papermc.paper.event.player.PlayerFailMoveEvent.FailReason.MOVED_TOO_QUICKLY, + io.papermc.paper.event.player.PlayerFailMoveEvent event = fireFailMove(io.papermc.paper.event.player.PlayerFailMoveEvent.FailReason.MOVED_TOO_QUICKLY,
+ toX, toY, toZ, toYaw, toPitch, true); + toX, toY, toZ, toYaw, toPitch, true);
+ if (!event.isAllowed()) { + if (!event.isAllowed()) {
+ if (event.getLogWarning()) + if (event.getLogWarning())
ServerGamePacketListenerImpl.LOGGER.warn("{} moved too quickly! {},{},{}", new Object[]{this.player.getName().getString(), d6, d7, d8}); ServerGamePacketListenerImpl.LOGGER.warn("{} moved too quickly! {},{},{}", new Object[]{this.player.getName().getString(), d6, d7, d8});
this.teleport(this.player.getX(), this.player.getY(), this.player.getZ(), this.player.getYRot(), this.player.getXRot()); this.teleport(this.player.getX(), this.player.getY(), this.player.getZ(), this.player.getYRot(), this.player.getXRot());
return;
+ }
+ // Paper end
}
}
}
@@ -1436,6 +1449,8 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
from = event.getFrom();
this.internalTeleport(from.getX(), from.getY(), from.getZ(), from.getYaw(), from.getPitch(), Collections.emptySet());
return; return;
+ } + }
+ // Paper end + // Paper end
} }
// Paper end
} }
@@ -1463,8 +1478,15 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -1436,8 +1449,15 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
boolean flag2 = false; boolean flag2 = false;
if (!this.player.isChangingDimension() && d10 > org.spigotmc.SpigotConfig.movedWronglyThreshold && !this.player.isSleeping() && !this.player.gameMode.isCreative() && this.player.gameMode.getGameModeForPlayer() != GameType.SPECTATOR) { // Spigot if (!this.player.isChangingDimension() && d10 > org.spigotmc.SpigotConfig.movedWronglyThreshold && !this.player.isSleeping() && !this.player.gameMode.isCreative() && this.player.gameMode.getGameModeForPlayer() != GameType.SPECTATOR) { // Spigot
@ -67,7 +76,7 @@ index 8b0bcaa4239a0966cf7b7676525c1ab69c25f534..2553942e143e5acd0dc6158434d16000
} }
// Paper start - optimise out extra getCubes // Paper start - optimise out extra getCubes
@@ -1450,6 +1470,15 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @@ -1477,6 +1499,15 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
if (didCollide || !axisalignedbb.equals(newBox)) { if (didCollide || !axisalignedbb.equals(newBox)) {
// note: only call after setLocation, or else getBoundingBox is wrong // note: only call after setLocation, or else getBoundingBox is wrong
teleportBack = this.hasNewCollision(worldserver, this.player, axisalignedbb, newBox); teleportBack = this.hasNewCollision(worldserver, this.player, axisalignedbb, newBox);
@ -83,7 +92,7 @@ index 8b0bcaa4239a0966cf7b7676525c1ab69c25f534..2553942e143e5acd0dc6158434d16000
} // else: no collision at all detected, why do we care? } // else: no collision at all detected, why do we care?
} }
if (!this.player.noPhysics && !this.player.isSleeping() && teleportBack) { // Paper end - optimise out extra getCubes if (!this.player.noPhysics && !this.player.isSleeping() && teleportBack) { // Paper end - optimise out extra getCubes
@@ -1538,6 +1567,18 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @@ -1565,6 +1596,18 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
} }
} }

View File

@ -1121,10 +1121,10 @@ index 0000000000000000000000000000000000000000..d306f911757a4d556c82c0070d4837db
+ } + }
+} +}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 9fff00b3706a97ba71a80f2ba39577b229325e02..1bac9f7894321b5710f5475f6598ec9f3ccd94d3 100644 index 69f21266bb0a7c42ba4e12b71acf12a4ee99bd1a..2a122872ebe3d079db5170bb49b0614c30c5df4f 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1466,6 +1466,20 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -1635,6 +1635,20 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
MinecraftTimings.bukkitSchedulerTimer.startTiming(); // Spigot // Paper MinecraftTimings.bukkitSchedulerTimer.startTiming(); // Spigot // Paper
this.server.getScheduler().mainThreadHeartbeat(this.tickCount); // CraftBukkit this.server.getScheduler().mainThreadHeartbeat(this.tickCount); // CraftBukkit
MinecraftTimings.bukkitSchedulerTimer.stopTiming(); // Spigot // Paper MinecraftTimings.bukkitSchedulerTimer.stopTiming(); // Spigot // Paper
@ -1146,10 +1146,10 @@ index 9fff00b3706a97ba71a80f2ba39577b229325e02..1bac9f7894321b5710f5475f6598ec9f
this.profiler.push("commandFunctions"); this.profiler.push("commandFunctions");
MinecraftTimings.commandFunctionsTimer.startTiming(); // Spigot // Paper MinecraftTimings.commandFunctionsTimer.startTiming(); // Spigot // Paper
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 12bb0c619762ca9fc080ae884ce29de477dbcdc2..80919d247a9204ebf8d0e55df7fc6a2443ed91aa 100644 index a3f63e83f193acf6164ab1b099d5217afd043ddc..20eb64a88b887b539b24ea8cd8d9e63add8852df 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java --- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -651,6 +651,7 @@ public abstract class PlayerList { @@ -649,6 +649,7 @@ public abstract class PlayerList {
entityplayer.unRide(); entityplayer.unRide();
worldserver.removePlayerImmediately(entityplayer, Entity.RemovalReason.UNLOADED_WITH_PLAYER); worldserver.removePlayerImmediately(entityplayer, Entity.RemovalReason.UNLOADED_WITH_PLAYER);
@ -1158,10 +1158,10 @@ index 12bb0c619762ca9fc080ae884ce29de477dbcdc2..80919d247a9204ebf8d0e55df7fc6a24
this.players.remove(entityplayer); this.players.remove(entityplayer);
this.playersByName.remove(entityplayer.getScoreboardName().toLowerCase(java.util.Locale.ROOT)); // Spigot this.playersByName.remove(entityplayer.getScoreboardName().toLowerCase(java.util.Locale.ROOT)); // Spigot
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index bf77b0dae2ca25437df7386d2196da24d681e2ed..4516991a4d1299d7e93019a4b9bc227b4844e9ef 100644 index 36a6eb05f983f0137590c8ed1ec154affd9cdbd3..703825e9956201ddf211816553a1f1b509e1592f 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java --- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -246,11 +246,23 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { @@ -247,11 +247,23 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
public @Nullable Throwable addedToWorldStack; // Paper - entity debug public @Nullable Throwable addedToWorldStack; // Paper - entity debug
public CraftEntity getBukkitEntity() { public CraftEntity getBukkitEntity() {
if (this.bukkitEntity == null) { if (this.bukkitEntity == null) {
@ -1186,7 +1186,7 @@ index bf77b0dae2ca25437df7386d2196da24d681e2ed..4516991a4d1299d7e93019a4b9bc227b
@Override @Override
public CommandSender getBukkitSender(CommandSourceStack wrapper) { public CommandSender getBukkitSender(CommandSourceStack wrapper) {
return this.getBukkitEntity(); return this.getBukkitEntity();
@@ -4697,6 +4709,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { @@ -4739,6 +4751,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
return; return;
} }
// Paper end - rewrite chunk system // Paper end - rewrite chunk system
@ -1194,7 +1194,7 @@ index bf77b0dae2ca25437df7386d2196da24d681e2ed..4516991a4d1299d7e93019a4b9bc227b
if (this.removalReason == null) { if (this.removalReason == null) {
this.removalReason = reason; this.removalReason = reason;
} }
@@ -4707,12 +4720,28 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { @@ -4749,12 +4762,28 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
if (reason != RemovalReason.UNLOADED_TO_CHUNK) this.getPassengers().forEach(Entity::stopRiding); // Paper - chunk system - don't adjust passenger state when unloading, it's just not safe (and messes with our logic in entity chunk unload) if (reason != RemovalReason.UNLOADED_TO_CHUNK) this.getPassengers().forEach(Entity::stopRiding); // Paper - chunk system - don't adjust passenger state when unloading, it's just not safe (and messes with our logic in entity chunk unload)
this.levelCallback.onRemove(reason); this.levelCallback.onRemove(reason);
@ -1224,10 +1224,10 @@ index bf77b0dae2ca25437df7386d2196da24d681e2ed..4516991a4d1299d7e93019a4b9bc227b
public void setLevelCallback(EntityInLevelCallback changeListener) { public void setLevelCallback(EntityInLevelCallback changeListener) {
this.levelCallback = changeListener; this.levelCallback = changeListener;
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 4d2443f40dc2e1b38b7c80e7b5f9ca7a4f84c107..3363ac5f0b2c059e0794fe22194c7fc1006806f4 100644 index d1d81ad90ee1c007b46c9afd1f4e918af2834d38..99d02cfed25b10c1418d2ee40c7f3d4f054897e4 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -310,6 +310,76 @@ public final class CraftServer implements Server { @@ -311,6 +311,76 @@ public final class CraftServer implements Server {
private final io.papermc.paper.logging.SysoutCatcher sysoutCatcher = new io.papermc.paper.logging.SysoutCatcher(); // Paper private final io.papermc.paper.logging.SysoutCatcher sysoutCatcher = new io.papermc.paper.logging.SysoutCatcher(); // Paper
private final CraftPotionBrewer potionBrewer = new CraftPotionBrewer(); // Paper private final CraftPotionBrewer potionBrewer = new CraftPotionBrewer(); // Paper
@ -1305,10 +1305,10 @@ index 4d2443f40dc2e1b38b7c80e7b5f9ca7a4f84c107..3363ac5f0b2c059e0794fe22194c7fc1
ConfigurationSerialization.registerClass(CraftOfflinePlayer.class); ConfigurationSerialization.registerClass(CraftOfflinePlayer.class);
ConfigurationSerialization.registerClass(CraftPlayerProfile.class); ConfigurationSerialization.registerClass(CraftPlayerProfile.class);
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index f02b6803e1fe9f3a18e47cd7b5e6776eb6fe183a..acdac5b9b9990b1f8c25effe6b8882746284d9d9 100644 index fd2af6fefb990181a06de7864ea8a229c2a84bc4..3b730c298c0e902bd1888d69e426513c57514c93 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -207,6 +207,15 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { @@ -212,6 +212,15 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
private EntityDamageEvent lastDamageEvent; private EntityDamageEvent lastDamageEvent;
private final CraftPersistentDataContainer persistentDataContainer = new CraftPersistentDataContainer(CraftEntity.DATA_TYPE_REGISTRY); private final CraftPersistentDataContainer persistentDataContainer = new CraftPersistentDataContainer(CraftEntity.DATA_TYPE_REGISTRY);
protected net.kyori.adventure.pointer.Pointers adventure$pointers; // Paper - implement pointers protected net.kyori.adventure.pointer.Pointers adventure$pointers; // Paper - implement pointers
@ -1324,7 +1324,7 @@ index f02b6803e1fe9f3a18e47cd7b5e6776eb6fe183a..acdac5b9b9990b1f8c25effe6b888274
public CraftEntity(final CraftServer server, final Entity entity) { public CraftEntity(final CraftServer server, final Entity entity) {
this.server = server; this.server = server;
@@ -830,6 +839,12 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { @@ -838,6 +847,12 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
return this.entity; return this.entity;
} }

View File

@ -5,7 +5,7 @@ Subject: [PATCH] API for updating recipes on clients
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 80919d247a9204ebf8d0e55df7fc6a2443ed91aa..3a70b7e1319c3ecab9eb720f8a1a34c0efe21a4b 100644 index 20eb64a88b887b539b24ea8cd8d9e63add8852df..c1790d8f13af1ff7059dfe952cbdcdcca22d8df4 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java --- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -1539,6 +1539,13 @@ public abstract class PlayerList { @@ -1539,6 +1539,13 @@ public abstract class PlayerList {
@ -39,10 +39,10 @@ index 80919d247a9204ebf8d0e55df7fc6a2443ed91aa..3a70b7e1319c3ecab9eb720f8a1a34c0
Iterator iterator1 = this.players.iterator(); Iterator iterator1 = this.players.iterator();
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 3363ac5f0b2c059e0794fe22194c7fc1006806f4..991e22b7e7484db638c3d46ddac7625b1f9a805d 100644 index 99d02cfed25b10c1418d2ee40c7f3d4f054897e4..4282f3c585877a477c52074059e9a5a7c1244e93 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1133,6 +1133,18 @@ public final class CraftServer implements Server { @@ -1128,6 +1128,18 @@ public final class CraftServer implements Server {
ReloadCommand.reload(this.console); ReloadCommand.reload(this.console);
} }
@ -61,7 +61,7 @@ index 3363ac5f0b2c059e0794fe22194c7fc1006806f4..991e22b7e7484db638c3d46ddac7625b
private void loadIcon() { private void loadIcon() {
this.icon = new CraftIconCache(null); this.icon = new CraftIconCache(null);
try { try {
@@ -1476,6 +1488,13 @@ public final class CraftServer implements Server { @@ -1508,6 +1520,13 @@ public final class CraftServer implements Server {
@Override @Override
public boolean addRecipe(Recipe recipe) { public boolean addRecipe(Recipe recipe) {
@ -75,7 +75,7 @@ index 3363ac5f0b2c059e0794fe22194c7fc1006806f4..991e22b7e7484db638c3d46ddac7625b
CraftRecipe toAdd; CraftRecipe toAdd;
if (recipe instanceof CraftRecipe) { if (recipe instanceof CraftRecipe) {
toAdd = (CraftRecipe) recipe; toAdd = (CraftRecipe) recipe;
@@ -1505,6 +1524,11 @@ public final class CraftServer implements Server { @@ -1537,6 +1556,11 @@ public final class CraftServer implements Server {
} }
} }
toAdd.addToCraftingManager(); toAdd.addToCraftingManager();
@ -87,7 +87,7 @@ index 3363ac5f0b2c059e0794fe22194c7fc1006806f4..991e22b7e7484db638c3d46ddac7625b
return true; return true;
} }
@@ -1685,10 +1709,23 @@ public final class CraftServer implements Server { @@ -1717,10 +1741,23 @@ public final class CraftServer implements Server {
@Override @Override
public boolean removeRecipe(NamespacedKey recipeKey) { public boolean removeRecipe(NamespacedKey recipeKey) {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Fix rotation when spawning display entities
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
index 4289cce80f9861b809062a29c0d89b9dbd0ba8cd..38a66bc89afa63db42273459415ace9629603744 100644 index ee8819884868b70f2a3644141eca1d92abe2b7a8..b8043e9f92736ebfa0707613f2fec78b14c1fe72 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java --- a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
@@ -987,6 +987,7 @@ public abstract class CraftRegionAccessor implements RegionAccessor { @@ -1021,6 +1021,7 @@ public abstract class CraftRegionAccessor implements RegionAccessor {
if (entity != null) { if (entity != null) {
entity.setPos(x, y, z); entity.setPos(x, y, z);

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Only capture actual tree growth
diff --git a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java diff --git a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
index e9b748a81ec223a701b56d2dc890c9eb223d8474..a0c7c6208314d981e8577ad69ef1c5193290a085 100644 index 105bb94b844c5ee85b53aca95360e7b2caf374cc..e6ac20a38f31bb0cd6b8840b2518f6992ef7f518 100644
--- a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java --- a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
+++ b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java +++ b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
@@ -862,6 +862,7 @@ public interface DispenseItemBehavior { @@ -866,6 +866,7 @@ public interface DispenseItemBehavior {
if (!fertilizeEvent.isCancelled()) { if (!fertilizeEvent.isCancelled()) {
for (org.bukkit.block.BlockState blockstate : blocks) { for (org.bukkit.block.BlockState blockstate : blocks) {
blockstate.update(true); blockstate.update(true);
@ -17,10 +17,10 @@ index e9b748a81ec223a701b56d2dc890c9eb223d8474..a0c7c6208314d981e8577ad69ef1c519
} }
} }
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
index 21b3be35da5636fa726f36f569142de5d16ac1f3..4697df75fdee2023c41260bed211e3e3d90d2b9b 100644 index d4df53d022eb58cf43d787ed84bd94fdf1684d69..c4228284145c27f6fe995bd1875d3f17f4786ddd 100644
--- a/src/main/java/net/minecraft/world/item/ItemStack.java --- a/src/main/java/net/minecraft/world/item/ItemStack.java
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java
@@ -401,6 +401,7 @@ public final class ItemStack { @@ -422,6 +422,7 @@ public final class ItemStack {
} }
for (CraftBlockState blockstate : blocks) { for (CraftBlockState blockstate : blocks) {
world.setBlock(blockstate.getPosition(),blockstate.getHandle(), blockstate.getFlag()); // SPIGOT-7248 - manual update to avoid physics where appropriate world.setBlock(blockstate.getPosition(),blockstate.getHandle(), blockstate.getFlag()); // SPIGOT-7248 - manual update to avoid physics where appropriate
@ -29,10 +29,10 @@ index 21b3be35da5636fa726f36f569142de5d16ac1f3..4697df75fdee2023c41260bed211e3e3
} }
entityhuman.awardStat(Stats.ITEM_USED.get(item)); // SPIGOT-7236 - award stat entityhuman.awardStat(Stats.ITEM_USED.get(item)); // SPIGOT-7236 - award stat
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 169fc7b1aaf2cefec3ddab53fcec912e0ec0117a..f2f93761985a78b563dd1eda57f9a08b1cc8893a 100644 index 74e68160dc650c0426785b0f88892c29edadb29c..0afad3487a3939981abda6a2342e90683816a39f 100644
--- a/src/main/java/net/minecraft/world/level/Level.java --- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -1868,4 +1868,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable { @@ -1888,4 +1888,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
return null; return null;
} }
// Paper end - optimize redstone (Alternate Current) // Paper end - optimize redstone (Alternate Current)
@ -45,10 +45,10 @@ index 169fc7b1aaf2cefec3ddab53fcec912e0ec0117a..f2f93761985a78b563dd1eda57f9a08b
+ // Paper end - notify observers even if grow failed + // Paper end - notify observers even if grow failed
} }
diff --git a/src/main/java/net/minecraft/world/level/block/SaplingBlock.java b/src/main/java/net/minecraft/world/level/block/SaplingBlock.java diff --git a/src/main/java/net/minecraft/world/level/block/SaplingBlock.java b/src/main/java/net/minecraft/world/level/block/SaplingBlock.java
index f43e6fe77e943239c1f1d6fa3e31235949f79546..53ac4e618fec3fe384d8a106c521f3eace0b5b35 100644 index 7e6ee9c1ccef3eaa6b2edc39e414bd186426aee5..836c86104ed4f0d375330c9123af5d502efefa4d 100644
--- a/src/main/java/net/minecraft/world/level/block/SaplingBlock.java --- a/src/main/java/net/minecraft/world/level/block/SaplingBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/SaplingBlock.java +++ b/src/main/java/net/minecraft/world/level/block/SaplingBlock.java
@@ -73,6 +73,7 @@ public class SaplingBlock extends BushBlock implements BonemealableBlock { @@ -85,6 +85,7 @@ public class SaplingBlock extends BushBlock implements BonemealableBlock {
if (event == null || !event.isCancelled()) { if (event == null || !event.isCancelled()) {
for (BlockState blockstate : blocks) { for (BlockState blockstate : blocks) {
blockstate.update(true); blockstate.update(true);
@ -57,10 +57,10 @@ index f43e6fe77e943239c1f1d6fa3e31235949f79546..53ac4e618fec3fe384d8a106c521f3ea
} }
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
index 11cc7e640774c6098c247382da8520d62ba19c32..bec8e6b62dba2bd0e4e85a7d1fb51287384f1290 100644 index 0a96b00a98227714ef99005e0a223765feae8fe9..e5506a7d074a9f89d41f4d5d7549a458779bef20 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
@@ -565,6 +565,7 @@ public class CraftBlock implements Block { @@ -566,6 +566,7 @@ public class CraftBlock implements Block {
if (!event.isCancelled()) { if (!event.isCancelled()) {
for (BlockState blockstate : blocks) { for (BlockState blockstate : blocks) {
blockstate.update(true); blockstate.update(true);

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Use correct source for mushroom block spread event
diff --git a/src/main/java/net/minecraft/world/level/block/MushroomBlock.java b/src/main/java/net/minecraft/world/level/block/MushroomBlock.java diff --git a/src/main/java/net/minecraft/world/level/block/MushroomBlock.java b/src/main/java/net/minecraft/world/level/block/MushroomBlock.java
index c9593c8c3b5e0502b33691ab6c5e14d389e7d0fe..302c5a6401facf192677b89cc0e9190bb35b1229 100644 index 5889cb1cdb64875f0d7a7c681808b45cdc661d8e..7368c76a01275223a7bd3df1d36e80a15f66edbb 100644
--- a/src/main/java/net/minecraft/world/level/block/MushroomBlock.java --- a/src/main/java/net/minecraft/world/level/block/MushroomBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/MushroomBlock.java +++ b/src/main/java/net/minecraft/world/level/block/MushroomBlock.java
@@ -56,6 +56,7 @@ public class MushroomBlock extends BushBlock implements BonemealableBlock { @@ -68,6 +68,7 @@ public class MushroomBlock extends BushBlock implements BonemealableBlock {
} }
BlockPos blockposition2 = pos.offset(random.nextInt(3) - 1, random.nextInt(2) - random.nextInt(2), random.nextInt(3) - 1); BlockPos blockposition2 = pos.offset(random.nextInt(3) - 1, random.nextInt(2) - random.nextInt(2), random.nextInt(3) - 1);
@ -16,7 +16,7 @@ index c9593c8c3b5e0502b33691ab6c5e14d389e7d0fe..302c5a6401facf192677b89cc0e9190b
for (int j = 0; j < 4; ++j) { for (int j = 0; j < 4; ++j) {
if (world.isEmptyBlock(blockposition2) && state.canSurvive(world, blockposition2)) { if (world.isEmptyBlock(blockposition2) && state.canSurvive(world, blockposition2)) {
@@ -66,7 +67,7 @@ public class MushroomBlock extends BushBlock implements BonemealableBlock { @@ -78,7 +79,7 @@ public class MushroomBlock extends BushBlock implements BonemealableBlock {
} }
if (world.isEmptyBlock(blockposition2) && state.canSurvive(world, blockposition2)) { if (world.isEmptyBlock(blockposition2) && state.canSurvive(world, blockposition2)) {

View File

@ -9,10 +9,10 @@ Subject: [PATCH] Respect randomizeData on more entities when spawning
* ExperienceOrb * ExperienceOrb
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
index 38a66bc89afa63db42273459415ace9629603744..1e35f4c27250075dee74958a4c08cfb57a666bae 100644 index b8043e9f92736ebfa0707613f2fec78b14c1fe72..c343577efccfc95274b5f2a870d057ec57529484 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java --- a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
@@ -604,6 +604,11 @@ public abstract class CraftRegionAccessor implements RegionAccessor { @@ -634,6 +634,11 @@ public abstract class CraftRegionAccessor implements RegionAccessor {
} else if (org.bukkit.entity.Item.class.isAssignableFrom(clazz)) { } else if (org.bukkit.entity.Item.class.isAssignableFrom(clazz)) {
entity = new net.minecraft.world.entity.item.ItemEntity(world, x, y, z, new net.minecraft.world.item.ItemStack(net.minecraft.world.item.Items.DIRT)); entity = new net.minecraft.world.entity.item.ItemEntity(world, x, y, z, new net.minecraft.world.item.ItemStack(net.minecraft.world.item.Items.DIRT));
// Paper end // Paper end
@ -24,7 +24,7 @@ index 38a66bc89afa63db42273459415ace9629603744..1e35f4c27250075dee74958a4c08cfb5
} else if (FallingBlock.class.isAssignableFrom(clazz)) { } else if (FallingBlock.class.isAssignableFrom(clazz)) {
BlockPos pos = BlockPos.containing(x, y, z); BlockPos pos = BlockPos.containing(x, y, z);
entity = new FallingBlockEntity(world, x, y, z, this.getHandle().getBlockState(pos)); // Paper entity = new FallingBlockEntity(world, x, y, z, this.getHandle().getBlockState(pos)); // Paper
@@ -659,6 +664,14 @@ public abstract class CraftRegionAccessor implements RegionAccessor { @@ -691,6 +696,14 @@ public abstract class CraftRegionAccessor implements RegionAccessor {
entity.moveTo(x, y, z, yaw, pitch); entity.moveTo(x, y, z, yaw, pitch);
} else if (Firework.class.isAssignableFrom(clazz)) { } else if (Firework.class.isAssignableFrom(clazz)) {
entity = new FireworkRocketEntity(world, x, y, z, net.minecraft.world.item.ItemStack.EMPTY); entity = new FireworkRocketEntity(world, x, y, z, net.minecraft.world.item.ItemStack.EMPTY);
@ -39,7 +39,7 @@ index 38a66bc89afa63db42273459415ace9629603744..1e35f4c27250075dee74958a4c08cfb5
} }
} else if (Minecart.class.isAssignableFrom(clazz)) { } else if (Minecart.class.isAssignableFrom(clazz)) {
if (PoweredMinecart.class.isAssignableFrom(clazz)) { if (PoweredMinecart.class.isAssignableFrom(clazz)) {
@@ -960,8 +973,19 @@ public abstract class CraftRegionAccessor implements RegionAccessor { @@ -994,8 +1007,19 @@ public abstract class CraftRegionAccessor implements RegionAccessor {
} }
} else if (TNTPrimed.class.isAssignableFrom(clazz)) { } else if (TNTPrimed.class.isAssignableFrom(clazz)) {
entity = new PrimedTnt(world, x, y, z, null); entity = new PrimedTnt(world, x, y, z, null);

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Use correct seed on api world load
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 991e22b7e7484db638c3d46ddac7625b1f9a805d..8de06dd9fb058c5b02f4ffe0d14d0bd7205dbdeb 100644 index 4282f3c585877a477c52074059e9a5a7c1244e93..b64d08d5fed98a919fcdfda1592a1f825525075d 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1314,7 +1314,7 @@ public final class CraftServer implements Server { @@ -1346,7 +1346,7 @@ public final class CraftServer implements Server {
// Paper - move down // Paper - move down

View File

@ -7,10 +7,10 @@ The lists are only supposed to contain ticks for the 1 radius
neighbours of the chunk. neighbours of the chunk.
diff --git a/src/main/java/net/minecraft/world/level/chunk/UpgradeData.java b/src/main/java/net/minecraft/world/level/chunk/UpgradeData.java diff --git a/src/main/java/net/minecraft/world/level/chunk/UpgradeData.java b/src/main/java/net/minecraft/world/level/chunk/UpgradeData.java
index 8e2a7ea230fedb9094a159a83c9d69f6df3832f3..62709ed72faf823e18ad77477eb2f5dbf9c98660 100644 index 8943081f270d5328b4f333b7bc1ae1a449d1788c..0f94af3502ef517c33d04841a80ea2ace077f0af 100644
--- a/src/main/java/net/minecraft/world/level/chunk/UpgradeData.java --- a/src/main/java/net/minecraft/world/level/chunk/UpgradeData.java
+++ b/src/main/java/net/minecraft/world/level/chunk/UpgradeData.java +++ b/src/main/java/net/minecraft/world/level/chunk/UpgradeData.java
@@ -100,6 +100,24 @@ public class UpgradeData { @@ -99,6 +99,24 @@ public class UpgradeData {
} }
@ -35,7 +35,7 @@ index 8e2a7ea230fedb9094a159a83c9d69f6df3832f3..62709ed72faf823e18ad77477eb2f5db
public void upgrade(LevelChunk chunk) { public void upgrade(LevelChunk chunk) {
this.upgradeInside(chunk); this.upgradeInside(chunk);
@@ -107,6 +125,11 @@ public class UpgradeData { @@ -106,6 +124,11 @@ public class UpgradeData {
upgradeSides(chunk, direction8); upgradeSides(chunk, direction8);
} }

View File

@ -18,7 +18,7 @@ index 625a598eb5f3c9c5ea60ae9ea50974bb08abbf85..9f1b424f8437f0f859d4f177ecc52233
if (worldmap != null) { if (worldmap != null) {
diff --git a/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java b/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java diff --git a/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java b/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java
index dcf245387f59ce730cb2cfb5fc0e837a20d3dfe5..759ecd79534a7706f7d4a63eb9dacbefcfe54674 100644 index 9c11d0af958ec47408d238d34d30750d29ecdd88..69912c5b300b67394dce3876d2d96872033cf156 100644
--- a/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java --- a/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java
+++ b/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java +++ b/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java
@@ -50,6 +50,7 @@ public class ItemFrame extends HangingEntity { @@ -50,6 +50,7 @@ public class ItemFrame extends HangingEntity {
@ -29,7 +29,7 @@ index dcf245387f59ce730cb2cfb5fc0e837a20d3dfe5..759ecd79534a7706f7d4a63eb9dacbef
public ItemFrame(EntityType<? extends ItemFrame> type, Level world) { public ItemFrame(EntityType<? extends ItemFrame> type, Level world) {
super(type, world); super(type, world);
@@ -393,6 +394,7 @@ public class ItemFrame extends HangingEntity { @@ -388,6 +389,7 @@ public class ItemFrame extends HangingEntity {
} }
private void onItemChanged(ItemStack stack) { private void onItemChanged(ItemStack stack) {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Fix custom statistic criteria creation
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
index ef317919818f9387dc394dd703fc028eaf37ec63..4d66a9f24d718de4c6862b20ccb7240332523db4 100644 index 7cfb8ffd7d107aef20a86d044b453c49e9f59b7f..c0e36388652e89059c91117722945645119a5738 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -617,6 +617,12 @@ public final class CraftMagicNumbers implements UnsafeValues { @@ -614,6 +614,12 @@ public final class CraftMagicNumbers implements UnsafeValues {
net.minecraft.core.Holder<net.minecraft.world.level.biome.Biome> biomeBase = cra.getHandle().registryAccess().registryOrThrow(net.minecraft.core.registries.Registries.BIOME).getHolderOrThrow(net.minecraft.resources.ResourceKey.create(net.minecraft.core.registries.Registries.BIOME, org.bukkit.craftbukkit.util.CraftNamespacedKey.toMinecraft(biomeKey))); net.minecraft.core.Holder<net.minecraft.world.level.biome.Biome> biomeBase = cra.getHandle().registryAccess().registryOrThrow(net.minecraft.core.registries.Registries.BIOME).getHolderOrThrow(net.minecraft.resources.ResourceKey.create(net.minecraft.core.registries.Registries.BIOME, org.bukkit.craftbukkit.util.CraftNamespacedKey.toMinecraft(biomeKey)));
cra.setBiome(x, y, z, biomeBase); cra.setBiome(x, y, z, biomeBase);
} }

View File

@ -45,10 +45,10 @@ index 5a5a8945c786e16ff0df62494ddd1ac85c42b53f..63f9735d356dafd579cee4423d3037eb
case COMPOSTER_FILL_ATTEMPT: case COMPOSTER_FILL_ATTEMPT:
datavalue = ((Boolean) data) ? 1 : 0; datavalue = ((Boolean) data) ? 1 : 0;
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 3df9f69e4297ef0f412191f8a0c1cb17311f4de3..44d6a7373fe0c7b6afff31e149174367e9873bf9 100644 index c77fec78636805a496ecea3e56f26290dbcbffff..abb14719496971a780650782bdce17c638c7b270 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -1376,7 +1376,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @@ -1382,7 +1382,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
public <T> void playEffect(Location loc, Effect effect, T data, int radius) { public <T> void playEffect(Location loc, Effect effect, T data, int radius) {
if (data != null) { if (data != null) {
Preconditions.checkArgument(effect.getData() != null, "Effect.%s does not have a valid Data", effect); Preconditions.checkArgument(effect.getData() != null, "Effect.%s does not have a valid Data", effect);
@ -58,10 +58,10 @@ index 3df9f69e4297ef0f412191f8a0c1cb17311f4de3..44d6a7373fe0c7b6afff31e149174367
// Special case: the axis is optional for ELECTRIC_SPARK // Special case: the axis is optional for ELECTRIC_SPARK
Preconditions.checkArgument(effect.getData() == null || effect == Effect.ELECTRIC_SPARK, "Wrong kind of data for the %s effect", effect); Preconditions.checkArgument(effect.getData() == null || effect == Effect.ELECTRIC_SPARK, "Wrong kind of data for the %s effect", effect);
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index daf519f6eb367ef2404d33929e69fe44b6f8bb07..17e2a26d5136b23898bdd15ef6a9d5b7ace65c8e 100644 index d252f0313b1d73758782249060e7c57afb5c5418..082350f866eaef5fc8f98ebc217aa02cdcab5a46 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -868,7 +868,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -875,7 +875,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
Preconditions.checkArgument(effect != null, "Effect cannot be null"); Preconditions.checkArgument(effect != null, "Effect cannot be null");
if (data != null) { if (data != null) {
Preconditions.checkArgument(effect.getData() != null, "Effect.%s does not have a valid Data", effect); Preconditions.checkArgument(effect.getData() != null, "Effect.%s does not have a valid Data", effect);

View File

@ -7,10 +7,10 @@ Was obtainable through different methods, but you had to use different
methods depending on the implementation of Entity you were working with. methods depending on the implementation of Entity you were working with.
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index acdac5b9b9990b1f8c25effe6b8882746284d9d9..fb7f5d8a7a691de04cf1525b356621688fd6af54 100644 index 3b730c298c0e902bd1888d69e426513c57514c93..c4343cbdea19a0dd671ed136a6a19ebf831ce8ab 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -1506,4 +1506,11 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { @@ -1550,4 +1550,11 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
return !this.getHandle().level().noCollision(this.getHandle(), aabb); return !this.getHandle().level().noCollision(this.getHandle(), aabb);
} }
// Paper End - Collision API // Paper End - Collision API

View File

@ -38,33 +38,33 @@ index c081842b4416d15342cbfc583ef367901dab2b7e..4d406ced4a1996b8883574ce0b785dc1
// Paper end // Paper end
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
index 8907396dc21dbfb31ff15286a7daa2110f6e34c0..8ef4b33c09c64c417e9b0d259550d7f78d1cec14 100644 index 1f7586b71c579d48de32a307c0ce543130f0851b..bf14dbec0a08370364bf652ababadac27917b7f1 100644
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java --- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java +++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
@@ -532,7 +532,17 @@ public class ServerChunkCache extends ChunkSource { @@ -539,7 +539,17 @@ public class ServerChunkCache extends ChunkSource {
if ((this.spawnFriendlies || this.spawnEnemies) && this.level.paperConfig().entities.spawning.perPlayerMobSpawns) { // don't count mobs when animals and monsters are disabled if ((this.spawnFriendlies || this.spawnEnemies) && this.level.paperConfig().entities.spawning.perPlayerMobSpawns) { // don't count mobs when animals and monsters are disabled
// re-set mob counts // re-set mob counts
for (ServerPlayer player : this.level.players) { for (ServerPlayer player : this.level.players) {
- Arrays.fill(player.mobCounts, 0); - Arrays.fill(player.mobCounts, 0);
+ // Paper start - per player mob spawning backoff + // Paper start - per player mob spawning backoff
+ for (int ii = 0; ii < ServerPlayer.MOBCATEGORY_TOTAL_ENUMS; ii++) { + for (int ii = 0; ii < ServerPlayer.MOBCATEGORY_TOTAL_ENUMS; ii++) {
+ player.mobCounts[ii] = 0; + player.mobCounts[ii] = 0;
+ +
+ int newBackoff = player.mobBackoffCounts[ii] - 1; // TODO make configurable bleed // TODO use nonlinear algorithm? + int newBackoff = player.mobBackoffCounts[ii] - 1; // TODO make configurable bleed // TODO use nonlinear algorithm?
+ if (newBackoff < 0) { + if (newBackoff < 0) {
+ newBackoff = 0; + newBackoff = 0;
+ }
+ player.mobBackoffCounts[ii] = newBackoff;
+ } + }
+ player.mobBackoffCounts[ii] = newBackoff; + // Paper end - per player mob spawning backoff
+ } }
+ // Paper end - per player mob spawning backoff spawnercreature_d = NaturalSpawner.createState(naturalSpawnChunkCount, this.level.getAllEntities(), this::getFullChunk, null, true);
} } else {
spawnercreature_d = NaturalSpawner.createState(l, this.level.getAllEntities(), this::getFullChunk, null, true);
} else {
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 113089a7d087ecb0508b5f05e708dca1c3296735..47eb7f632c71714903c8bac45ef6080fb58cd6d2 100644 index cca1f44ba8cefcc0ee3e6dadd175bd67b311b2de..25772043f3b4483b9f5e32ba9489da52add6941a 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -253,6 +253,7 @@ public class ServerPlayer extends Player { @@ -260,6 +260,7 @@ public class ServerPlayer extends Player {
public static final int MOBCATEGORY_TOTAL_ENUMS = net.minecraft.world.entity.MobCategory.values().length; public static final int MOBCATEGORY_TOTAL_ENUMS = net.minecraft.world.entity.MobCategory.values().length;
public final int[] mobCounts = new int[MOBCATEGORY_TOTAL_ENUMS]; // Paper public final int[] mobCounts = new int[MOBCATEGORY_TOTAL_ENUMS]; // Paper
// Paper end - mob spawning rework // Paper end - mob spawning rework

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Deprecate and replace methods with old StructureType
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 8de06dd9fb058c5b02f4ffe0d14d0bd7205dbdeb..356107688a5d40d1c462b164f61af82f4dfd3926 100644 index b64d08d5fed98a919fcdfda1592a1f825525075d..782bb8ca67517dde5dba8f0a133eb8699353dd01 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1918,6 +1918,11 @@ public final class CraftServer implements Server { @@ -1950,6 +1950,11 @@ public final class CraftServer implements Server {
ServerLevel worldServer = ((CraftWorld) world).getHandle(); ServerLevel worldServer = ((CraftWorld) world).getHandle();
Location structureLocation = world.locateNearestStructure(location, structureType, radius, findUnexplored); Location structureLocation = world.locateNearestStructure(location, structureType, radius, findUnexplored);
@ -20,7 +20,7 @@ index 8de06dd9fb058c5b02f4ffe0d14d0bd7205dbdeb..356107688a5d40d1c462b164f61af82f
BlockPos structurePosition = CraftLocation.toBlockPosition(structureLocation); BlockPos structurePosition = CraftLocation.toBlockPosition(structureLocation);
// Create map with trackPlayer = true, unlimitedTracking = true // Create map with trackPlayer = true, unlimitedTracking = true
@@ -1928,6 +1933,31 @@ public final class CraftServer implements Server { @@ -1960,6 +1965,31 @@ public final class CraftServer implements Server {
return CraftItemStack.asBukkitCopy(stack); return CraftItemStack.asBukkitCopy(stack);
} }

View File

@ -11,10 +11,10 @@ This patch prevents server from sending namespaced commands when player
requests tab-complete only commands. requests tab-complete only commands.
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 2553942e143e5acd0dc6158434d160000a98ea8c..b016f84ed1e99286073daf148612896ae470d222 100644 index c01d38b673303b06ad0a932641446b1a8f4fda8c..e49a4044710cabb8a74d9aa83b28bddf025af1f2 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -806,6 +806,11 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @@ -809,6 +809,11 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
ParseResults<CommandSourceStack> parseresults = this.server.getCommands().getDispatcher().parse(stringreader, this.player.createCommandSourceStack()); ParseResults<CommandSourceStack> parseresults = this.server.getCommands().getDispatcher().parse(stringreader, this.player.createCommandSourceStack());
this.server.getCommands().getDispatcher().getCompletionSuggestions(parseresults).thenAccept((suggestions) -> { this.server.getCommands().getDispatcher().getCompletionSuggestions(parseresults).thenAccept((suggestions) -> {

View File

@ -9,25 +9,25 @@ food consumption, turtle egg count decreases, ice to water
conversions and beehive releases conversions and beehive releases
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
index 1a895a511d8bb20bcaf6ae5534ca70529d65951e..282dcf4c1b2de40810832dbdd3ff1ba1ce444fd6 100644 index 82f26186156a487f29ad3abff3f68852e5b8a1f9..511221a686c1d2cad3b4abf79ee32b26058dad27 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java --- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
@@ -433,8 +433,8 @@ public class ServerPlayerGameMode { @@ -433,8 +433,8 @@ public class ServerPlayerGameMode {
isCorrectTool = flag1; // Paper isCorrectTool = flag1; // Paper
itemstack.mineBlock(this.level, iblockdata, pos, this.player); itemstack.mineBlock(this.level, iblockdata1, pos, this.player);
- if (flag && flag1 && event.isDropItems()) { // CraftBukkit - Check if block should drop items - if (flag && flag1 && event.isDropItems()) { // CraftBukkit - Check if block should drop items
- block.playerDestroy(this.level, this.player, pos, iblockdata, tileentity, itemstack1); - block.playerDestroy(this.level, this.player, pos, iblockdata1, tileentity, itemstack1);
+ if (flag && flag1 /* && event.isDropItems() */) { // CraftBukkit - Check if block should drop items // Paper - fix drops not preventing stats/food exhaustion + if (flag && flag1 && event.isDropItems()/* && event.isDropItems() */) { // CraftBukkit - Check if block should drop items // Paper - fix drops not preventing stats/food exhaustion
+ block.playerDestroy(this.level, this.player, pos, iblockdata, tileentity, itemstack1, event.isDropItems()); // Paper + block.playerDestroy(this.level, this.player, pos, iblockdata1, tileentity, itemstack1, event.isDropItems()); // Paper
} }
// return true; // CraftBukkit // return true; // CraftBukkit
diff --git a/src/main/java/net/minecraft/world/level/block/BeehiveBlock.java b/src/main/java/net/minecraft/world/level/block/BeehiveBlock.java diff --git a/src/main/java/net/minecraft/world/level/block/BeehiveBlock.java b/src/main/java/net/minecraft/world/level/block/BeehiveBlock.java
index 5cf7b0d0331a8f10aea6dd607193795054a299dd..4b4a6b081ffedc7f637fa1e1726391d8e0fee0a1 100644 index 6e7a9f68aa3a5084c8eea9fd8721272260734289..7d1f3c367efcf8def56b961993136e02e05ba59c 100644
--- a/src/main/java/net/minecraft/world/level/block/BeehiveBlock.java --- a/src/main/java/net/minecraft/world/level/block/BeehiveBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/BeehiveBlock.java +++ b/src/main/java/net/minecraft/world/level/block/BeehiveBlock.java
@@ -77,8 +77,8 @@ public class BeehiveBlock extends BaseEntityBlock { @@ -84,8 +84,8 @@ public class BeehiveBlock extends BaseEntityBlock {
} }
@Override @Override
@ -39,10 +39,10 @@ index 5cf7b0d0331a8f10aea6dd607193795054a299dd..4b4a6b081ffedc7f637fa1e1726391d8
BeehiveBlockEntity tileentitybeehive = (BeehiveBlockEntity) blockEntity; BeehiveBlockEntity tileentitybeehive = (BeehiveBlockEntity) blockEntity;
diff --git a/src/main/java/net/minecraft/world/level/block/Block.java b/src/main/java/net/minecraft/world/level/block/Block.java 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 6c6532e1e73154ab5e6cb18aea44d64870dbbf4f..d4cbff18adb62073a1dceb189043789620af6877 100644 index 7ac98b4e8b6dcc23777732d377ee73ae5671ebef..4d50dd92a7f3187ee1d8edb926e7c273c8156549 100644
--- a/src/main/java/net/minecraft/world/level/block/Block.java --- a/src/main/java/net/minecraft/world/level/block/Block.java
+++ b/src/main/java/net/minecraft/world/level/block/Block.java +++ b/src/main/java/net/minecraft/world/level/block/Block.java
@@ -416,10 +416,18 @@ public class Block extends BlockBehaviour implements ItemLike { @@ -423,10 +423,18 @@ public class Block extends BlockBehaviour implements ItemLike {
return this.defaultBlockState(); return this.defaultBlockState();
} }
@ -62,10 +62,10 @@ index 6c6532e1e73154ab5e6cb18aea44d64870dbbf4f..d4cbff18adb62073a1dceb1890437896
public void setPlacedBy(Level world, BlockPos pos, BlockState state, @Nullable LivingEntity placer, ItemStack itemStack) {} public void setPlacedBy(Level world, BlockPos pos, BlockState state, @Nullable LivingEntity placer, ItemStack itemStack) {}
diff --git a/src/main/java/net/minecraft/world/level/block/DoublePlantBlock.java b/src/main/java/net/minecraft/world/level/block/DoublePlantBlock.java diff --git a/src/main/java/net/minecraft/world/level/block/DoublePlantBlock.java b/src/main/java/net/minecraft/world/level/block/DoublePlantBlock.java
index 9db66b393e057d93a8025b803ae0ad2a1bca61f6..030b38d5d5d2578d6ef482a239ef58787efa3b08 100644 index 0f0750f8c790d0db72a0e6b277449a1461674890..81d2140351775ad55546af52eb635ccdc8509d89 100644
--- a/src/main/java/net/minecraft/world/level/block/DoublePlantBlock.java --- a/src/main/java/net/minecraft/world/level/block/DoublePlantBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/DoublePlantBlock.java +++ b/src/main/java/net/minecraft/world/level/block/DoublePlantBlock.java
@@ -89,8 +89,8 @@ public class DoublePlantBlock extends BushBlock { @@ -96,8 +96,8 @@ public class DoublePlantBlock extends BushBlock {
} }
@Override @Override
@ -75,12 +75,12 @@ index 9db66b393e057d93a8025b803ae0ad2a1bca61f6..030b38d5d5d2578d6ef482a239ef5878
+ super.playerDestroy(world, player, pos, Blocks.AIR.defaultBlockState(), blockEntity, tool, includeDrops); // Paper + super.playerDestroy(world, player, pos, Blocks.AIR.defaultBlockState(), blockEntity, tool, includeDrops); // Paper
} }
protected static void preventCreativeDropFromBottomPart(Level world, BlockPos pos, BlockState state, Player player) { protected static void preventDropFromBottomPart(Level world, BlockPos pos, BlockState state, Player player) {
diff --git a/src/main/java/net/minecraft/world/level/block/IceBlock.java b/src/main/java/net/minecraft/world/level/block/IceBlock.java 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 5fbdc96f29e29dfc092b9e84a988032db0fa36ab..04089e6f7d6e3d532b00585870283922b6be5246 100644 index f05998e0af1e844f19bf86b74f652a9901088c37..4ab6997dad5b112f5105f786a6cee78c6c5667e8 100644
--- a/src/main/java/net/minecraft/world/level/block/IceBlock.java --- a/src/main/java/net/minecraft/world/level/block/IceBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/IceBlock.java +++ b/src/main/java/net/minecraft/world/level/block/IceBlock.java
@@ -25,8 +25,8 @@ public class IceBlock extends HalfTransparentBlock { @@ -33,8 +33,8 @@ public class IceBlock extends HalfTransparentBlock {
} }
@Override @Override
@ -92,10 +92,10 @@ index 5fbdc96f29e29dfc092b9e84a988032db0fa36ab..04089e6f7d6e3d532b00585870283922
this.afterDestroy(world, pos, tool); this.afterDestroy(world, pos, tool);
} }
diff --git a/src/main/java/net/minecraft/world/level/block/TurtleEggBlock.java b/src/main/java/net/minecraft/world/level/block/TurtleEggBlock.java diff --git a/src/main/java/net/minecraft/world/level/block/TurtleEggBlock.java b/src/main/java/net/minecraft/world/level/block/TurtleEggBlock.java
index 845fa7e13e4a3416b504d0a4c5d5e0454d96b8ed..07157822659288e76b2fba34db8d5d566506f33b 100644 index c79f3a8885a5ffc9ebac51992e63df14929d9f24..b0199e071cba4c7ad51799132d00b22b616953fc 100644
--- a/src/main/java/net/minecraft/world/level/block/TurtleEggBlock.java --- a/src/main/java/net/minecraft/world/level/block/TurtleEggBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/TurtleEggBlock.java +++ b/src/main/java/net/minecraft/world/level/block/TurtleEggBlock.java
@@ -166,8 +166,8 @@ public class TurtleEggBlock extends Block { @@ -173,8 +173,8 @@ public class TurtleEggBlock extends Block {
} }
@Override @Override

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Fire entity death event for ender dragon
diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
index 0edf0374c6890b2afdefc4b723f1f4501f4e7810..a288180da1996103eb7dc3bb87b4615f86630bb8 100644 index 389c45748732781595b773bc033446ace06fcbb0..f56bb431be7d5f1a1b8edec41af1f3a28289316d 100644
--- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java --- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
+++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java +++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
@@ -642,6 +642,15 @@ public class EnderDragon extends Mob implements Enemy { @@ -642,6 +642,15 @@ public class EnderDragon extends Mob implements Enemy {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Add Listing API for Player
diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundPlayerInfoUpdatePacket.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundPlayerInfoUpdatePacket.java diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundPlayerInfoUpdatePacket.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundPlayerInfoUpdatePacket.java
index 32e3f347e2e025e2675e9410116386e472bd6a79..929483116d05a803d317ece7a44861af8bd36665 100644 index aa1c6de4d6cb7bbca33d25895c54707d220ab62a..9810d62c99f5d7dfca61ddfbbc356aebad2f7001 100644
--- a/src/main/java/net/minecraft/network/protocol/game/ClientboundPlayerInfoUpdatePacket.java --- a/src/main/java/net/minecraft/network/protocol/game/ClientboundPlayerInfoUpdatePacket.java
+++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundPlayerInfoUpdatePacket.java +++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundPlayerInfoUpdatePacket.java
@@ -29,12 +29,46 @@ public class ClientboundPlayerInfoUpdatePacket implements Packet<ClientGamePacke @@ -29,12 +29,46 @@ public class ClientboundPlayerInfoUpdatePacket implements Packet<ClientGamePacke
@ -76,10 +76,10 @@ index 32e3f347e2e025e2675e9410116386e472bd6a79..929483116d05a803d317ece7a44861af
static class EntryBuilder { static class EntryBuilder {
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 3a70b7e1319c3ecab9eb720f8a1a34c0efe21a4b..33abcf12b4426572b74ca4c813e4392c823494bc 100644 index c1790d8f13af1ff7059dfe952cbdcdcca22d8df4..e1bd408336a80d819e760b76d9636de06fdf0abe 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java --- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -358,14 +358,22 @@ public abstract class PlayerList { @@ -356,14 +356,22 @@ public abstract class PlayerList {
// CraftBukkit end // CraftBukkit end
// CraftBukkit start - sendAll above replaced with this loop // CraftBukkit start - sendAll above replaced with this loop
@ -103,7 +103,7 @@ index 3a70b7e1319c3ecab9eb720f8a1a34c0efe21a4b..33abcf12b4426572b74ca4c813e4392c
} }
if (entityplayer1 == player || !bukkitPlayer.canSee(entityplayer1.getBukkitEntity())) { // Paper - don't include joining player if (entityplayer1 == player || !bukkitPlayer.canSee(entityplayer1.getBukkitEntity())) { // Paper - don't include joining player
@@ -376,7 +384,7 @@ public abstract class PlayerList { @@ -374,7 +382,7 @@ public abstract class PlayerList {
} }
// Paper start - use single player info update packet // Paper start - use single player info update packet
if (!onlinePlayers.isEmpty()) { if (!onlinePlayers.isEmpty()) {
@ -113,10 +113,10 @@ index 3a70b7e1319c3ecab9eb720f8a1a34c0efe21a4b..33abcf12b4426572b74ca4c813e4392c
// Paper end // Paper end
player.sentListPacket = true; player.sentListPacket = true;
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 17e2a26d5136b23898bdd15ef6a9d5b7ace65c8e..3b6b89954d30908ff5ed23acfacbb3ef9b8a6f03 100644 index 082350f866eaef5fc8f98ebc217aa02cdcab5a46..ad602abca07e3a0d6e2889843c5849616f2c23a7 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -184,6 +184,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -185,6 +185,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
private final ConversationTracker conversationTracker = new ConversationTracker(); private final ConversationTracker conversationTracker = new ConversationTracker();
private final Set<String> channels = new HashSet<String>(); private final Set<String> channels = new HashSet<String>();
private final Map<UUID, Set<WeakReference<Plugin>>> invertedVisibilityEntities = new HashMap<>(); private final Map<UUID, Set<WeakReference<Plugin>>> invertedVisibilityEntities = new HashMap<>();
@ -124,7 +124,7 @@ index 17e2a26d5136b23898bdd15ef6a9d5b7ace65c8e..3b6b89954d30908ff5ed23acfacbb3ef
private static final WeakHashMap<Plugin, WeakReference<Plugin>> pluginWeakReferences = new WeakHashMap<>(); private static final WeakHashMap<Plugin, WeakReference<Plugin>> pluginWeakReferences = new WeakHashMap<>();
private int hash = 0; private int hash = 0;
private double health = 20; private double health = 20;
@@ -1981,7 +1982,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -1988,7 +1989,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
otherPlayer.setUUID(uuidOverride); otherPlayer.setUUID(uuidOverride);
} }
// Paper end // Paper end
@ -133,7 +133,7 @@ index 17e2a26d5136b23898bdd15ef6a9d5b7ace65c8e..3b6b89954d30908ff5ed23acfacbb3ef
if (original != null) otherPlayer.setUUID(original); // Paper - uuid override if (original != null) otherPlayer.setUUID(original); // Paper - uuid override
} }
@@ -2090,6 +2091,43 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -2097,6 +2098,43 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
return (entity != null) ? this.canSee(entity) : false; // If we can't find it, we can't see it return (entity != null) ? this.canSee(entity) : false; // If we can't find it, we can't see it
} }

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Expose clicked BlockFace during BlockDamageEvent
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
index 282dcf4c1b2de40810832dbdd3ff1ba1ce444fd6..25f7adf194a165fa28488f80b87382c08111f896 100644 index 511221a686c1d2cad3b4abf79ee32b26058dad27..899439e0af639e8d9124522b3cb6a10601b17fe2 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java --- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
@@ -253,7 +253,7 @@ public class ServerPlayerGameMode { @@ -253,7 +253,7 @@ public class ServerPlayerGameMode {
@ -18,7 +18,7 @@ index 282dcf4c1b2de40810832dbdd3ff1ba1ce444fd6..25f7adf194a165fa28488f80b87382c0
if (blockEvent.isCancelled()) { if (blockEvent.isCancelled()) {
// Let the client know the block still exists // Let the client know the block still exists
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index df3feea9ed025bd7be39dfe1f1e1fdc4c1e77035..f73588370d731b58fe7acd51dd9dd3a12b222add 100644 index 8f78b9e714c472f59f3abf565c53bd87a6811674..704ba208d5cbaef8bc2eb0a87d6fbb1be42e0460 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -652,13 +652,13 @@ public class CraftEventFactory { @@ -652,13 +652,13 @@ public class CraftEventFactory {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Expand Pose API
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 4516991a4d1299d7e93019a4b9bc227b4844e9ef..c655c6fee393c62ba79301f76baa72f9b1154a9a 100644 index 703825e9956201ddf211816553a1f1b509e1592f..92508e9ea17d2ea00b4da20a249325c390442016 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java --- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -417,6 +417,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { @@ -422,6 +422,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
private UUID originWorld; private UUID originWorld;
public boolean freezeLocked = false; // Paper - Freeze Tick Lock API public boolean freezeLocked = false; // Paper - Freeze Tick Lock API
public boolean collidingWithWorldBorder; // Paper public boolean collidingWithWorldBorder; // Paper
@ -16,7 +16,7 @@ index 4516991a4d1299d7e93019a4b9bc227b4844e9ef..c655c6fee393c62ba79301f76baa72f9
public void setOrigin(@javax.annotation.Nonnull Location location) { public void setOrigin(@javax.annotation.Nonnull Location location) {
this.origin = location.toVector(); this.origin = location.toVector();
@@ -701,6 +702,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { @@ -706,6 +707,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
public void onClientRemoval() {} public void onClientRemoval() {}
public void setPose(net.minecraft.world.entity.Pose pose) { public void setPose(net.minecraft.world.entity.Pose pose) {
@ -25,10 +25,10 @@ index 4516991a4d1299d7e93019a4b9bc227b4844e9ef..c655c6fee393c62ba79301f76baa72f9
if (pose == this.getPose()) { if (pose == this.getPose()) {
return; return;
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index fb7f5d8a7a691de04cf1525b356621688fd6af54..0e6c7284b9aee6c5f2454a3a095ebf349f887740 100644 index c4343cbdea19a0dd671ed136a6a19ebf831ce8ab..0349d9b6ad12e0a426cb1307be8633240b7426fe 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -1243,6 +1243,20 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { @@ -1251,6 +1251,20 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
public boolean isSneaking() { public boolean isSneaking() {
return this.getHandle().isShiftKeyDown(); return this.getHandle().isShiftKeyDown();
} }

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Deep clone unhandled nbt tags
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
index 2510297df2f6ca80672c1dcbd35c0b1e0ce18ccb..9105c420c0c8d2285f5f45c184d54e9a5c5fbc57 100644 index 039197efb05432b8139fbabe92338572c1bf078e..8762a7a22723150a1a42b3459f3744b8235da142 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
@@ -304,7 +304,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @@ -305,7 +305,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
private static final CraftPersistentDataTypeRegistry DATA_TYPE_REGISTRY = new CraftPersistentDataTypeRegistry(); private static final CraftPersistentDataTypeRegistry DATA_TYPE_REGISTRY = new CraftPersistentDataTypeRegistry();
private CompoundTag internalTag; private CompoundTag internalTag;
@ -17,7 +17,7 @@ index 2510297df2f6ca80672c1dcbd35c0b1e0ce18ccb..9105c420c0c8d2285f5f45c184d54e9a
private CraftPersistentDataContainer persistentDataContainer = new CraftPersistentDataContainer(CraftMetaItem.DATA_TYPE_REGISTRY); private CraftPersistentDataContainer persistentDataContainer = new CraftPersistentDataContainer(CraftMetaItem.DATA_TYPE_REGISTRY);
private int version = CraftMagicNumbers.INSTANCE.getDataVersion(); // Internal use only private int version = CraftMagicNumbers.INSTANCE.getDataVersion(); // Internal use only
@@ -345,8 +345,10 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @@ -346,8 +346,10 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
this.destroyableKeys = new java.util.HashSet<>(meta.destroyableKeys); this.destroyableKeys = new java.util.HashSet<>(meta.destroyableKeys);
} }
// Paper end // Paper end
@ -30,7 +30,7 @@ index 2510297df2f6ca80672c1dcbd35c0b1e0ce18ccb..9105c420c0c8d2285f5f45c184d54e9a
this.internalTag = meta.internalTag; this.internalTag = meta.internalTag;
if (this.internalTag != null) { if (this.internalTag != null) {
@@ -1394,7 +1396,11 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @@ -1395,7 +1397,11 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
if (this.hasAttributeModifiers()) { if (this.hasAttributeModifiers()) {
clone.attributeModifiers = LinkedHashMultimap.create(this.attributeModifiers); clone.attributeModifiers = LinkedHashMultimap.create(this.attributeModifiers);
} }

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Add PlayerPickItemEvent
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index b016f84ed1e99286073daf148612896ae470d222..236ab643cdd65b3572860aedf1f5ac18ff96139a 100644 index e49a4044710cabb8a74d9aa83b28bddf025af1f2..c8858b9f72f57356f47575c01cbb159d341e0825 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -943,7 +943,14 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @@ -946,7 +946,14 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
this.disconnect("Invalid hotbar selection (Hacking?)", org.bukkit.event.player.PlayerKickEvent.Cause.ILLEGAL_ACTION); // Paper - kick event cause this.disconnect("Invalid hotbar selection (Hacking?)", org.bukkit.event.player.PlayerKickEvent.Cause.ILLEGAL_ACTION); // Paper - kick event cause
return; return;
} }

View File

@ -34,7 +34,7 @@ index a7aa2a4845cbf5a0843dcb93f7bdc5501f62a145..4c8ce073094e55ea0df67fe02c0d1cc8
if (optional.isPresent()) { if (optional.isPresent()) {
RecipeHolder<CraftingRecipe> recipeholder = (RecipeHolder) optional.get(); RecipeHolder<CraftingRecipe> recipeholder = (RecipeHolder) optional.get();
diff --git a/src/main/java/net/minecraft/world/inventory/ResultSlot.java b/src/main/java/net/minecraft/world/inventory/ResultSlot.java diff --git a/src/main/java/net/minecraft/world/inventory/ResultSlot.java b/src/main/java/net/minecraft/world/inventory/ResultSlot.java
index 525ba0bdc4c6782480930bea94f73a72efe6fc4c..2554f7b1d687f83f42d69bf8ab54336ba793e301 100644 index 7b2ac37e8bd305919f04ded043e50f13b3fe4253..8c97a7269040436cacc65fd182fa8e5f931b6c16 100644
--- a/src/main/java/net/minecraft/world/inventory/ResultSlot.java --- a/src/main/java/net/minecraft/world/inventory/ResultSlot.java
+++ b/src/main/java/net/minecraft/world/inventory/ResultSlot.java +++ b/src/main/java/net/minecraft/world/inventory/ResultSlot.java
@@ -59,7 +59,7 @@ public class ResultSlot extends Slot { @@ -59,7 +59,7 @@ public class ResultSlot extends Slot {
@ -47,7 +47,7 @@ index 525ba0bdc4c6782480930bea94f73a72efe6fc4c..2554f7b1d687f83f42d69bf8ab54336b
for(int i = 0; i < nonNullList.size(); ++i) { for(int i = 0; i < nonNullList.size(); ++i) {
ItemStack itemStack = this.craftSlots.getItem(i); ItemStack itemStack = this.craftSlots.getItem(i);
diff --git a/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java b/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java diff --git a/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java b/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java
index 43aacadcf8be10432a61c83f69ee86580c86d0a3..388363948595247471fa4c3c6801fc493d61c0d0 100644 index 93e7d350a4176250d9ae3f0e1e7e6a4197d613b0..b81e1802c8dcc8ebdef96d70088c18379598a66b 100644
--- a/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java --- a/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java
+++ b/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java +++ b/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java
@@ -122,13 +122,16 @@ public class RecipeManager extends SimpleJsonResourceReloadListener { @@ -122,13 +122,16 @@ public class RecipeManager extends SimpleJsonResourceReloadListener {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Allow trident custom damage
diff --git a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java diff --git a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
index cabcd68032649aa5ec5f1ac495a08a5af76f0f86..6c176933967f6ee98da3026f16a10efe4c3842fe 100644 index 6272b0e1e332789b983a486ee25226e2a1c9fdda..42ebd91196ae420eee57f4380abc558555457163 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java --- a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java +++ b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
@@ -65,7 +65,7 @@ public abstract class AbstractArrow extends Projectile { @@ -66,7 +66,7 @@ public abstract class AbstractArrow extends Projectile {
public AbstractArrow.Pickup pickup; public AbstractArrow.Pickup pickup;
public int shakeTime; public int shakeTime;
public int life; public int life;
@ -18,24 +18,23 @@ index cabcd68032649aa5ec5f1ac495a08a5af76f0f86..6c176933967f6ee98da3026f16a10efe
public SoundEvent soundEvent; public SoundEvent soundEvent;
@Nullable @Nullable
diff --git a/src/main/java/net/minecraft/world/entity/projectile/ThrownTrident.java b/src/main/java/net/minecraft/world/entity/projectile/ThrownTrident.java diff --git a/src/main/java/net/minecraft/world/entity/projectile/ThrownTrident.java b/src/main/java/net/minecraft/world/entity/projectile/ThrownTrident.java
index 454dd67920826b8b62c2654abfd43fc08c2648e4..a6bc277b6589dd7104566542733327822d6299a4 100644 index cbe8593cecd84f1598649801bebcb46364044eef..01e8f6f36a17c484b825879c377f7d6cc08e1fda 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/ThrownTrident.java --- a/src/main/java/net/minecraft/world/entity/projectile/ThrownTrident.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/ThrownTrident.java +++ b/src/main/java/net/minecraft/world/entity/projectile/ThrownTrident.java
@@ -33,11 +33,13 @@ public class ThrownTrident extends AbstractArrow { @@ -34,10 +34,12 @@ public class ThrownTrident extends AbstractArrow {
public ThrownTrident(EntityType<? extends ThrownTrident> type, Level world) { public ThrownTrident(EntityType<? extends ThrownTrident> type, Level world) {
super(type, world); super(type, world, ThrownTrident.DEFAULT_ARROW_STACK);
+ this.baseDamage = net.minecraft.world.item.TridentItem.BASE_DAMAGE; // Paper + this.baseDamage = net.minecraft.world.item.TridentItem.BASE_DAMAGE; // Paper
this.tridentItem = new ItemStack(Items.TRIDENT);
} }
public ThrownTrident(Level world, LivingEntity owner, ItemStack stack) { public ThrownTrident(Level world, LivingEntity owner, ItemStack stack) {
super(EntityType.TRIDENT, owner, world); super(EntityType.TRIDENT, owner, world, stack);
+ this.baseDamage = net.minecraft.world.item.TridentItem.BASE_DAMAGE; // Paper + this.baseDamage = net.minecraft.world.item.TridentItem.BASE_DAMAGE; // Paper
this.tridentItem = new ItemStack(Items.TRIDENT);
this.tridentItem = stack.copy();
this.entityData.set(ThrownTrident.ID_LOYALTY, (byte) EnchantmentHelper.getLoyalty(stack)); this.entityData.set(ThrownTrident.ID_LOYALTY, (byte) EnchantmentHelper.getLoyalty(stack));
@@ -128,7 +130,7 @@ public class ThrownTrident extends AbstractArrow { this.entityData.set(ThrownTrident.ID_FOIL, stack.hasFoil());
}
@@ -121,7 +123,7 @@ public class ThrownTrident extends AbstractArrow {
@Override @Override
protected void onHitEntity(EntityHitResult entityHitResult) { protected void onHitEntity(EntityHitResult entityHitResult) {
Entity entity = entityHitResult.getEntity(); Entity entity = entityHitResult.getEntity();

View File

@ -23,10 +23,10 @@ index 9daec0782774ab51ea8091cb8ed9d0a106e34cfa..2bbc39c257965ad91ee360cdfcd3538a
public String getName() { public String getName() {
Player player = this.getPlayer(); Player player = this.getPlayer();
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 3b6b89954d30908ff5ed23acfacbb3ef9b8a6f03..e593e0bc9d207325a9e9d38296b29230a353077e 100644 index ad602abca07e3a0d6e2889843c5849616f2c23a7..7b81dd72bc107648f2c0df19adeaa8ca7de7b204 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -274,6 +274,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -281,6 +281,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
return this.server.getPlayer(this.getUniqueId()) != null; return this.server.getPlayer(this.getUniqueId()) != null;
} }

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Add titleOverride to InventoryOpenEvent
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 47eb7f632c71714903c8bac45ef6080fb58cd6d2..67f03dd59ebcf74fae476b79a367778a9e942ed3 100644 index 25772043f3b4483b9f5e32ba9489da52add6941a..695a103f2517f3e888e86e76f3615bd69b00a175 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -1560,12 +1560,17 @@ public class ServerPlayer extends Player { @@ -1572,12 +1572,17 @@ public class ServerPlayer extends Player {
this.nextContainerCounter(); this.nextContainerCounter();
AbstractContainerMenu container = factory.createMenu(this.containerCounter, this.getInventory(), this); AbstractContainerMenu container = factory.createMenu(this.containerCounter, this.getInventory(), this);
@ -27,7 +27,7 @@ index 47eb7f632c71714903c8bac45ef6080fb58cd6d2..67f03dd59ebcf74fae476b79a367778a
if (container == null && !cancelled) { // Let pre-cancelled events fall through if (container == null && !cancelled) { // Let pre-cancelled events fall through
// SPIGOT-5263 - close chest if cancelled // SPIGOT-5263 - close chest if cancelled
if (factory instanceof Container) { if (factory instanceof Container) {
@@ -1587,7 +1592,7 @@ public class ServerPlayer extends Player { @@ -1599,7 +1604,7 @@ public class ServerPlayer extends Player {
} else { } else {
// CraftBukkit start // CraftBukkit start
this.containerMenu = container; this.containerMenu = container;
@ -37,10 +37,10 @@ index 47eb7f632c71714903c8bac45ef6080fb58cd6d2..67f03dd59ebcf74fae476b79a367778a
this.initMenu(container); this.initMenu(container);
return OptionalInt.of(this.containerCounter); 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 diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
index 8a6095850cece3203eeae474dbf32090f698a32e..aefb9879b2edadfb4b21d80135d713b9d34c9941 100644 index c6b3bc218ac440cc66dee97c21b3db4ad86938be..8a1e765363aeb61078fd23980d3856dc680cb05e 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
@@ -357,12 +357,16 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { @@ -358,12 +358,16 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
Preconditions.checkArgument(windowType != null, "Unknown windowType"); Preconditions.checkArgument(windowType != null, "Unknown windowType");
AbstractContainerMenu container = new CraftContainer(inventory, player, player.nextContainerCounter()); AbstractContainerMenu container = new CraftContainer(inventory, player, player.nextContainerCounter());
@ -58,7 +58,7 @@ index 8a6095850cece3203eeae474dbf32090f698a32e..aefb9879b2edadfb4b21d80135d713b9
//player.connection.send(new ClientboundOpenScreenPacket(container.containerId, windowType, CraftChatMessage.fromString(title)[0])); // Paper - comment //player.connection.send(new ClientboundOpenScreenPacket(container.containerId, windowType, CraftChatMessage.fromString(title)[0])); // Paper - comment
if (!player.isImmobile()) player.connection.send(new ClientboundOpenScreenPacket(container.containerId, windowType, io.papermc.paper.adventure.PaperAdventure.asVanilla(adventure$title))); // Paper if (!player.isImmobile()) player.connection.send(new ClientboundOpenScreenPacket(container.containerId, windowType, io.papermc.paper.adventure.PaperAdventure.asVanilla(adventure$title))); // Paper
@@ -438,7 +442,10 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { @@ -439,7 +443,10 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
} }
// Trigger an INVENTORY_OPEN event // Trigger an INVENTORY_OPEN event
@ -70,7 +70,7 @@ index 8a6095850cece3203eeae474dbf32090f698a32e..aefb9879b2edadfb4b21d80135d713b9
if (container == null) { if (container == null) {
return; return;
} }
@@ -449,6 +456,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { @@ -450,6 +457,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
//String title = inventory.getTitle(); // Paper - comment //String title = inventory.getTitle(); // Paper - comment
net.kyori.adventure.text.Component adventure$title = inventory.title(); // Paper 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 if (adventure$title == null) adventure$title = net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(inventory.getTitle()); // Paper
@ -79,7 +79,7 @@ index 8a6095850cece3203eeae474dbf32090f698a32e..aefb9879b2edadfb4b21d80135d713b9
if (!player.isImmobile()) player.connection.send(new ClientboundOpenScreenPacket(container.containerId, windowType, io.papermc.paper.adventure.PaperAdventure.asVanilla(adventure$title))); // Paper if (!player.isImmobile()) player.connection.send(new ClientboundOpenScreenPacket(container.containerId, windowType, io.papermc.paper.adventure.PaperAdventure.asVanilla(adventure$title))); // Paper
player.containerMenu = container; player.containerMenu = container;
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index f73588370d731b58fe7acd51dd9dd3a12b222add..5dc160b743534665c6b3efb10b10f7c36e2da5ab 100644 index 704ba208d5cbaef8bc2eb0a87d6fbb1be42e0460..916b29914f77bed0dbfdcd5eae8a6ef22948b9b0 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -1443,10 +1443,21 @@ public class CraftEventFactory { @@ -1443,10 +1443,21 @@ public class CraftEventFactory {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Configure sniffer egg hatch time
diff --git a/src/main/java/net/minecraft/world/level/block/SnifferEggBlock.java b/src/main/java/net/minecraft/world/level/block/SnifferEggBlock.java 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 fab44502b3e22eb8d1311068f88290ce31adb437..16c5be04658a66ff94f2aad8782e34f450e9a729 100644 index 02939518ead6463e677ecf5b045ec89aae154e8c..cb431b6027019ca95879129e88967ee6ae03c313 100644
--- a/src/main/java/net/minecraft/world/level/block/SnifferEggBlock.java --- a/src/main/java/net/minecraft/world/level/block/SnifferEggBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/SnifferEggBlock.java +++ b/src/main/java/net/minecraft/world/level/block/SnifferEggBlock.java
@@ -56,7 +56,7 @@ public class SnifferEggBlock extends Block { @@ -63,7 +63,7 @@ public class SnifferEggBlock extends Block {
// Paper start // Paper start
private void rescheduleTick(ServerLevel world, BlockPos pos) { private void rescheduleTick(ServerLevel world, BlockPos pos) {
@ -17,7 +17,7 @@ index fab44502b3e22eb8d1311068f88290ce31adb437..16c5be04658a66ff94f2aad8782e34f4
world.scheduleTick(pos, this, (baseDelay / 3) + world.random.nextInt(RANDOM_HATCH_OFFSET_TICKS)); world.scheduleTick(pos, this, (baseDelay / 3) + world.random.nextInt(RANDOM_HATCH_OFFSET_TICKS));
// reschedule to avoid being stuck here and behave like the other calls (see #onPlace) // reschedule to avoid being stuck here and behave like the other calls (see #onPlace)
} }
@@ -99,7 +99,7 @@ public class SnifferEggBlock extends Block { @@ -106,7 +106,7 @@ public class SnifferEggBlock extends Block {
world.levelEvent(3009, pos, 0); world.levelEvent(3009, pos, 0);
} }

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Add slot sanity checks in container clicks
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 236ab643cdd65b3572860aedf1f5ac18ff96139a..65bb221993147a558995b36fb835f7b82e0eb4bd 100644 index c8858b9f72f57356f47575c01cbb159d341e0825..555555786d5be31d10a8aee5d8b1972e61806262 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2981,6 +2981,12 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @@ -2991,6 +2991,12 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
break; break;
case SWAP: case SWAP:
if ((packet.getButtonNum() >= 0 && packet.getButtonNum() < 9) || packet.getButtonNum() == 40) { if ((packet.getButtonNum() >= 0 && packet.getButtonNum() < 9) || packet.getButtonNum() == 40) {
@ -22,7 +22,7 @@ index 236ab643cdd65b3572860aedf1f5ac18ff96139a..65bb221993147a558995b36fb835f7b8
Slot clickedSlot = this.player.containerMenu.getSlot(packet.getSlotNum()); Slot clickedSlot = this.player.containerMenu.getSlot(packet.getSlotNum());
if (clickedSlot.mayPickup(this.player)) { if (clickedSlot.mayPickup(this.player)) {
diff --git a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java b/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java diff --git a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java b/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java
index 3ef712299fe248602b0b117c0a8e285cdf4e05c2..aea228ea9fee51c25a03ce1c54bf9dff0741e053 100644 index 9ee3c2e0dcfaa4280be4973479c6490ded33809c..96a2d06e8da8bf0f0a3b0af813bf79d448940a3a 100644
--- a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java --- a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java
+++ b/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java +++ b/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java
@@ -423,6 +423,7 @@ public abstract class AbstractContainerMenu { @@ -423,6 +423,7 @@ public abstract class AbstractContainerMenu {
@ -33,13 +33,3 @@ index 3ef712299fe248602b0b117c0a8e285cdf4e05c2..aea228ea9fee51c25a03ce1c54bf9dff
slot = (Slot) this.slots.get(slotIndex); slot = (Slot) this.slots.get(slotIndex);
itemstack = this.getCarried(); itemstack = this.getCarried();
if (AbstractContainerMenu.canItemQuickReplace(slot, itemstack, true) && slot.mayPlace(itemstack) && (this.quickcraftType == 2 || itemstack.getCount() > this.quickcraftSlots.size()) && this.canDragTo(slot)) { if (AbstractContainerMenu.canItemQuickReplace(slot, itemstack, true) && slot.mayPlace(itemstack) && (this.quickcraftType == 2 || itemstack.getCount() > this.quickcraftSlots.size()) && this.canDragTo(slot)) {
@@ -597,7 +598,8 @@ public abstract class AbstractContainerMenu {
Slot slot2;
int j2;
- if (actionType == ClickType.SWAP) {
+ if (actionType == ClickType.SWAP && (button == 40 || button >= 0 && button < 9)) { // Paper
+ if (slotIndex < 0 || button < 0) return; // Paper
slot2 = (Slot) this.slots.get(slotIndex);
itemstack1 = playerinventory.getItem(button);
itemstack = slot2.getItem();

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Call BlockRedstoneEvents for lecterns
diff --git a/src/main/java/net/minecraft/world/level/block/LecternBlock.java b/src/main/java/net/minecraft/world/level/block/LecternBlock.java diff --git a/src/main/java/net/minecraft/world/level/block/LecternBlock.java b/src/main/java/net/minecraft/world/level/block/LecternBlock.java
index d8489fc7bbc57aa2a53026c79d2e2b2718b32912..2da67bd990b3f3762dfe089bf543cebac66378db 100644 index f14f35e0f5a087845f7229a68e996feb06c946d4..38f68917119b30be2787363697a0501080362a90 100644
--- a/src/main/java/net/minecraft/world/level/block/LecternBlock.java --- a/src/main/java/net/minecraft/world/level/block/LecternBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/LecternBlock.java +++ b/src/main/java/net/minecraft/world/level/block/LecternBlock.java
@@ -171,6 +171,16 @@ public class LecternBlock extends BaseEntityBlock { @@ -178,6 +178,16 @@ public class LecternBlock extends BaseEntityBlock {
} }
private static void changePowered(Level world, BlockPos pos, BlockState state, boolean powered) { private static void changePowered(Level world, BlockPos pos, BlockState state, boolean powered) {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Allow proper checking of empty item stacks
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
index ff9e42299d46764cd53f72c730716102c6b8aa3c..654694515b4b9257a41c8623675fa3abc51a1cb7 100644 index 3660ad55cc7e1f6e571887aac9c0215803f1ce41..f9ae1d0889e7f8ff8753d27619bfeb6e9c23f5fe 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
@@ -33,12 +33,19 @@ public final class CraftItemStack extends ItemStack { @@ -33,12 +33,19 @@ public final class CraftItemStack extends ItemStack {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Fix silent equipment change for mobs
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
index 1e997c1758ed86dc563983317ceb17e626b8dba7..956d05e2ae59978ea9623ca0e167c0afe0b87306 100644 index 16d84042e2575418880897c728a99d1b8bbcdd15..5af48151159135b869ec4753bbcf79dd257c1570 100644
--- a/src/main/java/net/minecraft/world/entity/Mob.java --- a/src/main/java/net/minecraft/world/entity/Mob.java
+++ b/src/main/java/net/minecraft/world/entity/Mob.java +++ b/src/main/java/net/minecraft/world/entity/Mob.java
@@ -1058,13 +1058,20 @@ public abstract class Mob extends LivingEntity implements Targeting { @@ -1059,13 +1059,20 @@ public abstract class Mob extends LivingEntity implements Targeting {
@Override @Override
public void setItemSlot(EquipmentSlot slot, ItemStack stack) { public void setItemSlot(EquipmentSlot slot, ItemStack stack) {
@ -47,10 +47,10 @@ index 8e9469fec42f7b6a132cf173f6f5a95777a29b3b..b319021b22c5dceba6199ed27814b2dc
this.reassessWeaponGoal(); this.reassessWeaponGoal();
} }
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index f2f93761985a78b563dd1eda57f9a08b1cc8893a..2354a0e5d15e9be633d9fe3a1a9feefe7b9b7782 100644 index 0afad3487a3939981abda6a2342e90683816a39f..396d32cde12ea7022714c4971ecbba3d215bb15b 100644
--- a/src/main/java/net/minecraft/world/level/Level.java --- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -1870,7 +1870,10 @@ public abstract class Level implements LevelAccessor, AutoCloseable { @@ -1890,7 +1890,10 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
// Paper end - optimize redstone (Alternate Current) // Paper end - optimize redstone (Alternate Current)
// Paper start - notify observers even if grow failed // Paper start - notify observers even if grow failed
public void checkCapturedTreeStateForObserverNotify(final BlockPos pos, final CraftBlockState craftBlockState) { public void checkCapturedTreeStateForObserverNotify(final BlockPos pos, final CraftBlockState craftBlockState) {

View File

@ -18,7 +18,7 @@ index da5ff65fade5cdf14fad3705c08b48896bc4c36d..d6cbe98e67fdbf8db46338a88ab1356d
void setMaxStackSize(int size); void setMaxStackSize(int size);
diff --git a/src/main/java/net/minecraft/world/SimpleContainer.java b/src/main/java/net/minecraft/world/SimpleContainer.java diff --git a/src/main/java/net/minecraft/world/SimpleContainer.java b/src/main/java/net/minecraft/world/SimpleContainer.java
index 9d1ee40456a8d7001eee654a62e62cab2626305a..ecd6cb02ef326c8e1d7fba8138d806f3107b5ac0 100644 index 061e870e0cdd5bf00351b7e8104361bce86809f3..0259d188e6e16384069bf2a1c6e0197fe631ab6b 100644
--- a/src/main/java/net/minecraft/world/SimpleContainer.java --- a/src/main/java/net/minecraft/world/SimpleContainer.java
+++ b/src/main/java/net/minecraft/world/SimpleContainer.java +++ b/src/main/java/net/minecraft/world/SimpleContainer.java
@@ -30,7 +30,7 @@ public class SimpleContainer implements Container, StackedContentsCompatible { @@ -30,7 +30,7 @@ public class SimpleContainer implements Container, StackedContentsCompatible {
@ -57,10 +57,10 @@ index 9d1ee40456a8d7001eee654a62e62cab2626305a..ecd6cb02ef326c8e1d7fba8138d806f3
public SimpleContainer(int i, org.bukkit.inventory.InventoryHolder owner) { public SimpleContainer(int i, org.bukkit.inventory.InventoryHolder owner) {
this.bukkitOwner = owner; this.bukkitOwner = owner;
diff --git a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java b/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java diff --git a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java b/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java
index aea228ea9fee51c25a03ce1c54bf9dff0741e053..82f18790b9dc55b039ae03600a80a46d56a87521 100644 index 96a2d06e8da8bf0f0a3b0af813bf79d448940a3a..97426fe50149123e6a94989ee98c6d0aad4ca1cb 100644
--- a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java --- a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java
+++ b/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java +++ b/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java
@@ -1025,4 +1025,15 @@ public abstract class AbstractContainerMenu { @@ -1028,4 +1028,15 @@ public abstract class AbstractContainerMenu {
this.stateId = this.stateId + 1 & 32767; this.stateId = this.stateId + 1 & 32767;
return this.stateId; return this.stateId;
} }