Applied all patches
Dieser Commit ist enthalten in:
Ursprung
18d51375b8
Commit
7d24f2ef06
@ -29,7 +29,7 @@ index a00c3d96f2fc7131d1f4afa7af4e41ace3cfce89..72abebff2018cde2922e97ad6478f93d
|
||||
private EntitySelector() {}
|
||||
// Paper start
|
||||
diff --git a/src/main/java/net/minecraft/world/level/levelgen/PhantomSpawner.java b/src/main/java/net/minecraft/world/level/levelgen/PhantomSpawner.java
|
||||
index 24fa62da17ad6c84d45c6fb726305a87df85d2aa..1c3718d9244513d9fc795dceb564a81375734557 100644
|
||||
index 66ac41d8fce4176feecf9a7e89e15244f47d261d..e8ae4449696d73c8c9b8b27d4d2e20db933a72cc 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/levelgen/PhantomSpawner.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/levelgen/PhantomSpawner.java
|
||||
@@ -35,13 +35,22 @@ public class PhantomSpawner implements CustomSpawner {
|
||||
@ -57,7 +57,7 @@ index 24fa62da17ad6c84d45c6fb726305a87df85d2aa..1c3718d9244513d9fc795dceb564a813
|
||||
return 0;
|
||||
} else {
|
||||
@@ -62,7 +71,7 @@ public class PhantomSpawner implements CustomSpawner {
|
||||
int j = Mth.clamp(serverstatisticmanager.getValue(Stats.CUSTOM.get(Stats.TIME_SINCE_REST)), (int) 1, Integer.MAX_VALUE);
|
||||
int j = Mth.clamp(serverstatisticmanager.getValue(Stats.CUSTOM.get(Stats.TIME_SINCE_REST)), 1, Integer.MAX_VALUE);
|
||||
boolean flag2 = true;
|
||||
|
||||
- if (randomsource.nextInt(j) >= 72000) {
|
@ -9,7 +9,7 @@ also check if all packets are ignored during the shutdown process.
|
||||
See net.minecraft.network.Connection#channelRead0(ChannelHandlerContext, Packet) and net.minecraft.util.thread.BlockableEventLoop#executeIfPossible(Runnable)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/network/protocol/PacketUtils.java b/src/main/java/net/minecraft/network/protocol/PacketUtils.java
|
||||
index 8bc0cb9ad5bb4e76d962ff54305e2c08e279a17b..27d4aa45e585842c04491839826d405d6f447f0e 100644
|
||||
index 23c81b3a96056f0b755735ad75fc81af9b046475..10ce342d663527601a638a9904257648b867e8f3 100644
|
||||
--- a/src/main/java/net/minecraft/network/protocol/PacketUtils.java
|
||||
+++ b/src/main/java/net/minecraft/network/protocol/PacketUtils.java
|
||||
@@ -41,7 +41,7 @@ public class PacketUtils {
|
@ -8,10 +8,10 @@ offhand slot isn't sent. This is not correct because you *can* put stuff into th
|
||||
by pressing the offhand swap item
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 7baf5c0852b5e2edea6459eb2c8de1ebc1ede822..289429eb464548acc80262a49444f49f8f57fc0c 100644
|
||||
index b18d8e23e98a01d095a27227516d9ff44fd1d14c..ca5291a9573a62cb5c19539cf5c7aceff11f9829 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -290,6 +290,13 @@ public class ServerPlayer extends Player {
|
||||
@@ -296,6 +296,13 @@ public class ServerPlayer extends Player {
|
||||
|
||||
}
|
||||
|
||||
@ -26,7 +26,7 @@ index 7baf5c0852b5e2edea6459eb2c8de1ebc1ede822..289429eb464548acc80262a49444f49f
|
||||
public void sendSlotChange(AbstractContainerMenu handler, int slot, ItemStack stack) {
|
||||
ServerPlayer.this.connection.send(new ClientboundContainerSetSlotPacket(handler.containerId, handler.incrementStateId(), slot, stack));
|
||||
diff --git a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java b/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java
|
||||
index fcedd5afe138a97063d2fdd50edb1da16dcff9fd..143977055717c2fe27df76231da304e2863b8f1f 100644
|
||||
index 0954e834ca4c777de61f5d45812008cc7c2ac733..c84908095a93d42826b21bf5f3490410fb0a5708 100644
|
||||
--- a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java
|
||||
+++ b/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java
|
||||
@@ -200,6 +200,7 @@ public abstract class AbstractContainerMenu {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Player Entity Tracking Events
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 7443fb7fae30f22b2eaa2727c383c56891904068..778f2112db84655113b29df39567e4135940b305 100644
|
||||
index 9796c6fc7c114e3e2af0dc433a87cda910683e06..071b241de8f6e00f57e8564bb3feb757ee1f05eb 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -3849,9 +3849,21 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -3894,9 +3894,21 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
EnchantmentHelper.doPostDamageEffects(attacker, target);
|
||||
}
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Limit pet look distance
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/FollowOwnerGoal.java b/src/main/java/net/minecraft/world/entity/ai/goal/FollowOwnerGoal.java
|
||||
index 7dc8cc93e8da37e1096c3263c1c8fc55bbf60401..11a101e8ff05fbda5e84018358be02014ca01854 100644
|
||||
index e4ecad5cca182ead780b1b4d78ea1e7be62bd1ca..4fe177c950c769f5c6e76b522019b5d5b78259a5 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/ai/goal/FollowOwnerGoal.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/ai/goal/FollowOwnerGoal.java
|
||||
@@ -89,7 +89,7 @@ public class FollowOwnerGoal extends Goal {
|
||||
@@ -93,7 +93,7 @@ public class FollowOwnerGoal extends Goal {
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
@ -16,4 +16,4 @@ index 7dc8cc93e8da37e1096c3263c1c8fc55bbf60401..11a101e8ff05fbda5e84018358be0201
|
||||
+ if (this.tamable.distanceToSqr(this.owner) <= 16 * 16) this.tamable.getLookControl().setLookAt(this.owner, 10.0F, (float) this.tamable.getMaxHeadXRot()); // Paper
|
||||
if (--this.timeToRecalcPath <= 0) {
|
||||
this.timeToRecalcPath = this.adjustedTickDelay(10);
|
||||
if (!this.tamable.isLeashed() && !this.tamable.isPassenger()) {
|
||||
if (this.tamable.distanceToSqr((Entity) this.owner) >= 144.0D) {
|
@ -14,10 +14,10 @@ See: https://github.com/PaperMC/Paper/pull/1896
|
||||
public net.minecraft.server.level.ChunkMap$TrackedEntity serverEntity
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/network/syncher/SynchedEntityData.java b/src/main/java/net/minecraft/network/syncher/SynchedEntityData.java
|
||||
index 755989780c955592e27cae2b4b5f0e90e13543b7..37e193f57938047c8b886ed7d2816411392f94b4 100644
|
||||
index a276aed4821eb992e0f20e2d2c6229e0b96eef73..ff7ba7a161cfed7521354bc6e3f21ba0f17f3760 100644
|
||||
--- a/src/main/java/net/minecraft/network/syncher/SynchedEntityData.java
|
||||
+++ b/src/main/java/net/minecraft/network/syncher/SynchedEntityData.java
|
||||
@@ -244,14 +244,46 @@ public class SynchedEntityData {
|
||||
@@ -249,14 +249,46 @@ public class SynchedEntityData {
|
||||
// CraftBukkit start
|
||||
public void refresh(ServerPlayer to) {
|
||||
if (!this.isEmpty()) {
|
||||
@ -66,10 +66,10 @@ index 755989780c955592e27cae2b4b5f0e90e13543b7..37e193f57938047c8b886ed7d2816411
|
||||
public static class DataItem<T> {
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index cc780cfc359bb1872cd78136497f94cc7e2a67c4..0bcfd196f5cdd2fc769755a2f79bb4768e2db66f 100644
|
||||
index e5caa9cbd1444698409bb6c4e46ee4086a37ebf5..5ddb75e6f60e4a4960018055991ea087ec473beb 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2776,7 +2776,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2790,7 +2790,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
|
||||
// Entity in bucket - SPIGOT-4048 and SPIGOT-6859a
|
||||
if ((entity instanceof Bucketable && entity instanceof LivingEntity && origItem != null && origItem.asItem() == Items.WATER_BUCKET) && (event.isCancelled() || ServerGamePacketListenerImpl.this.player.getInventory().getSelected() == null || ServerGamePacketListenerImpl.this.player.getInventory().getSelected().getItem() != origItem)) {
|
||||
@ -79,18 +79,18 @@ index cc780cfc359bb1872cd78136497f94cc7e2a67c4..0bcfd196f5cdd2fc769755a2f79bb476
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index b75966168795dcd0e89634bb9edf0206c8337d4a..1b0ca19cd61a55998676b9f8ca17bf79966385db 100644
|
||||
index fc404bc963fbe510b81d2317d694e30c71f23eb0..3793cc8a2cc917ba33b18c5af7fac25e9c1da288 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -351,7 +351,7 @@ public abstract class PlayerList {
|
||||
@@ -357,7 +357,7 @@ public abstract class PlayerList {
|
||||
((ServerLevel)player.level).getChunkSource().chunkMap.addEntity(player); // Paper - track entity now
|
||||
// CraftBukkit end
|
||||
|
||||
- player.getEntityData().refresh(player); // CraftBukkit - BungeeCord#2321, send complete data to self on spawn
|
||||
+ //player.getEntityData().refresh(player); // CraftBukkit - BungeeCord#2321, send complete data to self on spawn Paper - THIS IS NOT NEEDED ANYMORE
|
||||
|
||||
// CraftBukkit start - Only add if the player wasn't moved in the event
|
||||
if (player.level == worldserver1 && !worldserver1.players().contains(player)) {
|
||||
this.sendLevelInfo(player, worldserver1);
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/Bucketable.java b/src/main/java/net/minecraft/world/entity/animal/Bucketable.java
|
||||
index 09654dd8895669109246f9bff36ab5ff5f533f65..9695a80c45b36c84f5fdef651b26a2c09d7f1f9b 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/Bucketable.java
|
@ -8,10 +8,10 @@ Fixes some wrong reasons, and adds missing spawn reasons for entities.
|
||||
Co-authored-by: Doc <nachito94@msn.com>
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java
|
||||
index 9d6979f4a00e2f6bcba21b3e2b48e9b62e057931..65b829ad019eb167bf7a9c4931e3006146dd742e 100644
|
||||
index 51274302ad0d500b9291c000d457be24caf52a74..fa10d60cf7f80c429690f20c3bccdd8bbe7752e8 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/EntityType.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/EntityType.java
|
||||
@@ -341,7 +341,7 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT
|
||||
@@ -348,7 +348,7 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT
|
||||
@Nullable
|
||||
public T spawn(ServerLevel world, @Nullable ItemStack stack, @Nullable Player player, BlockPos pos, MobSpawnType spawnReason, boolean alignPosition, boolean invertY) {
|
||||
// CraftBukkit start
|
||||
@ -34,10 +34,10 @@ index 6afe37e42d88701af38df5793a9ea9d7d2cda5c5..c72ab3c9f7cb20f22b051981fe1fc419
|
||||
this.discard();
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/CarvedPumpkinBlock.java b/src/main/java/net/minecraft/world/level/block/CarvedPumpkinBlock.java
|
||||
index 3a6b84fab71d65be6215bde5bdabb303d418623e..f77dd9f9dc89d880386cc2da398cd7ec9c768c43 100644
|
||||
index 86365234d6c0ff5f0d5545a6ecc0bb08e6609108..05112bc416019daba885a3de1b7f96177665135f 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/CarvedPumpkinBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/CarvedPumpkinBlock.java
|
||||
@@ -89,7 +89,17 @@ public class CarvedPumpkinBlock extends HorizontalDirectionalBlock implements We
|
||||
@@ -90,7 +90,17 @@ public class CarvedPumpkinBlock extends HorizontalDirectionalBlock implements Eq
|
||||
// clearPatternBlocks(world, shapedetector_shapedetectorcollection); // CraftBukkit - moved down
|
||||
entity.moveTo((double) pos.getX() + 0.5D, (double) pos.getY() + 0.05D, (double) pos.getZ() + 0.5D, 0.0F, 0.0F);
|
||||
// CraftBukkit start
|
@ -6,10 +6,10 @@ Subject: [PATCH] fix Instruments
|
||||
properly handle Player#playNote
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index bd202861639727012506415e4b90f6de808081db..42cff4d205f36a4342e645139bcff86027239b55 100644
|
||||
index 7944f6a130da8f370f8018fad495694c61a94338..c3c4bc73310993f3a92d8aa171289fc61da8949f 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -767,62 +767,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -768,62 +768,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
public void playNote(Location loc, Instrument instrument, Note note) {
|
||||
if (this.getHandle().connection == null) return;
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Improve inlining for some hot BlockBehavior and FluidState
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
|
||||
index 9ebc53d434737c8cd39073470b2b5fcbad167812..25ce337ed266be7bafeacd9eb6f53a9474775fc5 100644
|
||||
index cd939384f022609c96b055c25db7e098e4256336..505503a3f59d4b747649275c6f6faa504b7c7b64 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
|
||||
@@ -851,15 +851,15 @@ public abstract class BlockBehaviour implements FeatureElement {
|
||||
@@ -876,15 +876,15 @@ public abstract class BlockBehaviour implements FeatureElement {
|
||||
return this.shapeExceedsCube; // Paper - moved into shape cache init
|
||||
}
|
||||
|
||||
@ -28,7 +28,7 @@ index 9ebc53d434737c8cd39073470b2b5fcbad167812..25ce337ed266be7bafeacd9eb6f53a94
|
||||
return this.isAir;
|
||||
}
|
||||
|
||||
@@ -933,7 +933,7 @@ public abstract class BlockBehaviour implements FeatureElement {
|
||||
@@ -958,7 +958,7 @@ public abstract class BlockBehaviour implements FeatureElement {
|
||||
}
|
||||
}
|
||||
|
||||
@ -37,7 +37,7 @@ index 9ebc53d434737c8cd39073470b2b5fcbad167812..25ce337ed266be7bafeacd9eb6f53a94
|
||||
return this.canOcclude;
|
||||
}
|
||||
|
||||
@@ -1135,11 +1135,11 @@ public abstract class BlockBehaviour implements FeatureElement {
|
||||
@@ -1155,11 +1155,11 @@ public abstract class BlockBehaviour implements FeatureElement {
|
||||
return this.getBlock() == block;
|
||||
}
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Fix MapLike Codec missing key 'selector'
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/gameevent/vibrations/VibrationListener.java b/src/main/java/net/minecraft/world/level/gameevent/vibrations/VibrationListener.java
|
||||
index f25d523ae5a5228bca376c4911a92608f4c82df8..3288837a406539c4a22464524ffb2e727c6ad32b 100644
|
||||
index 586d0a40cc4f36e80236e87232bb58f81ec089a5..103e12ec589dcbe6dbad7432b50e0644c3a37b1b 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/gameevent/vibrations/VibrationListener.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/gameevent/vibrations/VibrationListener.java
|
||||
@@ -97,7 +97,7 @@ public class VibrationListener implements GameEventListener {
|
||||
@@ -99,7 +99,7 @@ public class VibrationListener implements GameEventListener {
|
||||
return vibrationlistener.listenerRange;
|
||||
}), VibrationInfo.CODEC.optionalFieldOf("event").forGetter((vibrationlistener) -> {
|
||||
return Optional.ofNullable(vibrationlistener.currentVibration);
|
@ -86,10 +86,10 @@ index eb55015f4c867fbf08430288744f58a3b9d86e89..958134519befadc27a5b647caf64acf2
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
|
||||
index 7ebe73921d197da4f992ddb92cbd4ac7211bd6cf..58fa7b99dc7a9745afe6faf31c1804e95ed27dbe 100644
|
||||
index 6b5602a6b112c579cd39fffd167f316ea96511f5..9598aa381978194fee859721731196f0e6ee08fc 100644
|
||||
--- a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
|
||||
+++ b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
|
||||
@@ -216,7 +216,7 @@ public interface DispenseItemBehavior {
|
||||
@@ -217,7 +217,7 @@ public interface DispenseItemBehavior {
|
||||
|
||||
// CraftBukkit start
|
||||
ServerLevel worldserver = pointer.getLevel();
|
||||
@ -98,7 +98,7 @@ index 7ebe73921d197da4f992ddb92cbd4ac7211bd6cf..58fa7b99dc7a9745afe6faf31c1804e9
|
||||
org.bukkit.block.Block block = worldserver.getWorld().getBlockAt(pointer.getPos().getX(), pointer.getPos().getY(), pointer.getPos().getZ());
|
||||
CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemstack1);
|
||||
|
||||
@@ -226,12 +226,13 @@ public interface DispenseItemBehavior {
|
||||
@@ -227,12 +227,13 @@ public interface DispenseItemBehavior {
|
||||
}
|
||||
|
||||
if (event.isCancelled()) {
|
||||
@ -114,7 +114,7 @@ index 7ebe73921d197da4f992ddb92cbd4ac7211bd6cf..58fa7b99dc7a9745afe6faf31c1804e9
|
||||
// Chain to handler for new item
|
||||
ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem());
|
||||
DispenseItemBehavior idispensebehavior = (DispenseItemBehavior) DispenserBlock.DISPENSER_REGISTRY.get(eventStack.getItem());
|
||||
@@ -248,7 +249,7 @@ public interface DispenseItemBehavior {
|
||||
@@ -249,7 +250,7 @@ public interface DispenseItemBehavior {
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
@ -123,7 +123,7 @@ index 7ebe73921d197da4f992ddb92cbd4ac7211bd6cf..58fa7b99dc7a9745afe6faf31c1804e9
|
||||
// CraftBukkit end
|
||||
pointer.getLevel().gameEvent((Entity) null, GameEvent.ENTITY_PLACE, pointer.getPos());
|
||||
return stack;
|
||||
@@ -270,7 +271,7 @@ public interface DispenseItemBehavior {
|
||||
@@ -271,7 +272,7 @@ public interface DispenseItemBehavior {
|
||||
ServerLevel worldserver = pointer.getLevel();
|
||||
|
||||
// CraftBukkit start
|
||||
@ -132,7 +132,7 @@ index 7ebe73921d197da4f992ddb92cbd4ac7211bd6cf..58fa7b99dc7a9745afe6faf31c1804e9
|
||||
org.bukkit.block.Block block = worldserver.getWorld().getBlockAt(pointer.getPos().getX(), pointer.getPos().getY(), pointer.getPos().getZ());
|
||||
CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemstack1);
|
||||
|
||||
@@ -280,12 +281,13 @@ public interface DispenseItemBehavior {
|
||||
@@ -281,12 +282,13 @@ public interface DispenseItemBehavior {
|
||||
}
|
||||
|
||||
if (event.isCancelled()) {
|
||||
@ -148,16 +148,16 @@ index 7ebe73921d197da4f992ddb92cbd4ac7211bd6cf..58fa7b99dc7a9745afe6faf31c1804e9
|
||||
// Chain to handler for new item
|
||||
ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem());
|
||||
DispenseItemBehavior idispensebehavior = (DispenseItemBehavior) DispenserBlock.DISPENSER_REGISTRY.get(eventStack.getItem());
|
||||
@@ -301,7 +303,7 @@ public interface DispenseItemBehavior {
|
||||
EntityType.updateCustomEntityTag(worldserver, (Player) null, entityarmorstand, stack.getTag());
|
||||
entityarmorstand.setYRot(enumdirection.toYRot());
|
||||
worldserver.addFreshEntity(entityarmorstand);
|
||||
- // itemstack.shrink(1); // CraftBukkit - Handled during event processing
|
||||
+ if (shrink) stack.shrink(1); // Paper - actually handle here
|
||||
@@ -303,7 +305,7 @@ public interface DispenseItemBehavior {
|
||||
ArmorStand entityarmorstand = (ArmorStand) EntityType.ARMOR_STAND.spawn(worldserver, stack.getTag(), consumer, blockposition, MobSpawnType.DISPENSER, false, false);
|
||||
|
||||
if (entityarmorstand != null) {
|
||||
- // itemstack.shrink(1); // CraftBukkit - Handled during event processing
|
||||
+ if (shrink) stack.shrink(1); // Paper - actually handle here
|
||||
}
|
||||
|
||||
return stack;
|
||||
}
|
||||
});
|
||||
@@ -321,7 +323,7 @@ public interface DispenseItemBehavior {
|
||||
@@ -325,7 +327,7 @@ public interface DispenseItemBehavior {
|
||||
|
||||
if (!list.isEmpty()) {
|
||||
// CraftBukkit start
|
||||
@ -166,7 +166,7 @@ index 7ebe73921d197da4f992ddb92cbd4ac7211bd6cf..58fa7b99dc7a9745afe6faf31c1804e9
|
||||
Level world = pointer.getLevel();
|
||||
org.bukkit.block.Block block = world.getWorld().getBlockAt(pointer.getPos().getX(), pointer.getPos().getY(), pointer.getPos().getZ());
|
||||
CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemstack1);
|
||||
@@ -332,12 +334,13 @@ public interface DispenseItemBehavior {
|
||||
@@ -336,12 +338,13 @@ public interface DispenseItemBehavior {
|
||||
}
|
||||
|
||||
if (event.isCancelled()) {
|
||||
@ -182,7 +182,7 @@ index 7ebe73921d197da4f992ddb92cbd4ac7211bd6cf..58fa7b99dc7a9745afe6faf31c1804e9
|
||||
// Chain to handler for new item
|
||||
ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem());
|
||||
DispenseItemBehavior idispensebehavior = (DispenseItemBehavior) DispenserBlock.DISPENSER_REGISTRY.get(eventStack.getItem());
|
||||
@@ -348,7 +351,7 @@ public interface DispenseItemBehavior {
|
||||
@@ -352,7 +355,7 @@ public interface DispenseItemBehavior {
|
||||
}
|
||||
// CraftBukkit end
|
||||
((Saddleable) list.get(0)).equipSaddle(SoundSource.BLOCKS, CraftItemStack.asNMSCopy(event.getItem())); // Paper - Fix saddles losing nbt data - MC-191591
|
||||
@ -191,7 +191,7 @@ index 7ebe73921d197da4f992ddb92cbd4ac7211bd6cf..58fa7b99dc7a9745afe6faf31c1804e9
|
||||
this.setSuccess(true);
|
||||
return stack;
|
||||
} else {
|
||||
@@ -376,7 +379,7 @@ public interface DispenseItemBehavior {
|
||||
@@ -380,7 +383,7 @@ public interface DispenseItemBehavior {
|
||||
} while (!entityhorseabstract.isArmor(stack) || entityhorseabstract.isWearingArmor() || !entityhorseabstract.isTamed());
|
||||
|
||||
// CraftBukkit start
|
||||
@ -200,7 +200,7 @@ index 7ebe73921d197da4f992ddb92cbd4ac7211bd6cf..58fa7b99dc7a9745afe6faf31c1804e9
|
||||
Level world = pointer.getLevel();
|
||||
org.bukkit.block.Block block = world.getWorld().getBlockAt(pointer.getPos().getX(), pointer.getPos().getY(), pointer.getPos().getZ());
|
||||
CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemstack1);
|
||||
@@ -387,12 +390,13 @@ public interface DispenseItemBehavior {
|
||||
@@ -391,12 +394,13 @@ public interface DispenseItemBehavior {
|
||||
}
|
||||
|
||||
if (event.isCancelled()) {
|
||||
@ -216,7 +216,7 @@ index 7ebe73921d197da4f992ddb92cbd4ac7211bd6cf..58fa7b99dc7a9745afe6faf31c1804e9
|
||||
// Chain to handler for new item
|
||||
ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem());
|
||||
DispenseItemBehavior idispensebehavior = (DispenseItemBehavior) DispenserBlock.DISPENSER_REGISTRY.get(eventStack.getItem());
|
||||
@@ -402,6 +406,7 @@ public interface DispenseItemBehavior {
|
||||
@@ -406,6 +410,7 @@ public interface DispenseItemBehavior {
|
||||
}
|
||||
}
|
||||
|
||||
@ -224,7 +224,7 @@ index 7ebe73921d197da4f992ddb92cbd4ac7211bd6cf..58fa7b99dc7a9745afe6faf31c1804e9
|
||||
entityhorseabstract.getSlot(401).set(CraftItemStack.asNMSCopy(event.getItem()));
|
||||
// CraftBukkit end
|
||||
this.setSuccess(true);
|
||||
@@ -448,7 +453,7 @@ public interface DispenseItemBehavior {
|
||||
@@ -452,7 +457,7 @@ public interface DispenseItemBehavior {
|
||||
entityhorsechestedabstract = (AbstractChestedHorse) iterator1.next();
|
||||
// CraftBukkit start
|
||||
} while (!entityhorsechestedabstract.isTamed());
|
||||
@ -233,7 +233,7 @@ index 7ebe73921d197da4f992ddb92cbd4ac7211bd6cf..58fa7b99dc7a9745afe6faf31c1804e9
|
||||
Level world = pointer.getLevel();
|
||||
org.bukkit.block.Block block = world.getWorld().getBlockAt(pointer.getPos().getX(), pointer.getPos().getY(), pointer.getPos().getZ());
|
||||
CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemstack1);
|
||||
@@ -459,10 +464,13 @@ public interface DispenseItemBehavior {
|
||||
@@ -463,10 +468,13 @@ public interface DispenseItemBehavior {
|
||||
}
|
||||
|
||||
if (event.isCancelled()) {
|
||||
@ -247,7 +247,7 @@ index 7ebe73921d197da4f992ddb92cbd4ac7211bd6cf..58fa7b99dc7a9745afe6faf31c1804e9
|
||||
// Chain to handler for new item
|
||||
ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem());
|
||||
DispenseItemBehavior idispensebehavior = (DispenseItemBehavior) DispenserBlock.DISPENSER_REGISTRY.get(eventStack.getItem());
|
||||
@@ -474,7 +482,7 @@ public interface DispenseItemBehavior {
|
||||
@@ -478,7 +486,7 @@ public interface DispenseItemBehavior {
|
||||
entityhorsechestedabstract.getSlot(499).set(CraftItemStack.asNMSCopy(event.getItem()));
|
||||
// CraftBukkit end
|
||||
|
||||
@ -256,7 +256,7 @@ index 7ebe73921d197da4f992ddb92cbd4ac7211bd6cf..58fa7b99dc7a9745afe6faf31c1804e9
|
||||
this.setSuccess(true);
|
||||
return stack;
|
||||
}
|
||||
@@ -485,7 +493,7 @@ public interface DispenseItemBehavior {
|
||||
@@ -489,7 +497,7 @@ public interface DispenseItemBehavior {
|
||||
Direction enumdirection = (Direction) pointer.getBlockState().getValue(DispenserBlock.FACING);
|
||||
// CraftBukkit start
|
||||
ServerLevel worldserver = pointer.getLevel();
|
||||
@ -265,7 +265,7 @@ index 7ebe73921d197da4f992ddb92cbd4ac7211bd6cf..58fa7b99dc7a9745afe6faf31c1804e9
|
||||
org.bukkit.block.Block block = worldserver.getWorld().getBlockAt(pointer.getPos().getX(), pointer.getPos().getY(), pointer.getPos().getZ());
|
||||
CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemstack1);
|
||||
|
||||
@@ -495,12 +503,13 @@ public interface DispenseItemBehavior {
|
||||
@@ -499,12 +507,13 @@ public interface DispenseItemBehavior {
|
||||
}
|
||||
|
||||
if (event.isCancelled()) {
|
||||
@ -281,7 +281,7 @@ index 7ebe73921d197da4f992ddb92cbd4ac7211bd6cf..58fa7b99dc7a9745afe6faf31c1804e9
|
||||
// Chain to handler for new item
|
||||
ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem());
|
||||
DispenseItemBehavior idispensebehavior = (DispenseItemBehavior) DispenserBlock.DISPENSER_REGISTRY.get(eventStack.getItem());
|
||||
@@ -517,7 +526,7 @@ public interface DispenseItemBehavior {
|
||||
@@ -521,7 +530,7 @@ public interface DispenseItemBehavior {
|
||||
DispenseItemBehavior.setEntityPokingOutOfBlock(pointer, entityfireworks, enumdirection);
|
||||
entityfireworks.shoot((double) enumdirection.getStepX(), (double) enumdirection.getStepY(), (double) enumdirection.getStepZ(), 0.5F, 1.0F);
|
||||
pointer.getLevel().addFreshEntity(entityfireworks);
|
||||
@ -290,7 +290,7 @@ index 7ebe73921d197da4f992ddb92cbd4ac7211bd6cf..58fa7b99dc7a9745afe6faf31c1804e9
|
||||
// CraftBukkit end
|
||||
return stack;
|
||||
}
|
||||
@@ -542,7 +551,7 @@ public interface DispenseItemBehavior {
|
||||
@@ -546,7 +555,7 @@ public interface DispenseItemBehavior {
|
||||
double d5 = randomsource.triangle((double) enumdirection.getStepZ(), 0.11485000000000001D);
|
||||
|
||||
// CraftBukkit start
|
||||
@ -299,7 +299,7 @@ index 7ebe73921d197da4f992ddb92cbd4ac7211bd6cf..58fa7b99dc7a9745afe6faf31c1804e9
|
||||
org.bukkit.block.Block block = worldserver.getWorld().getBlockAt(pointer.getPos().getX(), pointer.getPos().getY(), pointer.getPos().getZ());
|
||||
CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemstack1);
|
||||
|
||||
@@ -552,12 +561,13 @@ public interface DispenseItemBehavior {
|
||||
@@ -556,12 +565,13 @@ public interface DispenseItemBehavior {
|
||||
}
|
||||
|
||||
if (event.isCancelled()) {
|
||||
@ -315,7 +315,7 @@ index 7ebe73921d197da4f992ddb92cbd4ac7211bd6cf..58fa7b99dc7a9745afe6faf31c1804e9
|
||||
// Chain to handler for new item
|
||||
ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem());
|
||||
DispenseItemBehavior idispensebehavior = (DispenseItemBehavior) DispenserBlock.DISPENSER_REGISTRY.get(eventStack.getItem());
|
||||
@@ -572,7 +582,7 @@ public interface DispenseItemBehavior {
|
||||
@@ -576,7 +586,7 @@ public interface DispenseItemBehavior {
|
||||
entitysmallfireball.projectileSource = new org.bukkit.craftbukkit.projectiles.CraftBlockProjectileSource((DispenserBlockEntity) pointer.getEntity());
|
||||
|
||||
worldserver.addFreshEntity(entitysmallfireball);
|
||||
@ -324,7 +324,7 @@ index 7ebe73921d197da4f992ddb92cbd4ac7211bd6cf..58fa7b99dc7a9745afe6faf31c1804e9
|
||||
// CraftBukkit end
|
||||
return stack;
|
||||
}
|
||||
@@ -615,7 +625,7 @@ public interface DispenseItemBehavior {
|
||||
@@ -621,7 +631,7 @@ public interface DispenseItemBehavior {
|
||||
Material material = iblockdata.getMaterial();
|
||||
if (worldserver.isEmptyBlock(blockposition) || !material.isSolid() || material.isReplaceable() || (dispensiblecontaineritem instanceof BucketItem && iblockdata.getBlock() instanceof LiquidBlockContainer && ((LiquidBlockContainer) iblockdata.getBlock()).canPlaceLiquid(worldserver, blockposition, iblockdata, ((BucketItem) dispensiblecontaineritem).content))) {
|
||||
org.bukkit.block.Block block = worldserver.getWorld().getBlockAt(pointer.getPos().getX(), pointer.getPos().getY(), pointer.getPos().getZ());
|
||||
@ -333,7 +333,7 @@ index 7ebe73921d197da4f992ddb92cbd4ac7211bd6cf..58fa7b99dc7a9745afe6faf31c1804e9
|
||||
|
||||
BlockDispenseEvent event = new BlockDispenseEvent(block, craftItem.clone(), new org.bukkit.util.Vector(x, y, z));
|
||||
if (!DispenserBlock.eventFired) {
|
||||
@@ -688,7 +698,7 @@ public interface DispenseItemBehavior {
|
||||
@@ -694,7 +704,7 @@ public interface DispenseItemBehavior {
|
||||
|
||||
// CraftBukkit start
|
||||
org.bukkit.block.Block bukkitBlock = worldserver.getWorld().getBlockAt(pointer.getPos().getX(), pointer.getPos().getY(), pointer.getPos().getZ());
|
||||
@ -342,7 +342,7 @@ index 7ebe73921d197da4f992ddb92cbd4ac7211bd6cf..58fa7b99dc7a9745afe6faf31c1804e9
|
||||
|
||||
BlockDispenseEvent event = new BlockDispenseEvent(bukkitBlock, craftItem.clone(), new org.bukkit.util.Vector(blockposition.getX(), blockposition.getY(), blockposition.getZ()));
|
||||
if (!DispenserBlock.eventFired) {
|
||||
@@ -735,7 +745,7 @@ public interface DispenseItemBehavior {
|
||||
@@ -741,7 +751,7 @@ public interface DispenseItemBehavior {
|
||||
|
||||
// CraftBukkit start
|
||||
org.bukkit.block.Block bukkitBlock = worldserver.getWorld().getBlockAt(pointer.getPos().getX(), pointer.getPos().getY(), pointer.getPos().getZ());
|
||||
@ -351,7 +351,7 @@ index 7ebe73921d197da4f992ddb92cbd4ac7211bd6cf..58fa7b99dc7a9745afe6faf31c1804e9
|
||||
|
||||
BlockDispenseEvent event = new BlockDispenseEvent(bukkitBlock, craftItem.clone(), new org.bukkit.util.Vector(0, 0, 0));
|
||||
if (!DispenserBlock.eventFired) {
|
||||
@@ -796,7 +806,7 @@ public interface DispenseItemBehavior {
|
||||
@@ -802,7 +812,7 @@ public interface DispenseItemBehavior {
|
||||
BlockPos blockposition = pointer.getPos().relative((Direction) pointer.getBlockState().getValue(DispenserBlock.FACING));
|
||||
// CraftBukkit start
|
||||
org.bukkit.block.Block block = worldserver.getWorld().getBlockAt(pointer.getPos().getX(), pointer.getPos().getY(), pointer.getPos().getZ());
|
||||
@ -360,7 +360,7 @@ index 7ebe73921d197da4f992ddb92cbd4ac7211bd6cf..58fa7b99dc7a9745afe6faf31c1804e9
|
||||
|
||||
BlockDispenseEvent event = new BlockDispenseEvent(block, craftItem.clone(), new org.bukkit.util.Vector(0, 0, 0));
|
||||
if (!DispenserBlock.eventFired) {
|
||||
@@ -862,7 +872,7 @@ public interface DispenseItemBehavior {
|
||||
@@ -868,7 +878,7 @@ public interface DispenseItemBehavior {
|
||||
// CraftBukkit start
|
||||
// EntityTNTPrimed entitytntprimed = new EntityTNTPrimed(worldserver, (double) blockposition.getX() + 0.5D, (double) blockposition.getY(), (double) blockposition.getZ() + 0.5D, (EntityLiving) null);
|
||||
|
||||
@ -369,7 +369,7 @@ index 7ebe73921d197da4f992ddb92cbd4ac7211bd6cf..58fa7b99dc7a9745afe6faf31c1804e9
|
||||
org.bukkit.block.Block block = worldserver.getWorld().getBlockAt(pointer.getPos().getX(), pointer.getPos().getY(), pointer.getPos().getZ());
|
||||
CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemstack1);
|
||||
|
||||
@@ -872,12 +882,13 @@ public interface DispenseItemBehavior {
|
||||
@@ -878,12 +888,13 @@ public interface DispenseItemBehavior {
|
||||
}
|
||||
|
||||
if (event.isCancelled()) {
|
||||
@ -385,7 +385,7 @@ index 7ebe73921d197da4f992ddb92cbd4ac7211bd6cf..58fa7b99dc7a9745afe6faf31c1804e9
|
||||
// Chain to handler for new item
|
||||
ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem());
|
||||
DispenseItemBehavior idispensebehavior = (DispenseItemBehavior) DispenserBlock.DISPENSER_REGISTRY.get(eventStack.getItem());
|
||||
@@ -893,7 +904,7 @@ public interface DispenseItemBehavior {
|
||||
@@ -899,7 +910,7 @@ public interface DispenseItemBehavior {
|
||||
worldserver.addFreshEntity(entitytntprimed);
|
||||
worldserver.playSound((Player) null, entitytntprimed.getX(), entitytntprimed.getY(), entitytntprimed.getZ(), SoundEvents.TNT_PRIMED, SoundSource.BLOCKS, 1.0F, 1.0F);
|
||||
worldserver.gameEvent((Entity) null, GameEvent.ENTITY_PLACE, blockposition);
|
||||
@ -394,7 +394,7 @@ index 7ebe73921d197da4f992ddb92cbd4ac7211bd6cf..58fa7b99dc7a9745afe6faf31c1804e9
|
||||
return stack;
|
||||
}
|
||||
});
|
||||
@@ -920,7 +931,7 @@ public interface DispenseItemBehavior {
|
||||
@@ -926,7 +937,7 @@ public interface DispenseItemBehavior {
|
||||
|
||||
// CraftBukkit start
|
||||
org.bukkit.block.Block bukkitBlock = worldserver.getWorld().getBlockAt(pointer.getPos().getX(), pointer.getPos().getY(), pointer.getPos().getZ());
|
||||
@ -403,7 +403,7 @@ index 7ebe73921d197da4f992ddb92cbd4ac7211bd6cf..58fa7b99dc7a9745afe6faf31c1804e9
|
||||
|
||||
BlockDispenseEvent event = new BlockDispenseEvent(bukkitBlock, craftItem.clone(), new org.bukkit.util.Vector(blockposition.getX(), blockposition.getY(), blockposition.getZ()));
|
||||
if (!DispenserBlock.eventFired) {
|
||||
@@ -969,7 +980,7 @@ public interface DispenseItemBehavior {
|
||||
@@ -975,7 +986,7 @@ public interface DispenseItemBehavior {
|
||||
|
||||
// CraftBukkit start
|
||||
org.bukkit.block.Block bukkitBlock = worldserver.getWorld().getBlockAt(pointer.getPos().getX(), pointer.getPos().getY(), pointer.getPos().getZ());
|
||||
@ -412,7 +412,7 @@ index 7ebe73921d197da4f992ddb92cbd4ac7211bd6cf..58fa7b99dc7a9745afe6faf31c1804e9
|
||||
|
||||
BlockDispenseEvent event = new BlockDispenseEvent(bukkitBlock, craftItem.clone(), new org.bukkit.util.Vector(blockposition.getX(), blockposition.getY(), blockposition.getZ()));
|
||||
if (!DispenserBlock.eventFired) {
|
||||
@@ -1042,7 +1053,7 @@ public interface DispenseItemBehavior {
|
||||
@@ -1048,7 +1059,7 @@ public interface DispenseItemBehavior {
|
||||
|
||||
// CraftBukkit start
|
||||
org.bukkit.block.Block bukkitBlock = worldserver.getWorld().getBlockAt(pointer.getPos().getX(), pointer.getPos().getY(), pointer.getPos().getZ());
|
||||
@ -448,10 +448,10 @@ index 38b5d8f7b66f5130dbd126957a4a1e59ec543e4a..0159ed9cbc644c39fa79e62327f13375
|
||||
BlockDispenseEvent event = new BlockDispenseEvent(bukkitBlock, craftItem.clone(), new org.bukkit.util.Vector(blockposition.getX(), blockposition.getY(), blockposition.getZ()));
|
||||
if (!DispenserBlock.eventFired) {
|
||||
diff --git a/src/main/java/net/minecraft/world/item/ArmorItem.java b/src/main/java/net/minecraft/world/item/ArmorItem.java
|
||||
index baa7e055d8ee4a153842128b07984b9f6deac6ca..9c8604376228c02f8bbd9a15673fbdf5097e7cb2 100644
|
||||
index 98aae5bb3cff07fcc081ad4d6c2be8728f3d1637..d7a0cbde8f8c99276307502674c71463fbe7e89c 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/ArmorItem.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/ArmorItem.java
|
||||
@@ -56,7 +56,7 @@ public class ArmorItem extends Item implements Wearable {
|
||||
@@ -61,7 +61,7 @@ public class ArmorItem extends Item implements Equipable {
|
||||
} else {
|
||||
LivingEntity entityliving = (LivingEntity) list.get(0);
|
||||
EquipmentSlot enumitemslot = Mob.getEquipmentSlotForItem(armor);
|
||||
@ -460,7 +460,7 @@ index baa7e055d8ee4a153842128b07984b9f6deac6ca..9c8604376228c02f8bbd9a15673fbdf5
|
||||
// CraftBukkit start
|
||||
Level world = pointer.getLevel();
|
||||
org.bukkit.block.Block block = world.getWorld().getBlockAt(pointer.getPos().getX(), pointer.getPos().getY(), pointer.getPos().getZ());
|
||||
@@ -68,12 +68,13 @@ public class ArmorItem extends Item implements Wearable {
|
||||
@@ -73,12 +73,13 @@ public class ArmorItem extends Item implements Equipable {
|
||||
}
|
||||
|
||||
if (event.isCancelled()) {
|
||||
@ -476,7 +476,7 @@ index baa7e055d8ee4a153842128b07984b9f6deac6ca..9c8604376228c02f8bbd9a15673fbdf5
|
||||
// Chain to handler for new item
|
||||
ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem());
|
||||
DispenseItemBehavior idispensebehavior = (DispenseItemBehavior) DispenserBlock.DISPENSER_REGISTRY.get(eventStack.getItem());
|
||||
@@ -90,6 +91,7 @@ public class ArmorItem extends Item implements Wearable {
|
||||
@@ -95,6 +96,7 @@ public class ArmorItem extends Item implements Equipable {
|
||||
((Mob) entityliving).setPersistenceRequired();
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add BlockLockCheckEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BaseContainerBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BaseContainerBlockEntity.java
|
||||
index a782994e2e53f2c4212c2d59ce740ebf00a826b0..3d37c9a57c01c5035770e20873a801bf2f591cc5 100644
|
||||
index f1acd19432877a833f0d4339f9de4830a0f7b890..8d38ebfdc976b9695ed367591e58de8ca18f00f3 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/BaseContainerBlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/BaseContainerBlockEntity.java
|
||||
@@ -69,17 +69,44 @@ public abstract class BaseContainerBlockEntity extends BlockEntity implements Co
|
||||
@ -56,15 +56,15 @@ index a782994e2e53f2c4212c2d59ce740ebf00a826b0..3d37c9a57c01c5035770e20873a801bf
|
||||
|
||||
@Nullable
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java
|
||||
index 49ca1d45bb4b3ddafc1d5952ff9830ba69b745e2..928625b5ab054ffa412be8a438f58291cc7a3cc0 100644
|
||||
index 79a7178ff474c516eada83f2be3e1bb0eacb368c..ef740d1ad6352ca4af299001a081b720bc472d2e 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java
|
||||
@@ -444,7 +444,7 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name
|
||||
@Nullable
|
||||
@Override
|
||||
public AbstractContainerMenu createMenu(int syncId, Inventory inv, Player player) {
|
||||
- return BaseContainerBlockEntity.canUnlock(player, this.lockKey, this.getDisplayName()) ? new BeaconMenu(syncId, inv, this.dataAccess, ContainerLevelAccess.create(this.level, this.getBlockPos())) : null;
|
||||
+ return BaseContainerBlockEntity.canUnlock(player, this.lockKey, this.getDisplayName(), this) ? new BeaconMenu(syncId, inv, this.dataAccess, ContainerLevelAccess.create(this.level, this.getBlockPos())) : null; // Paper
|
||||
public AbstractContainerMenu createMenu(int syncId, Inventory playerInventory, Player player) {
|
||||
- return BaseContainerBlockEntity.canUnlock(player, this.lockKey, this.getDisplayName()) ? new BeaconMenu(syncId, playerInventory, this.dataAccess, ContainerLevelAccess.create(this.level, this.getBlockPos())) : null;
|
||||
+ return BaseContainerBlockEntity.canUnlock(player, this.lockKey, this.getDisplayName(), this) ? new BeaconMenu(syncId, playerInventory, this.dataAccess, ContainerLevelAccess.create(this.level, this.getBlockPos())) : null;
|
||||
}
|
||||
|
||||
@Override
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add Sneaking API for Entities
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
index 0b4686c67276cea153bdd57f11c9b48a4dd1b4ec..750ac80eed6ba03e138dd4c03f57ddfe4a123276 100644
|
||||
index b6fc36af0fccf1a4ab0262b36da79d5eb63e73e3..57a0dbb23a32123d30c3b3572f4d129be9d97847 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
@@ -1163,6 +1163,18 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
@@ -1198,6 +1198,18 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
return Pose.values()[this.getHandle().getPose().ordinal()];
|
||||
}
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Improve PortalEvents
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 778f2112db84655113b29df39567e4135940b305..a05fdfdc1878d4f4619b7eaff81edbae9f1b1537 100644
|
||||
index 071b241de8f6e00f57e8564bb3feb757ee1f05eb..56e7e423ef3f1016ea095ef98dc9c06e7763ac3b 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -3542,7 +3542,14 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -3561,7 +3561,14 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
Location enter = bukkitEntity.getLocation();
|
||||
Location exit = new Location(exitWorldServer.getWorld(), exitPosition.x(), exitPosition.y(), exitPosition.z());
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add config option for spider worldborder climbing
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index a05fdfdc1878d4f4619b7eaff81edbae9f1b1537..7555b04dcf274bb624b89f2eb9ff80da0056de4e 100644
|
||||
index 56e7e423ef3f1016ea095ef98dc9c06e7763ac3b..1a302abc9864b727288de748a8e1627f771c17f1 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -397,6 +397,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -398,6 +398,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@javax.annotation.Nullable
|
||||
private UUID originWorld;
|
||||
public boolean freezeLocked = false; // Paper - Freeze Tick Lock API
|
||||
@ -16,7 +16,7 @@ index a05fdfdc1878d4f4619b7eaff81edbae9f1b1537..7555b04dcf274bb624b89f2eb9ff80da
|
||||
|
||||
public void setOrigin(@javax.annotation.Nonnull Location location) {
|
||||
this.origin = location.toVector();
|
||||
@@ -1391,7 +1392,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -1392,7 +1393,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
io.papermc.paper.util.CollisionUtil.getCollisions(world, this, collisionBox, potentialCollisions, false, this.level.paperConfig().chunks.preventMovingIntoUnloadedChunks,
|
||||
false, false, null, null);
|
||||
|
||||
@ -26,7 +26,7 @@ index a05fdfdc1878d4f4619b7eaff81edbae9f1b1537..7555b04dcf274bb624b89f2eb9ff80da
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/Spider.java b/src/main/java/net/minecraft/world/entity/monster/Spider.java
|
||||
index 001f6cf2ea3d664864f444a92dd71d069b9a38f5..d786b8b8c9d478504f74e65c3bc7ed3e9884d003 100644
|
||||
index 61fd27992516e1238195f8e60766428f01719ba7..0c36bb47bd7040f1544817810e1c87157cdaff96 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/Spider.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Spider.java
|
||||
@@ -84,7 +84,7 @@ public class Spider extends Monster {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add missing SpigotConfig logCommands check
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 0bcfd196f5cdd2fc769755a2f79bb4768e2db66f..ac63b21c5f7996d1cc79d6923887f55f2c91dd05 100644
|
||||
index 5ddb75e6f60e4a4960018055991ea087ec473beb..3bec358de0348ba64ddbd83b63814fdc7b375b55 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2256,7 +2256,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2248,7 +2248,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
private void performChatCommand(ServerboundChatCommandPacket packet, LastSeenMessages lastSeenMessages) {
|
||||
// CraftBukkit start
|
||||
String command = "/" + packet.command();
|
@ -5,7 +5,7 @@ Subject: [PATCH] Fix NPE on Allay#stopDancing while not dancing
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftAllay.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftAllay.java
|
||||
index db3b0a9d3696f31d473342312d437e1eae97404a..6dfb0b47bd77fa4584744b3a54267879521b540a 100644
|
||||
index 0c09acc98d12cdac46b2f51dcce1edbc8890c931..a0fed289f1f6b6addd60ccbd1344ad2c1202c78b 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftAllay.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftAllay.java
|
||||
@@ -83,7 +83,7 @@ public class CraftAllay extends CraftCreature implements org.bukkit.entity.Allay
|
@ -5,18 +5,18 @@ Subject: [PATCH] Flying Fall Damage
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
index 875a7d2b2ecd75a51af7d158b7acee358b5082fe..1116116e4ba6c5ecec400cd371b70b9e14efd92b 100644
|
||||
index 11c6fc510ae03005060782a675ed1cd370a07596..922dd1f4bc5975aa1a3cdc76fa2979c68c9df1dc 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -181,6 +181,7 @@ public abstract class Player extends LivingEntity {
|
||||
public FishingHook fishing;
|
||||
@@ -184,6 +184,7 @@ public abstract class Player extends LivingEntity {
|
||||
protected float hurtDir;
|
||||
// Paper start
|
||||
public boolean affectsSpawning = true;
|
||||
+ public net.kyori.adventure.util.TriState flyingFallDamage = net.kyori.adventure.util.TriState.NOT_SET;
|
||||
// Paper end
|
||||
|
||||
// CraftBukkit start
|
||||
@@ -1753,7 +1754,7 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -1748,7 +1749,7 @@ public abstract class Player extends LivingEntity {
|
||||
|
||||
@Override
|
||||
public boolean causeFallDamage(float fallDistance, float damageMultiplier, DamageSource damageSource) {
|
||||
@ -26,10 +26,10 @@ index 875a7d2b2ecd75a51af7d158b7acee358b5082fe..1116116e4ba6c5ecec400cd371b70b9e
|
||||
} else {
|
||||
if (fallDistance >= 2.0F) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 42cff4d205f36a4342e645139bcff86027239b55..b7fb3af8a32c18e1eb078224a69f2fafe203c231 100644
|
||||
index c3c4bc73310993f3a92d8aa171289fc61da8949f..974509844a004690f52b751f23dd1159bfa23b62 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -2213,6 +2213,19 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -2281,6 +2281,19 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
this.getHandle().onUpdateAbilities();
|
||||
}
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Expose pre-collision moving velocity to
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 7555b04dcf274bb624b89f2eb9ff80da0056de4e..1eaab1f6923e6aa34b643293347348e5cc19af3c 100644
|
||||
index 1a302abc9864b727288de748a8e1627f771c17f1..9a1e8589e6b371869b2199650172d61ae186c907 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -1103,7 +1103,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -1104,7 +1104,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
}
|
||||
|
||||
if (!bl.getType().isAir()) {
|
@ -5,10 +5,10 @@ Subject: [PATCH] config for disabling entity tag tags
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java
|
||||
index 65b829ad019eb167bf7a9c4931e3006146dd742e..41ff954010c11d524ffb90abd22c29a1d8d8f5a0 100644
|
||||
index fa10d60cf7f80c429690f20c3bccdd8bbe7752e8..ceacc0d383e2ee674783d3c0a7df0a951595faca 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/EntityType.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/EntityType.java
|
||||
@@ -484,6 +484,13 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT
|
||||
@@ -492,6 +492,13 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT
|
||||
if (world.isClientSide || !entity.onlyOpCanSetNbt() || player != null && minecraftserver.getPlayerList().isOp(player.getGameProfile())) {
|
||||
CompoundTag nbttagcompound1 = entity.saveWithoutId(new CompoundTag());
|
||||
UUID uuid = entity.getUUID();
|
@ -5,10 +5,10 @@ Subject: [PATCH] Use single player info update packet on join
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index ac63b21c5f7996d1cc79d6923887f55f2c91dd05..bac6b62419d85b3772ef243aa3d5f73311abdda7 100644
|
||||
index 3bec358de0348ba64ddbd83b63814fdc7b375b55..ed09fc864a400f8a12e4097e28542a5792d1a902 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -3611,7 +3611,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -3625,7 +3625,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
this.signedMessageDecoder = session.createMessageDecoder(this.player.getUUID());
|
||||
this.chatMessageChain.append((executor) -> {
|
||||
this.player.setChatSession(session);
|
||||
@ -18,19 +18,19 @@ index ac63b21c5f7996d1cc79d6923887f55f2c91dd05..bac6b62419d85b3772ef243aa3d5f733
|
||||
});
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 1b0ca19cd61a55998676b9f8ca17bf79966385db..835e439a1af327c67558653ef79ef7e59692a976 100644
|
||||
index 3793cc8a2cc917ba33b18c5af7fac25e9c1da288..c0c14766adaac855112f85a203a6163b8adfdded 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -297,7 +297,7 @@ public abstract class PlayerList {
|
||||
@@ -303,7 +303,7 @@ public abstract class PlayerList {
|
||||
player.sendServerStatus(serverping);
|
||||
}
|
||||
|
||||
playerconnection.teleport(player.getX(), player.getY(), player.getZ(), player.getYRot(), player.getXRot());
|
||||
player.sendServerStatus(this.server.getStatus());
|
||||
- player.connection.send(ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(this.players));
|
||||
+ // player.connection.send(ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(this.players)); // Paper - use single player info update packet
|
||||
+ // player.connection.send(ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(this.players)); // Paper
|
||||
this.players.add(player);
|
||||
this.playersByName.put(player.getScoreboardName().toLowerCase(java.util.Locale.ROOT), player); // Spigot
|
||||
this.playersByUUID.put(player.getUUID(), player);
|
||||
@@ -333,6 +333,7 @@ public abstract class PlayerList {
|
||||
@@ -339,6 +339,7 @@ public abstract class PlayerList {
|
||||
// CraftBukkit start - sendAll above replaced with this loop
|
||||
ClientboundPlayerInfoUpdatePacket packet = ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(List.of(player));
|
||||
|
||||
@ -38,7 +38,7 @@ index 1b0ca19cd61a55998676b9f8ca17bf79966385db..835e439a1af327c67558653ef79ef7e5
|
||||
for (int i = 0; i < this.players.size(); ++i) {
|
||||
ServerPlayer entityplayer1 = (ServerPlayer) this.players.get(i);
|
||||
|
||||
@@ -340,12 +341,17 @@ public abstract class PlayerList {
|
||||
@@ -346,12 +347,17 @@ public abstract class PlayerList {
|
||||
entityplayer1.connection.send(packet);
|
||||
}
|
||||
|
||||
@ -58,3 +58,16 @@ index 1b0ca19cd61a55998676b9f8ca17bf79966385db..835e439a1af327c67558653ef79ef7e5
|
||||
player.sentListPacket = true;
|
||||
player.supressTrackerForLogin = false; // Paper
|
||||
((ServerLevel)player.level).getChunkSource().chunkMap.addEntity(player); // Paper - track entity now
|
||||
diff --git a/src/main/java/net/minecraft/world/damagesource/DamageSources.java b/src/main/java/net/minecraft/world/damagesource/DamageSources.java
|
||||
index 6d46908692637ace5d81a9948f5ed42e142f549a..31b515fd19555585d6e3a6f1da3bcd7fac380a50 100644
|
||||
--- a/src/main/java/net/minecraft/world/damagesource/DamageSources.java
|
||||
+++ b/src/main/java/net/minecraft/world/damagesource/DamageSources.java
|
||||
@@ -242,8 +242,4 @@ public class DamageSources {
|
||||
public DamageSource sonicBoom(Entity attacker) {
|
||||
return this.source(DamageTypes.SONIC_BOOM, attacker);
|
||||
}
|
||||
-
|
||||
- public DamageSource badRespawnPointExplosion(Vec3 position) {
|
||||
- return new DamageSource(this.damageTypes.getHolderOrThrow(DamageTypes.BAD_RESPAWN_POINT), position);
|
||||
- }
|
||||
}
|
@ -22,10 +22,10 @@ This patch corrects this behaviour by only shrinking the item if a totem
|
||||
of undying was found and the event was called uncancelled.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 0c4a5991d24ec232d2a95977eb37582b6bd8369c..902a19def9d902e7bfb476688354a070633a3454 100644
|
||||
index 24bcbe515dac7f6cab28a4148afb23d1f44be94b..6ed2bd15b9f69b58f02034a8679912b608555b61 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -1554,7 +1554,7 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -1543,7 +1543,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
this.level.getCraftServer().getPluginManager().callEvent(event);
|
||||
|
||||
if (!event.isCancelled()) {
|
@ -7,10 +7,10 @@ Subject: [PATCH] Win Screen API
|
||||
public net.minecraft.server.level.ServerPlayer seenCredits
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index b7fb3af8a32c18e1eb078224a69f2fafe203c231..c546a465a2f85e1b0e785074af15546637619e8f 100644
|
||||
index 974509844a004690f52b751f23dd1159bfa23b62..d7df13dcbf45b46f31f7e3a85ba38d9f57e5d583 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -1185,6 +1185,25 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -1208,6 +1208,25 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
this.getHandle().connection.send(packet);
|
||||
}
|
||||
|
@ -16,7 +16,7 @@ with less than zero amounts, so this code doesn't create
|
||||
a problem with operations on the vanilla ItemStack.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||
index 3e5abea2f814a0a364cf87ff4ce1b1718ba2ddac..97c5a72096ac0fd0b08a397466486014cfea4579 100644
|
||||
index d95d37d9dedbd9f74311b47826a74b16ba6ce3e9..f45e4acee69bd95ff2e41feaf44f5414d2e40df0 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||
@@ -146,7 +146,7 @@ public final class CraftItemStack extends ItemStack {
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add Entity Body Yaw API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
index f2a7a10df4c283ef3d7e44121c074156556c9cf2..2cff68a5c448c0e971d95e9264223eb943730968 100644
|
||||
index 62b5df7e3bcf1037d96897b41f25038c535515d5..bc3d3dc4e2efb54896233fd0a4aa140972cb02f6 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
@@ -1034,6 +1034,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add missing isFuel Material entries
|
||||
|
||||
|
||||
diff --git a/src/test/java/org/bukkit/support/AbstractTestingBase.java b/src/test/java/org/bukkit/support/AbstractTestingBase.java
|
||||
index 1caa4ce02cd396160f0d9d5461de8290e7c078bb..1fa801c93597f6939b88442ad72812cc5080c37e 100644
|
||||
index 5226604f2a88e08d94c59d7eb052edea3621c857..75a0b2dac14881c0cc485373d68becee23025902 100644
|
||||
--- a/src/test/java/org/bukkit/support/AbstractTestingBase.java
|
||||
+++ b/src/test/java/org/bukkit/support/AbstractTestingBase.java
|
||||
@@ -43,7 +43,12 @@ public abstract class AbstractTestingBase {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Update the flag when a captured block state is outdated
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index 2ecd29a24545418a2f6e2b2091d848313baabe91..db971ca4136c7f922d630f38aa5c78cb04adbdfa 100644
|
||||
index 174f5ff8f827dab2d85cee525429d46bbeae7183..973ecd50f9cb6b86c353586e84d15dcb118ccb60 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -526,6 +526,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -532,6 +532,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
blockstate = CapturedBlockState.getTreeBlockState(this, pos, flags);
|
||||
this.capturedBlockStates.put(pos.immutable(), blockstate);
|
||||
}
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add EntityFertilizeEggEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/Turtle.java b/src/main/java/net/minecraft/world/entity/animal/Turtle.java
|
||||
index 25503678e7d049a8b3172cfad8a5606958c32302..7f9ec1888eb9c02705426d60cf4e3aa7c6d43115 100644
|
||||
index 1c2f927974aab4d9751088449edbc777677d6cd0..81dab77f525ae667614f940c4ff5ec308a9579a2 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/Turtle.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/Turtle.java
|
||||
@@ -436,6 +436,17 @@ public class Turtle extends Animal {
|
||||
@@ -441,6 +441,17 @@ public class Turtle extends Animal {
|
||||
if (entityplayer == null && this.partner.getLoveCause() != null) {
|
||||
entityplayer = this.partner.getLoveCause();
|
||||
}
|
||||
@ -26,7 +26,7 @@ index 25503678e7d049a8b3172cfad8a5606958c32302..7f9ec1888eb9c02705426d60cf4e3aa7
|
||||
|
||||
if (entityplayer != null) {
|
||||
entityplayer.awardStat(Stats.ANIMALS_BRED);
|
||||
@@ -447,10 +458,9 @@ public class Turtle extends Animal {
|
||||
@@ -452,10 +463,9 @@ public class Turtle extends Animal {
|
||||
this.partner.setAge(6000);
|
||||
this.animal.resetLove();
|
||||
this.partner.resetLove();
|
||||
@ -40,10 +40,10 @@ index 25503678e7d049a8b3172cfad8a5606958c32302..7f9ec1888eb9c02705426d60cf4e3aa7
|
||||
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java b/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java
|
||||
index f2e84e832ad95df26fe3b9ba439ce38fc59b3585..63cb093e41ef9eed43c8bbb758596f8df324f47f 100644
|
||||
index 1b3d462e1e229970c53f763b5cdce7d21f1b1703..a65cec3c9837882df5b61de58f03d276d4db6bfc 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java
|
||||
@@ -265,6 +265,17 @@ public class Frog extends Animal implements VariantHolder<FrogVariant> {
|
||||
@@ -252,6 +252,17 @@ public class Frog extends Animal implements VariantHolder<FrogVariant> {
|
||||
serverPlayer = other.getLoveCause();
|
||||
}
|
||||
|
||||
@ -61,7 +61,7 @@ index f2e84e832ad95df26fe3b9ba439ce38fc59b3585..63cb093e41ef9eed43c8bbb758596f8d
|
||||
if (serverPlayer != null) {
|
||||
serverPlayer.awardStat(Stats.ANIMALS_BRED);
|
||||
CriteriaTriggers.BRED_ANIMALS.trigger(serverPlayer, this, other, (AgeableMob)null);
|
||||
@@ -276,8 +287,8 @@ public class Frog extends Animal implements VariantHolder<FrogVariant> {
|
||||
@@ -263,8 +274,8 @@ public class Frog extends Animal implements VariantHolder<FrogVariant> {
|
||||
other.resetLove();
|
||||
this.getBrain().setMemory(MemoryModuleType.IS_PREGNANT, Unit.INSTANCE);
|
||||
world.broadcastEntityEvent(this, (byte)18);
|
@ -4,60 +4,48 @@ Date: Sun, 8 Aug 2021 19:56:02 +0200
|
||||
Subject: [PATCH] Add CompostItemEvent and EntityCompostItemEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/ai/behavior/WorkAtComposter.java b/src/main/java/net/minecraft/world/entity/ai/behavior/WorkAtComposter.java
|
||||
index 05c1e8c9f013547d4fcdbbd299329166a8ece1b0..aff235c019ae5c6ed5227127d5424b34af5f36dd 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/ai/behavior/WorkAtComposter.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/ai/behavior/WorkAtComposter.java
|
||||
@@ -58,7 +58,7 @@ public class WorkAtComposter extends WorkAtPoi {
|
||||
i -= p;
|
||||
|
||||
for(int q = 0; q < p; ++q) {
|
||||
- blockState = ComposterBlock.insertItem(entity, blockState, world, itemStack, blockPos);
|
||||
+ blockState = ComposterBlock.insertItem(entity, blockState, world, itemStack, blockPos, entity); // Paper
|
||||
if (blockState.getValue(ComposterBlock.LEVEL) == 7) {
|
||||
this.spawnComposterFillEffects(world, composterState, blockPos, blockState);
|
||||
return;
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/ComposterBlock.java b/src/main/java/net/minecraft/world/level/block/ComposterBlock.java
|
||||
index 564822911c25238900b361d564c5db3103900fb3..f6268231e39f50bb6adedd85e3c18d746ae3792d 100644
|
||||
index e81bda56c58df6c3109382c17e86f4cc0f16cf81..fc3f08db8e3747e6e9d6f448c91e51144d480585 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/ComposterBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/ComposterBlock.java
|
||||
@@ -227,7 +227,10 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder {
|
||||
@@ -235,7 +235,10 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder {
|
||||
if (state != dummyBlockState && org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(player, pos, dummyBlockState).isCancelled()) { // if block state will change and event cancelled
|
||||
return InteractionResult.sidedSuccess(world.isClientSide);
|
||||
}
|
||||
- BlockState iblockdata1 = ComposterBlock.addItem(state, world, pos, itemstack, rand);
|
||||
+ BlockState iblockdata1 = ComposterBlock.addItem(state, world, pos, itemstack, player);
|
||||
- BlockState iblockdata1 = ComposterBlock.addItem(player, state, world, pos, itemstack, rand);
|
||||
+ BlockState iblockdata1 = ComposterBlock.addItem(player, state, world, pos, itemstack);
|
||||
+ if (iblockdata1 == null) {
|
||||
+ return InteractionResult.PASS;
|
||||
+ }
|
||||
// Paper end
|
||||
|
||||
world.levelEvent(1500, pos, state != iblockdata1 ? 1 : 0);
|
||||
@@ -252,11 +255,16 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder {
|
||||
if (i < 7 && ComposterBlock.COMPOSTABLES.containsKey(itemstack.getItem())) {
|
||||
// CraftBukkit start
|
||||
double rand = worldserver.getRandom().nextDouble();
|
||||
- BlockState iblockdata1 = ComposterBlock.addItem(iblockdata, DummyGeneratorAccess.INSTANCE, blockposition, itemstack, rand);
|
||||
+ BlockState iblockdata1 = ComposterBlock.addItem(iblockdata, DummyGeneratorAccess.INSTANCE, blockposition, itemstack, rand, entity); // Paper
|
||||
if (iblockdata == iblockdata1 || org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(entity, blockposition, iblockdata1).isCancelled()) {
|
||||
return iblockdata;
|
||||
@@ -265,6 +268,11 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder {
|
||||
return state;
|
||||
}
|
||||
- iblockdata1 = ComposterBlock.addItem(iblockdata, (LevelAccessor) worldserver, blockposition, itemstack, rand);
|
||||
iblockdata1 = ComposterBlock.addItem(user, state, world, pos, stack, rand);
|
||||
+ // Paper start
|
||||
+ iblockdata1 = ComposterBlock.addItem(iblockdata, (LevelAccessor) worldserver, blockposition, itemstack, rand, entity);
|
||||
+ if (iblockdata1 == null) {
|
||||
+ return iblockdata;
|
||||
+ return state;
|
||||
+ }
|
||||
+ // Paper end
|
||||
// CraftBukkit end
|
||||
|
||||
itemstack.shrink(1);
|
||||
@@ -303,13 +311,39 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder {
|
||||
// CraftBukkit start
|
||||
return ComposterBlock.addItem(state, world, pos, item, world.getRandom().nextDouble());
|
||||
}
|
||||
+ // Paper start
|
||||
+ static BlockState addItem(BlockState state, LevelAccessor world, BlockPos pos, ItemStack item, @Nullable Entity entity) {
|
||||
+ return ComposterBlock.addItem(state, world, pos, item, world.getRandom().nextDouble(), entity);
|
||||
+ }
|
||||
+ // Paper end
|
||||
|
||||
static BlockState addItem(BlockState iblockdata, LevelAccessor generatoraccess, BlockPos blockposition, ItemStack itemstack, double rand) {
|
||||
+ // Paper start
|
||||
+ return ComposterBlock.addItem(iblockdata, generatoraccess, blockposition, itemstack, rand, null);
|
||||
+ }
|
||||
+
|
||||
+ @Nullable
|
||||
+ static BlockState addItem(BlockState iblockdata, LevelAccessor generatoraccess, BlockPos blockposition, ItemStack itemstack, double rand, @Nullable Entity entity) {
|
||||
+ // Paper end
|
||||
// CraftBukkit end
|
||||
stack.shrink(1);
|
||||
@@ -315,7 +323,21 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder {
|
||||
int i = (Integer) iblockdata.getValue(ComposterBlock.LEVEL);
|
||||
float f = ComposterBlock.COMPOSTABLES.getFloat(itemstack.getItem());
|
||||
|
||||
@ -80,9 +68,9 @@ index 564822911c25238900b361d564c5db3103900fb3..f6268231e39f50bb6adedd85e3c18d74
|
||||
return iblockdata;
|
||||
} else {
|
||||
int j = i + 1;
|
||||
@@ -453,6 +487,11 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder {
|
||||
@@ -460,6 +482,11 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder {
|
||||
this.changed = true;
|
||||
BlockState iblockdata = ComposterBlock.addItem(this.state, this.level, this.pos, itemstack);
|
||||
BlockState iblockdata = ComposterBlock.addItem((Entity) null, this.state, this.level, this.pos, itemstack);
|
||||
|
||||
+ // Paper start
|
||||
+ if (iblockdata == null) {
|
@ -1,26 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||
Date: Wed, 14 Dec 2022 17:46:27 -0800
|
||||
Subject: [PATCH] Fix explosion yield with new gamerules
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
index 092ba9e1f5bf331d65b549d54689b337e67a6d58..4a7733c259d75bf2b3ea559fd4eba398bc56195d 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
@@ -328,13 +328,13 @@ public class Explosion {
|
||||
float yield;
|
||||
|
||||
if (explode != null) {
|
||||
- EntityExplodeEvent event = new EntityExplodeEvent(explode, location, blockList, this.blockInteraction == Explosion.BlockInteraction.DESTROY ? 1.0F / this.radius : 1.0F);
|
||||
+ EntityExplodeEvent event = new EntityExplodeEvent(explode, location, blockList, this.blockInteraction == Explosion.BlockInteraction.DESTROY_WITH_DECAY ? 1.0F / this.radius : 1.0F); // Paper - fix explosion yield with new gamerules
|
||||
this.level.getCraftServer().getPluginManager().callEvent(event);
|
||||
cancelled = event.isCancelled();
|
||||
bukkitBlocks = event.blockList();
|
||||
yield = event.getYield();
|
||||
} else {
|
||||
- BlockExplodeEvent event = new BlockExplodeEvent(location.getBlock(), blockList, this.blockInteraction == Explosion.BlockInteraction.DESTROY ? 1.0F / this.radius : 1.0F);
|
||||
+ BlockExplodeEvent event = new BlockExplodeEvent(location.getBlock(), blockList, this.blockInteraction == Explosion.BlockInteraction.DESTROY_WITH_DECAY ? 1.0F / this.radius : 1.0F); // Paper - fix explosion yield with new gamerules
|
||||
this.level.getCraftServer().getPluginManager().callEvent(event);
|
||||
cancelled = event.isCancelled();
|
||||
bukkitBlocks = event.blockList();
|
In neuem Issue referenzieren
Einen Benutzer sperren