mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-15 23:25:37 +01:00
922
This commit is contained in:
parent
33b36cde31
commit
14c03366ed
@ -26,7 +26,7 @@ index 68c062cbaa030d62d97c9c003651f8fc17a00a6b..6247a21c9c391abf1f6db3482c659593
|
||||
UPDATE_GAME_MODE((serialized, buf) -> serialized.gameMode = GameType.byId(buf.readVarInt()), (buf, entry) -> buf.writeVarInt(entry.gameMode().getId())),
|
||||
UPDATE_LISTED((serialized, buf) -> serialized.listed = buf.readBoolean(), (buf, entry) -> buf.writeBoolean(entry.listed())),
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 665ef268a0936a52b979c6cca680e237ae7aa74c..a2ce3d3423a8cb3b851c2d811678ccb9c5b5d5b0 100644
|
||||
index 67b756ec3cc955d3d9c23defc63bd0df29af3d10..e56d73fffaa0da4813aaa0fa08554cfbb0f72279 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -295,6 +295,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@ -38,7 +38,7 @@ index 665ef268a0936a52b979c6cca680e237ae7aa74c..a2ce3d3423a8cb3b851c2d811678ccb9
|
||||
private final LastSeenMessagesValidator lastSeenMessages = new LastSeenMessagesValidator(20);
|
||||
private final MessageSignatureCache messageSignatureCache = MessageSignatureCache.createDefault();
|
||||
@@ -402,6 +403,13 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
this.disconnect(Component.translatable("multiplayer.disconnect.idling"), org.bukkit.event.player.PlayerKickEvent.Cause.IDLING); // Paper - kick event cause
|
||||
this.disconnect((Component) Component.translatable("multiplayer.disconnect.idling"), org.bukkit.event.player.PlayerKickEvent.Cause.IDLING); // Paper - kick event cause
|
||||
}
|
||||
|
||||
+ // Paper start - Prevent causing expired keys from impacting new joins
|
||||
@ -51,7 +51,7 @@ index 665ef268a0936a52b979c6cca680e237ae7aa74c..a2ce3d3423a8cb3b851c2d811678ccb9
|
||||
}
|
||||
|
||||
private int getMaximumFlyingTicks(Entity vehicle) {
|
||||
@@ -3419,6 +3427,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -3436,6 +3444,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
|
||||
private void resetPlayerChatState(RemoteChatSession session) {
|
||||
this.chatSession = session;
|
@ -5,10 +5,10 @@ Subject: [PATCH] Prevent GameEvents being fired from unloaded chunks
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 1e122d5b49aa7f6a626e781e53de53be18afc346..055fcf3d51852ca466c7189f36382e0b0d0d86d2 100644
|
||||
index b9d3a98824fc146128f35244f5f15bba97948674..6e9a3b6a1595a1731ca8187d2610c840337a12ed 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1374,6 +1374,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1372,6 +1372,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
|
||||
@Override
|
||||
public void gameEvent(Holder<GameEvent> event, Vec3 emitterPos, GameEvent.Context emitter) {
|
@ -7,7 +7,7 @@ This logic hooks into the neighbour update which should be invoked
|
||||
as a result of redstone powering the trap door.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/TrapDoorBlock.java b/src/main/java/net/minecraft/world/level/block/TrapDoorBlock.java
|
||||
index 26096c28f654118b0d541f33c659fbc43b34509b..2b5fdcb12dcd8730df24113b9a6d295f000dd9f6 100644
|
||||
index 82e38b01446d35aa9745be6ff3c7647b46379682..336fcf4af0ffb416b5595a9e65172f36cc36aaa3 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/TrapDoorBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/TrapDoorBlock.java
|
||||
@@ -153,7 +153,26 @@ public class TrapDoorBlock extends HorizontalDirectionalBlock implements SimpleW
|
@ -5,43 +5,45 @@ Subject: [PATCH] Expand PlayerItemMendEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
|
||||
index a933061d4f0c45a34b5678c2b317b670f20b8a45..46d8bcad1545953757659870901cbbdf3340bc15 100644
|
||||
index a758b2456acac23095fe4619ae10300a034cb460..8eacfbc45f68fb01926c3e6363641dfbfd3eb16f 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
|
||||
@@ -350,7 +350,7 @@ public class ExperienceOrb extends Entity {
|
||||
ItemStack itemstack = (ItemStack) entry.getValue();
|
||||
int j = Math.min(this.xpToDurability(amount), itemstack.getDamageValue());
|
||||
@@ -351,19 +351,19 @@ public class ExperienceOrb extends Entity {
|
||||
|
||||
if (optional.isPresent()) {
|
||||
ItemStack itemstack = ((EnchantedItemInUse) optional.get()).itemStack();
|
||||
- int j = EnchantmentHelper.modifyDurabilityToRepairFromXp(player.serverLevel(), itemstack, amount);
|
||||
- int k = Math.min(j, itemstack.getDamageValue());
|
||||
+ int j = EnchantmentHelper.modifyDurabilityToRepairFromXp(player.serverLevel(), itemstack, amount);; int xpTranslatedToDurability = j; // Paper - mending event - obfhelper
|
||||
+ int k = Math.min(j, itemstack.getDamageValue()); int durabilityToAddBack = k; // Paper - mending event - obfhelper
|
||||
// CraftBukkit start
|
||||
- org.bukkit.event.player.PlayerItemMendEvent event = CraftEventFactory.callPlayerItemMendEvent(player, this, itemstack, entry.getKey(), j);
|
||||
+ org.bukkit.event.player.PlayerItemMendEvent event = CraftEventFactory.callPlayerItemMendEvent(player, this, itemstack, entry.getKey(), j, this::durabilityToXp); // Paper - Expand PlayerItemMendEvent
|
||||
j = event.getRepairAmount();
|
||||
- org.bukkit.event.player.PlayerItemMendEvent event = CraftEventFactory.callPlayerItemMendEvent(player, this, itemstack, optional.get().inSlot(), k);
|
||||
- k = event.getRepairAmount();
|
||||
+ org.bukkit.event.player.PlayerItemMendEvent event = CraftEventFactory.callPlayerItemMendEvent(player, this, itemstack, optional.get().inSlot(), durabilityToAddBack, d -> d * amount / xpTranslatedToDurability); // Paper - Expand PlayerItemMendEvent
|
||||
+ durabilityToAddBack = event.getRepairAmount(); // Paper - mending event - obfhelper
|
||||
if (event.isCancelled()) {
|
||||
return amount;
|
||||
@@ -358,8 +358,13 @@ public class ExperienceOrb extends Entity {
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
itemstack.setDamageValue(itemstack.getDamageValue() - j);
|
||||
- int k = amount - this.durabilityToXp(j);
|
||||
+ int k = amount - event.getDurabilityToXpOperation().applyAsInt(j); // Paper - Expand PlayerItemMendEvent
|
||||
// this.value = k; // CraftBukkit - update exp value of orb for PlayerItemMendEvent calls // Paper - the value field should not be mutated here because it doesn't take "count" into account
|
||||
+ // Paper start - Expand PlayerItemMendEvent
|
||||
+ if (j == 0 && amount == k) { // if repair amount is 0 and no xp was removed, don't do recursion; treat as cancelled
|
||||
+ return k;
|
||||
+ }
|
||||
+ // Paper end - Expand PlayerItemMendEvent
|
||||
- itemstack.setDamageValue(itemstack.getDamageValue() - k);
|
||||
+ itemstack.setDamageValue(itemstack.getDamageValue() - durabilityToAddBack); // Paper - mending event - obfhelper
|
||||
if (k > 0) {
|
||||
- int l = amount - k * amount / j;
|
||||
+ int l = amount - event.getDurabilityToXpOperation().applyAsInt(durabilityToAddBack); // Paper - mending event - obfhelper
|
||||
|
||||
return k > 0 ? this.repairPlayerItems(player, k) : 0;
|
||||
} else {
|
||||
if (l > 0) {
|
||||
// this.value = l; // CraftBukkit - update exp value of orb for PlayerItemMendEvent calls // Paper - the value field should not be mutated here because it doesn't take "count" into account
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 952728c30f8871f8ed1f27800feba7db038ad420..1b9e1038f729582117dc93736f9a089bf6481cff 100644
|
||||
index 512137a80e6cdcf52c1bde11c86a28663d5b3609..5163c979f086dac9111419d7bb3b624b0faa3a5b 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -1835,11 +1835,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -1848,11 +1848,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
orb.setPosRaw(handle.getX(), handle.getY(), handle.getZ());
|
||||
|
||||
int i = Math.min(orb.xpToDurability(amount), itemstack.getDamageValue());
|
||||
- org.bukkit.event.player.PlayerItemMendEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerItemMendEvent(handle, orb, itemstack, stackEntry.getKey(), i);
|
||||
+ org.bukkit.event.player.PlayerItemMendEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerItemMendEvent(handle, orb, itemstack, stackEntry.getKey(), i, orb::durabilityToXp); // Paper - Expand PlayerItemMendEvent
|
||||
+ org.bukkit.event.player.PlayerItemMendEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerItemMendEvent(handle, orb, itemstack, stackEntry.get().inSlot(), i, orb::durabilityToXp); // Paper - Expand PlayerItemMendEvent
|
||||
i = event.getRepairAmount();
|
||||
orb.discard(org.bukkit.event.entity.EntityRemoveEvent.Cause.DESPAWN);
|
||||
if (!event.isCancelled()) {
|
||||
@ -51,10 +53,10 @@ index 952728c30f8871f8ed1f27800feba7db038ad420..1b9e1038f729582117dc93736f9a089b
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index cbf2cd3c7005fb4148c15966079922a8b18ece91..f4ca35e044e41b3fd1b83c482a5c19d188ea0bae 100644
|
||||
index 7fa64d9081ce54d91eb7631c7d8623ed11d9954b..c59bb1811dba49571bbb82b17a75ab2363531996 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -1264,10 +1264,10 @@ public class CraftEventFactory {
|
||||
@@ -1265,10 +1265,10 @@ public class CraftEventFactory {
|
||||
return event;
|
||||
}
|
||||
|
@ -14,10 +14,10 @@ clearing the owner.
|
||||
Co-authored-by: Warrior <50800980+Warriorrrr@users.noreply.github.com>
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index c15a08c6d9277dd1d6d63a25dacce0c43b8dad05..73831000101765845c0881bba217b2ca54eb39dd 100644
|
||||
index c6d356fc0b94255299299eade9fb4b77bae8cc03..ce648d328ceb7d98fc523398c52915f7e7b5e23e 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -385,6 +385,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -391,6 +391,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
public boolean inWorld = false;
|
||||
public boolean generation;
|
||||
public int maxAirTicks = this.getDefaultMaxAirSupply(); // CraftBukkit - SPIGOT-6907: re-implement LivingEntity#setMaximumAir()
|
||||
@ -26,10 +26,10 @@ index c15a08c6d9277dd1d6d63a25dacce0c43b8dad05..73831000101765845c0881bba217b2ca
|
||||
public boolean lastDamageCancelled; // SPIGOT-5339, SPIGOT-6252, SPIGOT-6777: Keep track if the event was canceled
|
||||
public boolean persistentInvisibility = false;
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
|
||||
index 4c6fbf19d6bb01e67c6141aea757fae434ee8233..74c596264d4da551437bd2a23e1c70022cfc73fc 100644
|
||||
index d147f3cc1af28c384005c1c20e37bb588588c88d..5f7d152f41eb85f17bcded4bc8099b998e5a338b 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
|
||||
@@ -51,14 +51,31 @@ public abstract class Projectile extends Entity implements TraceableEntity {
|
||||
@@ -57,14 +57,31 @@ public abstract class Projectile extends Entity implements TraceableEntity {
|
||||
this.ownerUUID = entity.getUUID();
|
||||
this.cachedOwner = entity;
|
||||
}
|
||||
@ -63,7 +63,7 @@ index 4c6fbf19d6bb01e67c6141aea757fae434ee8233..74c596264d4da551437bd2a23e1c7002
|
||||
return this.cachedOwner;
|
||||
} else {
|
||||
if (this.ownerUUID != null) {
|
||||
@@ -68,6 +85,7 @@ public abstract class Projectile extends Entity implements TraceableEntity {
|
||||
@@ -74,6 +91,7 @@ public abstract class Projectile extends Entity implements TraceableEntity {
|
||||
ServerLevel worldserver = (ServerLevel) world;
|
||||
|
||||
this.cachedOwner = worldserver.getEntity(this.ownerUUID);
|
@ -21,10 +21,10 @@ index 12135ffeacd648f6bc4d7d327059ea1a7e8c79c4..52439f4b959c74027eb191a3af960c70
|
||||
public void removeModifier(AttributeModifier modifier) {
|
||||
throw new UnsupportedOperationException("Cannot modify default attributes");
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/attribute/CraftAttributeInstance.java b/src/main/java/org/bukkit/craftbukkit/attribute/CraftAttributeInstance.java
|
||||
index 0a18983151d17b8e1460b82326b0380087e13795..7d16545665f74ce619f7b18e568226642c84ceee 100644
|
||||
index 3b171a08bd0bedfe224905feb5838d2540199bce..cd6a492f56b3dee5985c068e20009b6c833e143b 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/attribute/CraftAttributeInstance.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/attribute/CraftAttributeInstance.java
|
||||
@@ -50,6 +50,14 @@ public class CraftAttributeInstance implements AttributeInstance {
|
||||
@@ -51,6 +51,14 @@ public class CraftAttributeInstance implements AttributeInstance {
|
||||
this.handle.addPermanentModifier(CraftAttributeInstance.convert(modifier));
|
||||
}
|
||||
|
@ -21,30 +21,11 @@ index 7d76cdc59984b156628273c8357485eb10046007..7180996027f70aef7afe32fb2adfce64
|
||||
world.gameEvent((Holder) GameEvent.BLOCK_PLACE, blockposition, GameEvent.Context.of(entityhuman, iblockdata1));
|
||||
itemstack.consume(1, entityhuman);
|
||||
return InteractionResult.sidedSuccess(world.isClientSide);
|
||||
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
index a158642471ab037ea3b99cac09ba5f3bf282e2a7..7450c53f3d43e401e5219d5ff01868a28ee2c05f 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
@@ -515,13 +515,7 @@ public final class ItemStack implements DataComponentHolder {
|
||||
if (tileentity instanceof JukeboxBlockEntity) {
|
||||
JukeboxBlockEntity tileentityjukebox = (JukeboxBlockEntity) tileentity;
|
||||
|
||||
- // There can only be one
|
||||
- ItemStack record = this.copy();
|
||||
- if (!record.isEmpty()) {
|
||||
- record.setCount(1);
|
||||
- }
|
||||
-
|
||||
- tileentityjukebox.setTheItem(record);
|
||||
+ tileentityjukebox.setTheItem(this.copy()); // Paper - Fix block place logic; sync this with record item, jukebox has now an inventory
|
||||
world.gameEvent(GameEvent.BLOCK_CHANGE, blockposition, GameEvent.Context.of(entityhuman, world.getBlockState(blockposition)));
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index 0fb975d74b8e91617de91dacb206699ff572a38a..61fc08cac437bd5dd6f3ff7561fab3d4c108388d 100644
|
||||
index b97427789d6162e16b9c3a56b89b2dd08a04297f..b8d8041aecc2ff008247449cba8d9f192cf51073 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -553,17 +553,18 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -554,17 +554,18 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
// CraftBukkit start
|
||||
iblockdata1.updateIndirectNeighbourShapes(this, blockposition, k, j - 1); // Don't call an event for the old block to limit event spam
|
||||
CraftWorld world = ((ServerLevel) this).getWorld();
|
@ -5,10 +5,10 @@ Subject: [PATCH] Fix spigot sound playing for BlockItem ItemStacks
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
index 7450c53f3d43e401e5219d5ff01868a28ee2c05f..2038c6b5758d50216058d9e04398c42f658aba4a 100644
|
||||
index 96a7e80e3efab1bf626fb7aff61e095ca09789d4..f0b166a7fbeb222b97b5f2770c20d98df5d9bcc8 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
@@ -566,7 +566,11 @@ public final class ItemStack implements DataComponentHolder {
|
||||
@@ -571,7 +571,11 @@ public final class ItemStack implements DataComponentHolder {
|
||||
|
||||
// SPIGOT-1288 - play sound stripped from ItemBlock
|
||||
if (this.item instanceof BlockItem) {
|
@ -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
|
||||
index e135d634f4336a23e90fd94b4e4c261bfc0cffe9..c2dc4a7194c83cb01724fc04ea4971b34b2f8235 100644
|
||||
index 0aebc39477e4302c2660786011633164b6e7cc9d..571b569b6ce8c29c038a1af6429eced5c0b64ff7 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -352,7 +352,11 @@ public final class CraftServer implements Server {
|
||||
@@ -355,7 +355,11 @@ public final class CraftServer implements Server {
|
||||
}
|
||||
this.commandsConfiguration = YamlConfiguration.loadConfiguration(this.getCommandsConfigFile());
|
||||
this.commandsConfiguration.options().copyDefaults(true);
|
@ -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
|
||||
index 37b62a45bbe2db725f24330f1f03e8cf09ab208c..0196a49a5822e257b0e065e2383ec92b1bc27bba 100644
|
||||
index 28fe6c8a4a73caa39c8a265814d050b74e8b9715..0adeb3d7d2e322137f343f380a8efbcceaf55730 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
@@ -562,6 +562,13 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||
@@ -563,6 +563,13 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||
return effects;
|
||||
}
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Fix incorrect crafting result amount for fireworks
|
||||
Although vanilla does not specifically call this method anywhere, this fixes a bug where the result using the Bukkit API returns the wrong amount.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/item/crafting/FireworkRocketRecipe.java b/src/main/java/net/minecraft/world/item/crafting/FireworkRocketRecipe.java
|
||||
index da924bb34354b1a8b3db3ad63b5705253d942514..56c8900c8771919d5e0e62b4d165ae6f00042872 100644
|
||||
index e2a3a4fc2fff21b926a74ed11389333165180fe7..93c2268ea1be1727c2939d5730427e24d4e03e2f 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/crafting/FireworkRocketRecipe.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/crafting/FireworkRocketRecipe.java
|
||||
@@ -78,7 +78,7 @@ public class FireworkRocketRecipe extends CustomRecipe {
|
||||
@@ -77,7 +77,7 @@ public class FireworkRocketRecipe extends CustomRecipe {
|
||||
|
||||
@Override
|
||||
public ItemStack getResultItem(HolderLookup.Provider registriesLookup) {
|
@ -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
|
||||
index 2038c6b5758d50216058d9e04398c42f658aba4a..c27ef32a3fc3edf5a4dd91d7cba93a78a5e762fa 100644
|
||||
index f0b166a7fbeb222b97b5f2770c20d98df5d9bcc8..92be749721f26e9385e592a985db58cf05c67801 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
@@ -545,7 +545,7 @@ public final class ItemStack implements DataComponentHolder {
|
||||
@@ -550,7 +550,7 @@ public final class ItemStack implements DataComponentHolder {
|
||||
try {
|
||||
if (world.getBlockEntity(SignItem.openSign) instanceof SignBlockEntity tileentitysign) {
|
||||
if (world.getBlockState(SignItem.openSign).getBlock() instanceof SignBlock blocksign) {
|
||||
@ -18,10 +18,10 @@ index 2038c6b5758d50216058d9e04398c42f658aba4a..c27ef32a3fc3edf5a4dd91d7cba93a78
|
||||
}
|
||||
} 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
|
||||
index e602c58bc14036d78a00ad548a821650b92e29df..f7bae8060d993176799ff3ff4653d760a137faba 100644
|
||||
index e00bfb839a2512f018d874976d6f9607877fc2af..73874cd18a5b335e895ea0b2fefbd521209afe08 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/SignBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/SignBlock.java
|
||||
@@ -142,7 +142,7 @@ public abstract class SignBlock extends BaseEntityBlock implements SimpleWaterlo
|
||||
@@ -139,7 +139,7 @@ public abstract class SignBlock extends BaseEntityBlock implements SimpleWaterlo
|
||||
} else if (flag1) {
|
||||
return InteractionResult.SUCCESS;
|
||||
} else if (!this.otherPlayerIsEditingSign(player, tileentitysign) && player.mayBuild() && this.hasEditableText(player, tileentitysign, flag)) {
|
||||
@ -30,7 +30,7 @@ index e602c58bc14036d78a00ad548a821650b92e29df..f7bae8060d993176799ff3ff4653d760
|
||||
return InteractionResult.SUCCESS;
|
||||
} else {
|
||||
return InteractionResult.PASS;
|
||||
@@ -187,16 +187,33 @@ public abstract class SignBlock extends BaseEntityBlock implements SimpleWaterlo
|
||||
@@ -184,16 +184,33 @@ public abstract class SignBlock extends BaseEntityBlock implements SimpleWaterlo
|
||||
return blockpropertywood;
|
||||
}
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Only tick item frames if players can see it
|
||||
In the event that an item frame cannot be seen by any players, ticking the item frame every tick is unnecessary. This can be a very hot section of the entity tracker when lots of item frames are present on a server, so this reduces the logic which speeds it up.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerEntity.java b/src/main/java/net/minecraft/server/level/ServerEntity.java
|
||||
index f355dd986bf861da3edb90d7e05f901e19686fef..979571cc12f81e09df8570f7deb32f4c604188bd 100644
|
||||
index f3f93710846ce0f6d53845e0b49331646a4e8332..f010be9605d7458add7e5693ff473fabf679c938 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerEntity.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerEntity.java
|
||||
@@ -113,7 +113,7 @@ public class ServerEntity {
|
||||
@@ -112,7 +112,7 @@ public class ServerEntity {
|
||||
|
||||
Entity entity = this.entity;
|
||||
|
@ -41,10 +41,10 @@ index f3c83bb20a73b489f1fb6bacb69388902b1b6fe7..3c0d2332207ba638faaaa4280bce18c3
|
||||
// CraftBukkit end
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java
|
||||
index 3d6e19c2078a87983a849e6d627cba0609a556cc..e1aa1e1f23512fc7d2267ff8e75358b67cb419a3 100644
|
||||
index ec8ea29a71e74255660e3c084c3a708cf241d0c9..df794ef564882a76fde18014403e97cc22f0905d 100644
|
||||
--- a/src/main/java/net/minecraft/commands/Commands.java
|
||||
+++ b/src/main/java/net/minecraft/commands/Commands.java
|
||||
@@ -297,16 +297,7 @@ public class Commands {
|
||||
@@ -295,16 +295,7 @@ public class Commands {
|
||||
String[] args = command.split(" ");
|
||||
if (args.length == 0) return; // Paper - empty commands shall not be dispatched
|
||||
|
@ -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
|
||||
index 9507dbbb4b490149b9248c384be5adaccae40c41..5bbadc890a72f1cb22c6881ebcc163b0c06a367a 100644
|
||||
index 96db0b1041a4c0f054d4f3f2bdced960b119664e..78951f50188528718cdb3dbbaabe3f9f2760ffe3 100644
|
||||
--- a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
|
||||
+++ b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
|
||||
@@ -898,6 +898,13 @@ public interface DispenseItemBehavior {
|
||||
@@ -867,6 +867,13 @@ public interface DispenseItemBehavior {
|
||||
this.setSuccess(true);
|
||||
if (iblockdata.is(Blocks.RESPAWN_ANCHOR)) {
|
||||
if ((Integer) iblockdata.getValue(RespawnAnchorBlock.CHARGE) != 4) {
|
||||
@ -22,7 +22,7 @@ index 9507dbbb4b490149b9248c384be5adaccae40c41..5bbadc890a72f1cb22c6881ebcc163b0
|
||||
RespawnAnchorBlock.charge((Entity) null, worldserver, blockposition, iblockdata);
|
||||
stack.shrink(1);
|
||||
} else {
|
||||
@@ -977,6 +984,13 @@ public interface DispenseItemBehavior {
|
||||
@@ -944,6 +951,13 @@ public interface DispenseItemBehavior {
|
||||
Optional<BlockState> optional = HoneycombItem.getWaxed(iblockdata);
|
||||
|
||||
if (optional.isPresent()) {
|
||||
@ -36,7 +36,7 @@ index 9507dbbb4b490149b9248c384be5adaccae40c41..5bbadc890a72f1cb22c6881ebcc163b0
|
||||
worldserver.setBlockAndUpdate(blockposition, (BlockState) optional.get());
|
||||
worldserver.levelEvent(3003, blockposition, 0);
|
||||
stack.shrink(1);
|
||||
@@ -1004,6 +1018,12 @@ public interface DispenseItemBehavior {
|
||||
@@ -971,6 +985,12 @@ public interface DispenseItemBehavior {
|
||||
if (!worldserver.getBlockState(blockposition1).is(BlockTags.CONVERTABLE_TO_MUD)) {
|
||||
return this.defaultDispenseItemBehavior.dispense(pointer, stack);
|
||||
} else {
|
||||
@ -50,10 +50,10 @@ index 9507dbbb4b490149b9248c384be5adaccae40c41..5bbadc890a72f1cb22c6881ebcc163b0
|
||||
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);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index f4ca35e044e41b3fd1b83c482a5c19d188ea0bae..16f183c8e81b8c22ca51387e9e35282ed20d651c 100644
|
||||
index c59bb1811dba49571bbb82b17a75ab2363531996..30aa65060a8039d9b2f52c776bab27304dc97f8e 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -2121,6 +2121,32 @@ public class CraftEventFactory {
|
||||
@@ -2127,6 +2127,32 @@ public class CraftEventFactory {
|
||||
}
|
||||
// Paper end
|
||||
|
@ -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
|
||||
index 73831000101765845c0881bba217b2ca54eb39dd..9119bf1eac38f9b40d035f702150a7939095266c 100644
|
||||
index ce648d328ceb7d98fc523398c52915f7e7b5e23e..880546f6727b90ebb021bb0939283739adaa93f6 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -1210,7 +1210,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -1186,7 +1186,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
}
|
||||
|
||||
protected BlockPos getOnPos(float offset) {
|
@ -7,7 +7,7 @@ For larger ranges, it's better to iterate over the player list
|
||||
than the entity slices.
|
||||
|
||||
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 62b9b5f508462dd2257094cb48ce6123e29cb64d..a6ffbbc1b5021564864e42c0756342352c2b8290 100644
|
||||
index b6633ca1ee73ef0f8a220992a2e0424e67dd9758..814e70f558d7a6186233da0ff86c94c95d390e09 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
|
||||
@@ -333,7 +333,22 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name
|
@ -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
|
||||
index b0d73a9412421d86bd244757806d58fd99687163..a83f726bd10cc25565098e485c337783ba6dbd69 100644
|
||||
index e1605d97bbcdbb8903d78848c7b98b44fec34705..5f8dd54596aa90e45ed430be699b1d41ebf8827e 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
|
||||
@@ -367,6 +367,7 @@ public final class CraftItemFactory implements ItemFactory {
|
||||
@@ -376,6 +376,7 @@ public final class CraftItemFactory implements ItemFactory {
|
||||
case COD_BUCKET:
|
||||
case PUFFERFISH_BUCKET:
|
||||
case SALMON_BUCKET:
|
||||
@ -17,7 +17,7 @@ index b0d73a9412421d86bd244757806d58fd99687163..a83f726bd10cc25565098e485c337783
|
||||
case GLOW_ITEM_FRAME:
|
||||
case PAINTING:
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||
index fa223d2381986cb260c79f074fb7b123396f1f86..7c510d673253e53c1cebbe7af2aacbcaa59cb9de 100644
|
||||
index 1abef66189f3340e6dba7f73b9517044ae9be6e6..099b5364aa16afb4fb30ffca3e1bea8f52185150 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||
@@ -604,6 +604,7 @@ public final class CraftItemStack extends ItemStack {
|
@ -208,10 +208,10 @@ index 172202accf4448a933fcf1ff820316c7910dd7f7..50ee7656580d386db473c054f5c5ec57
|
||||
return null;
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 1b9e1038f729582117dc93736f9a089bf6481cff..b41646469bcbde02a1c2254247748bbcbbabddad 100644
|
||||
index 5163c979f086dac9111419d7bb3b624b0faa3a5b..f4ccaa880177c73b64df65db6b0b40e968629152 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -1733,23 +1733,23 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -1746,23 +1746,23 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -240,7 +240,7 @@ index 1b9e1038f729582117dc93736f9a089bf6481cff..b41646469bcbde02a1c2254247748bbc
|
||||
if (kickPlayer) {
|
||||
this.kickPlayer(reason);
|
||||
}
|
||||
@@ -1757,12 +1757,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -1770,12 +1770,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
}
|
||||
|
||||
@Override
|
@ -5,10 +5,10 @@ Subject: [PATCH] Fix possible NPE on painting creation
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntityTypes.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntityTypes.java
|
||||
index 907904da7f89e8e5e5cfab80977f04af3fdf17c7..2ab13259d2f3ecef4d9195c8b99775281aeaf12a 100644
|
||||
index 46a4f31e2b6eee6f8dc5f8fccd7de4c48a698b61..577ed3656480271a491bcd3d346c63854fd840e4 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntityTypes.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntityTypes.java
|
||||
@@ -325,8 +325,13 @@ public final class CraftEntityTypes {
|
||||
@@ -326,8 +326,13 @@ public final class CraftEntityTypes {
|
||||
// Hanging
|
||||
register(new EntityTypeData<>(EntityType.PAINTING, Painting.class, CraftPainting::new, createHanging(Painting.class, (spawnData, hangingData) -> {
|
||||
if (spawnData.normalWorld && hangingData.randomize()) {
|
||||
@ -24,10 +24,10 @@ index 907904da7f89e8e5e5cfab80977f04af3fdf17c7..2ab13259d2f3ecef4d9195c8b9977528
|
||||
net.minecraft.world.entity.decoration.Painting entity = new net.minecraft.world.entity.decoration.Painting(net.minecraft.world.entity.EntityType.PAINTING, spawnData.minecraftWorld());
|
||||
entity.absMoveTo(spawnData.x(), spawnData.y(), spawnData.z(), spawnData.yaw(), spawnData.pitch());
|
||||
entity.setDirection(hangingData.direction());
|
||||
@@ -465,6 +470,7 @@ public final class CraftEntityTypes {
|
||||
@@ -466,6 +471,7 @@ public final class CraftEntityTypes {
|
||||
AABB bb = (ItemFrame.class.isAssignableFrom(clazz))
|
||||
? 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);
|
||||
? net.minecraft.world.entity.decoration.ItemFrame.calculateBoundingBoxStatic(pos, CraftBlock.blockFaceToNotch(dir).getOpposite())
|
||||
: net.minecraft.world.entity.decoration.Painting.calculateBoundingBoxStatic(pos, CraftBlock.blockFaceToNotch(dir).getOpposite(), width, height);
|
||||
+ if (!spawnData.world.noCollision(bb)) continue; // Paper - add collision check
|
||||
List<net.minecraft.world.entity.Entity> list = spawnData.world().getEntities(null, bb);
|
||||
for (Iterator<net.minecraft.world.entity.Entity> it = list.iterator(); !taken && it.hasNext(); ) {
|
@ -6,7 +6,7 @@ Subject: [PATCH] Only set despawnTimer for Wandering Traders spawned by
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java b/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java
|
||||
index 63189d6325173a42b619907b44a426848fbc6988..0854e9b7ee2e6b23b6c1ee6a324a5a253c9d4679 100644
|
||||
index 856a93324f5ac411713851ccfb38dba52fb0af5e..0af34e0f9c9696fbcb11b12fb27472ef17ad532a 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java
|
||||
@@ -68,7 +68,7 @@ public class WanderingTrader extends net.minecraft.world.entity.npc.AbstractVill
|
@ -5,10 +5,10 @@ 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
|
||||
index 16f183c8e81b8c22ca51387e9e35282ed20d651c..97ce8663744041bd57bbb1000f77a05e01156a6c 100644
|
||||
index 30aa65060a8039d9b2f52c776bab27304dc97f8e..2f2b09b2b9bd8730b83ade4d7da996b3b6696e0a 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -735,7 +735,8 @@ public class CraftEventFactory {
|
||||
@@ -736,7 +736,8 @@ public class CraftEventFactory {
|
||||
// Spigot start - SPIGOT-7523: Merge after spawn event and only merge if the event was not cancelled (gets checked above)
|
||||
if (entity instanceof net.minecraft.world.entity.ExperienceOrb xp) {
|
||||
double radius = world.spigotConfig.expMerge;
|
@ -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
|
||||
index a2ce3d3423a8cb3b851c2d811678ccb9c5b5d5b0..38e19bd86bdef97dbea5ae2a4e7692ba10d39c47 100644
|
||||
index e56d73fffaa0da4813aaa0fa08554cfbb0f72279..1502f080e65a942b36fb16c87a409d9e1a53edfe 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1266,8 +1266,8 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -1261,8 +1261,8 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
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; // Paper - OBFHELPER
|
||||
double d2 = ServerGamePacketListenerImpl.clampHorizontal(packet.getZ(this.player.getZ())); final double toZ = d2; // Paper - OBFHELPER
|
||||
@ -19,7 +19,7 @@ index a2ce3d3423a8cb3b851c2d811678ccb9c5b5d5b0..38e19bd86bdef97dbea5ae2a4e7692ba
|
||||
|
||||
if (this.player.isPassenger()) {
|
||||
this.player.absMoveTo(this.player.getX(), this.player.getY(), this.player.getZ(), f, f1);
|
||||
@@ -1334,8 +1334,14 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -1329,8 +1329,14 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
}
|
||||
// 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())))) {
|
||||
@ -36,7 +36,7 @@ index a2ce3d3423a8cb3b851c2d811678ccb9c5b5d5b0..38e19bd86bdef97dbea5ae2a4e7692ba
|
||||
}
|
||||
// Paper end - Prevent moving into unloaded chunks
|
||||
|
||||
@@ -1344,9 +1350,16 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -1339,9 +1345,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()) {
|
||||
// CraftBukkit end
|
||||
@ -56,7 +56,7 @@ index a2ce3d3423a8cb3b851c2d811678ccb9c5b5d5b0..38e19bd86bdef97dbea5ae2a4e7692ba
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1408,14 +1421,31 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -1403,14 +1416,31 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
|
||||
d8 = d2 - this.player.getZ();
|
||||
d10 = d6 * d6 + d7 * d7 + d8 * d8;
|
||||
@ -91,7 +91,7 @@ index a2ce3d3423a8cb3b851c2d811678ccb9c5b5d5b0..38e19bd86bdef97dbea5ae2a4e7692ba
|
||||
this.internalTeleport(d3, d4, d5, f, f1, Collections.emptySet()); // CraftBukkit - SPIGOT-1807: Don't call teleport event, when the client thinks the player is falling, because the chunks are not loaded on the client yet.
|
||||
this.player.doCheckFallDamage(this.player.getX() - d3, this.player.getY() - d4, this.player.getZ() - d5, packet.isOnGround());
|
||||
} else {
|
||||
@@ -3450,4 +3480,17 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -3467,4 +3497,17 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
|
||||
InteractionResult run(ServerPlayer player, Entity entity, InteractionHand hand);
|
||||
}
|
@ -1148,10 +1148,10 @@ index 0000000000000000000000000000000000000000..d306f911757a4d556c82c0070d4837db
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 9ba2a71e5bedbf8e65f9dd1652639afd397439c7..2a92268dfc8ee264e4ee6ffc56b40a87e334acc8 100644
|
||||
index fcf450f9fefda8cf2391dcb61075cbd855475d6c..b7254c342501f2d7fbbe8959a6e88a5d1f6e076e 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1551,6 +1551,20 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1579,6 +1579,20 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
MinecraftTimings.bukkitSchedulerTimer.startTiming(); // Spigot // Paper
|
||||
this.server.getScheduler().mainThreadHeartbeat(this.tickCount); // CraftBukkit
|
||||
MinecraftTimings.bukkitSchedulerTimer.stopTiming(); // Spigot // Paper
|
||||
@ -1173,10 +1173,10 @@ index 9ba2a71e5bedbf8e65f9dd1652639afd397439c7..2a92268dfc8ee264e4ee6ffc56b40a87
|
||||
this.profiler.push("commandFunctions");
|
||||
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
|
||||
index 942af999a4a3aa03cb7ef5f0b9d377c78677fd0e..0246db4a1f6eb168fa88260282311fee2ebb6014 100644
|
||||
index f730d441e5e577b354d507a175690fe3246107d5..c6316960e9765239fbf117702b3c81c542839643 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -646,6 +646,7 @@ public abstract class PlayerList {
|
||||
@@ -640,6 +640,7 @@ public abstract class PlayerList {
|
||||
|
||||
entityplayer.unRide();
|
||||
worldserver.removePlayerImmediately(entityplayer, Entity.RemovalReason.UNLOADED_WITH_PLAYER);
|
||||
@ -1185,10 +1185,10 @@ index 942af999a4a3aa03cb7ef5f0b9d377c78677fd0e..0246db4a1f6eb168fa88260282311fee
|
||||
this.players.remove(entityplayer);
|
||||
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
|
||||
index 9119bf1eac38f9b40d035f702150a7939095266c..27d736d34c91c08782fa8fd60742e296580e08f2 100644
|
||||
index 880546f6727b90ebb021bb0939283739adaa93f6..94c5dcfdf1dae1f4764c3c7287e4b51928a35a4c 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -249,11 +249,23 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -255,11 +255,23 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
public @org.jetbrains.annotations.Nullable net.minecraft.server.level.ChunkMap.TrackedEntity tracker; // Paper
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (this.bukkitEntity == null) {
|
||||
@ -1213,7 +1213,7 @@ index 9119bf1eac38f9b40d035f702150a7939095266c..27d736d34c91c08782fa8fd60742e296
|
||||
@Override
|
||||
public CommandSender getBukkitSender(CommandSourceStack wrapper) {
|
||||
return this.getBukkitEntity();
|
||||
@@ -4477,6 +4489,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -4496,6 +4508,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
public final void setRemoved(Entity.RemovalReason entity_removalreason, EntityRemoveEvent.Cause cause) {
|
||||
CraftEventFactory.callEntityRemoveEvent(this, cause);
|
||||
// CraftBukkit end
|
||||
@ -1221,7 +1221,7 @@ index 9119bf1eac38f9b40d035f702150a7939095266c..27d736d34c91c08782fa8fd60742e296
|
||||
if (this.removalReason == null) {
|
||||
this.removalReason = entity_removalreason;
|
||||
}
|
||||
@@ -4487,12 +4500,28 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -4506,12 +4519,28 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
|
||||
this.getPassengers().forEach(Entity::stopRiding);
|
||||
this.levelCallback.onRemove(entity_removalreason);
|
||||
@ -1251,10 +1251,10 @@ index 9119bf1eac38f9b40d035f702150a7939095266c..27d736d34c91c08782fa8fd60742e296
|
||||
public void setLevelCallback(EntityInLevelCallback changeListener) {
|
||||
this.levelCallback = changeListener;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index c2dc4a7194c83cb01724fc04ea4971b34b2f8235..e61e1f4621ca29cab1afdf26b013b7b89b1ac358 100644
|
||||
index 571b569b6ce8c29c038a1af6429eced5c0b64ff7..70f1e1cf83c99b2c3cea8d02c744ce68f8335c8b 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -308,6 +308,76 @@ public final class CraftServer implements Server {
|
||||
@@ -310,6 +310,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.potion.PaperPotionBrewer potionBrewer; // Paper - Custom Potion Mixes
|
||||
|
||||
@ -1332,10 +1332,10 @@ index c2dc4a7194c83cb01724fc04ea4971b34b2f8235..e61e1f4621ca29cab1afdf26b013b7b8
|
||||
ConfigurationSerialization.registerClass(CraftOfflinePlayer.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
|
||||
index 991b94ff1186b1071a94b2662873dc071255e2e6..36c97ac40d7e1127d95eeca396570b1d50b69a5c 100644
|
||||
index d8b1cdc78eb234023a42d740599009737201e70e..bc37a3fc38e1966af3722ed16b3f940c2a8387a9 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
@@ -68,6 +68,15 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
@@ -70,6 +70,15 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
private EntityDamageEvent lastDamageEvent;
|
||||
private final CraftPersistentDataContainer persistentDataContainer = new CraftPersistentDataContainer(CraftEntity.DATA_TYPE_REGISTRY);
|
||||
protected net.kyori.adventure.pointer.Pointers adventure$pointers; // Paper - implement pointers
|
||||
@ -1351,7 +1351,7 @@ index 991b94ff1186b1071a94b2662873dc071255e2e6..36c97ac40d7e1127d95eeca396570b1d
|
||||
|
||||
public CraftEntity(final CraftServer server, final Entity entity) {
|
||||
this.server = server;
|
||||
@@ -484,6 +493,12 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
@@ -486,6 +495,12 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
return this.entity;
|
||||
}
|
||||
|
@ -5,10 +5,10 @@ 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
|
||||
index 0246db4a1f6eb168fa88260282311fee2ebb6014..ea04eb049e16d1027d15f9863d1fcd16f090c464 100644
|
||||
index c6316960e9765239fbf117702b3c81c542839643..b2fab1e6a83b2603aeb8565b25022f9e99a61029 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -1530,6 +1530,13 @@ public abstract class PlayerList {
|
||||
@@ -1484,6 +1484,13 @@ public abstract class PlayerList {
|
||||
}
|
||||
|
||||
public void reloadResources() {
|
||||
@ -22,7 +22,7 @@ index 0246db4a1f6eb168fa88260282311fee2ebb6014..ea04eb049e16d1027d15f9863d1fcd16
|
||||
// CraftBukkit start
|
||||
/*Iterator iterator = this.advancements.values().iterator();
|
||||
|
||||
@@ -1545,7 +1552,15 @@ public abstract class PlayerList {
|
||||
@@ -1499,7 +1506,15 @@ public abstract class PlayerList {
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
@ -39,10 +39,10 @@ index 0246db4a1f6eb168fa88260282311fee2ebb6014..ea04eb049e16d1027d15f9863d1fcd16
|
||||
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
|
||||
index e61e1f4621ca29cab1afdf26b013b7b89b1ac358..f5a4ddf217fc114daf7faf345dd6c2e9294cba52 100644
|
||||
index 70f1e1cf83c99b2c3cea8d02c744ce68f8335c8b..b4ae7630d5cdbe97d6050f6a2c6c679b26e6ddc7 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1162,6 +1162,18 @@ public final class CraftServer implements Server {
|
||||
@@ -1165,6 +1165,18 @@ public final class CraftServer implements Server {
|
||||
ReloadCommand.reload(this.console);
|
||||
}
|
||||
|
||||
@ -61,7 +61,7 @@ index e61e1f4621ca29cab1afdf26b013b7b89b1ac358..f5a4ddf217fc114daf7faf345dd6c2e9
|
||||
private void loadIcon() {
|
||||
this.icon = new CraftIconCache(null);
|
||||
try {
|
||||
@@ -1541,6 +1553,13 @@ public final class CraftServer implements Server {
|
||||
@@ -1544,6 +1556,13 @@ public final class CraftServer implements Server {
|
||||
|
||||
@Override
|
||||
public boolean addRecipe(Recipe recipe) {
|
||||
@ -75,7 +75,7 @@ index e61e1f4621ca29cab1afdf26b013b7b89b1ac358..f5a4ddf217fc114daf7faf345dd6c2e9
|
||||
CraftRecipe toAdd;
|
||||
if (recipe instanceof CraftRecipe) {
|
||||
toAdd = (CraftRecipe) recipe;
|
||||
@@ -1570,6 +1589,11 @@ public final class CraftServer implements Server {
|
||||
@@ -1573,6 +1592,11 @@ public final class CraftServer implements Server {
|
||||
}
|
||||
}
|
||||
toAdd.addToCraftingManager();
|
||||
@ -87,7 +87,7 @@ index e61e1f4621ca29cab1afdf26b013b7b89b1ac358..f5a4ddf217fc114daf7faf345dd6c2e9
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1750,10 +1774,23 @@ public final class CraftServer implements Server {
|
||||
@@ -1753,10 +1777,23 @@ public final class CraftServer implements Server {
|
||||
|
||||
@Override
|
||||
public boolean removeRecipe(NamespacedKey recipeKey) {
|
@ -5,18 +5,18 @@ Subject: [PATCH] Fix rotation when spawning display entities
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntityTypes.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntityTypes.java
|
||||
index 2ab13259d2f3ecef4d9195c8b99775281aeaf12a..d9881f5f9b36e215afc98ce84c83b3a5443d1d39 100644
|
||||
index 577ed3656480271a491bcd3d346c63854fd840e4..39aa116193f313f53540b0135d2ab26acb7f1469 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntityTypes.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntityTypes.java
|
||||
@@ -220,6 +220,7 @@ public final class CraftEntityTypes {
|
||||
Vector direction = spawnData.location().getDirection().multiply(10);
|
||||
entity.assignPower(direction.getX(), direction.getY(), direction.getZ());
|
||||
@@ -221,6 +221,7 @@ public final class CraftEntityTypes {
|
||||
Vector direction = spawnData.location().getDirection();
|
||||
entity.assignDirectionalMovement(new Vec3(direction.getX(), direction.getY(), direction.getZ()), 1.0);
|
||||
};
|
||||
+ private static final BiConsumer<SpawnData, net.minecraft.world.entity.Entity> ROT = (spawnData, entity) -> entity.setRot(spawnData.yaw(), spawnData.pitch()); // Paper
|
||||
private static final Map<Class<?>, EntityTypeData<?, ?>> CLASS_TYPE_DATA = new HashMap<>();
|
||||
private static final Map<EntityType, EntityTypeData<?, ?>> ENTITY_TYPE_DATA = new HashMap<>();
|
||||
|
||||
@@ -360,10 +361,10 @@ public final class CraftEntityTypes {
|
||||
@@ -361,10 +362,10 @@ public final class CraftEntityTypes {
|
||||
|
||||
// Set pos
|
||||
register(new EntityTypeData<>(EntityType.MARKER, Marker.class, CraftMarker::new, createAndSetPos(net.minecraft.world.entity.EntityType.MARKER)));
|
@ -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
|
||||
index 5bbadc890a72f1cb22c6881ebcc163b0c06a367a..4fa838bf97ede6e1c893ba64f53aa7af5db0405a 100644
|
||||
index 78951f50188528718cdb3dbbaabe3f9f2760ffe3..7826e2a52da47914aca39fef958b8f398a2ff937 100644
|
||||
--- a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
|
||||
+++ b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
|
||||
@@ -654,6 +654,7 @@ public interface DispenseItemBehavior {
|
||||
@@ -634,6 +634,7 @@ public interface DispenseItemBehavior {
|
||||
if (!fertilizeEvent.isCancelled()) {
|
||||
for (org.bukkit.block.BlockState blockstate : blocks) {
|
||||
blockstate.update(true);
|
||||
@ -17,10 +17,10 @@ index 5bbadc890a72f1cb22c6881ebcc163b0c06a367a..4fa838bf97ede6e1c893ba64f53aa7af
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
index c27ef32a3fc3edf5a4dd91d7cba93a78a5e762fa..4485199c90e3efbce3e6a18a75703e86a9bdde3c 100644
|
||||
index 92be749721f26e9385e592a985db58cf05c67801..1f2e6f57ffb827ef9bf3623bfdde07db21edf6ee 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
@@ -445,6 +445,7 @@ public final class ItemStack implements DataComponentHolder {
|
||||
@@ -466,6 +466,7 @@ public final class ItemStack implements DataComponentHolder {
|
||||
for (CraftBlockState blockstate : blocks) {
|
||||
// SPIGOT-7572 - Move fix for SPIGOT-7248 to CapturedBlockState, to allow bees in bee nest
|
||||
CapturedBlockState.setBlockState(blockstate);
|
||||
@ -29,10 +29,10 @@ index c27ef32a3fc3edf5a4dd91d7cba93a78a5e762fa..4485199c90e3efbce3e6a18a75703e86
|
||||
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
|
||||
index 61fc08cac437bd5dd6f3ff7561fab3d4c108388d..2f018922fb12dc4c3c9c28c7b0597a2b97d1cb02 100644
|
||||
index b8d8041aecc2ff008247449cba8d9f192cf51073..ffaf6e65a7314479a129fed41f58bf2d75ea5dae 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -1365,4 +1365,14 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -1380,4 +1380,14 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
return range <= 0 ? 64.0 * 64.0 : range * range; // 64 is taken from default in ServerLevel#levelEvent
|
||||
}
|
||||
// Paper end - respect global sound events gamerule
|
@ -9,11 +9,11 @@ Subject: [PATCH] Respect randomizeData on more entities when spawning
|
||||
* ExperienceOrb
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntityTypes.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntityTypes.java
|
||||
index d9881f5f9b36e215afc98ce84c83b3a5443d1d39..d65d538a216fc3a1ed048cf78a8937abe3c0bc1b 100644
|
||||
index 39aa116193f313f53540b0135d2ab26acb7f1469..afc75ef3fb0fac40673fdfb684bd1f0d0edeb6ce 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntityTypes.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntityTypes.java
|
||||
@@ -221,6 +221,13 @@ public final class CraftEntityTypes {
|
||||
entity.assignPower(direction.getX(), direction.getY(), direction.getZ());
|
||||
@@ -222,6 +222,13 @@ public final class CraftEntityTypes {
|
||||
entity.assignDirectionalMovement(new Vec3(direction.getX(), direction.getY(), direction.getZ()), 1.0);
|
||||
};
|
||||
private static final BiConsumer<SpawnData, net.minecraft.world.entity.Entity> ROT = (spawnData, entity) -> entity.setRot(spawnData.yaw(), spawnData.pitch()); // Paper
|
||||
+ // Paper start - respect randomizeData
|
||||
@ -26,7 +26,7 @@ index d9881f5f9b36e215afc98ce84c83b3a5443d1d39..d65d538a216fc3a1ed048cf78a8937ab
|
||||
private static final Map<Class<?>, EntityTypeData<?, ?>> CLASS_TYPE_DATA = new HashMap<>();
|
||||
private static final Map<EntityType, EntityTypeData<?, ?>> ENTITY_TYPE_DATA = new HashMap<>();
|
||||
|
||||
@@ -373,11 +380,12 @@ public final class CraftEntityTypes {
|
||||
@@ -374,11 +381,12 @@ public final class CraftEntityTypes {
|
||||
net.minecraft.world.item.ItemStack itemStack = new net.minecraft.world.item.ItemStack(Items.STONE);
|
||||
ItemEntity item = new ItemEntity(spawnData.minecraftWorld(), spawnData.x(), spawnData.y(), spawnData.z(), itemStack);
|
||||
item.setPickUpDelay(10);
|
||||
@ -40,7 +40,7 @@ index d9881f5f9b36e215afc98ce84c83b3a5443d1d39..d65d538a216fc3a1ed048cf78a8937ab
|
||||
));
|
||||
register(new EntityTypeData<>(EntityType.AREA_EFFECT_CLOUD, AreaEffectCloud.class, CraftAreaEffectCloud::new, createAndMove(net.minecraft.world.entity.EntityType.AREA_EFFECT_CLOUD))); // Paper - set area effect cloud rotation
|
||||
register(new EntityTypeData<>(EntityType.EGG, Egg.class, CraftEgg::new, spawnData -> new ThrownEgg(spawnData.minecraftWorld(), spawnData.x(), spawnData.y(), spawnData.z())));
|
||||
@@ -389,12 +397,23 @@ public final class CraftEntityTypes {
|
||||
@@ -390,12 +398,23 @@ public final class CraftEntityTypes {
|
||||
entity.setItem(CraftItemStack.asNMSCopy(new ItemStack(Material.SPLASH_POTION, 1)));
|
||||
return entity;
|
||||
}));
|
@ -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
|
||||
index f5a4ddf217fc114daf7faf345dd6c2e9294cba52..79aa2d308c079205b50abae38fa88d69b51063e3 100644
|
||||
index b4ae7630d5cdbe97d6050f6a2c6c679b26e6ddc7..9a8d64e43264605737c43e2a3512e9addc770db4 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1384,7 +1384,7 @@ public final class CraftServer implements Server {
|
||||
@@ -1387,7 +1387,7 @@ public final class CraftServer implements Server {
|
||||
net.minecraft.server.Main.forceUpgrade(worldSession, DataFixers.getDataFixer(), this.console.options.has("eraseCache"), () -> true, iregistrycustom_dimension, this.console.options.has("recreateRegionFiles"));
|
||||
}
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Cache map ids on item frames
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerEntity.java b/src/main/java/net/minecraft/server/level/ServerEntity.java
|
||||
index 979571cc12f81e09df8570f7deb32f4c604188bd..0373b2de2b992b648f346d6df3960a3586a54567 100644
|
||||
index f010be9605d7458add7e5693ff473fabf679c938..a2fbbbd7a66d4e7b1063638f8467e8887a417282 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerEntity.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerEntity.java
|
||||
@@ -118,7 +118,7 @@ public class ServerEntity {
|
||||
@@ -117,7 +117,7 @@ public class ServerEntity {
|
||||
ItemStack itemstack = entityitemframe.getItem();
|
||||
|
||||
if (this.level.paperConfig().maps.itemFrameCursorUpdateInterval > 0 && this.tickCount % this.level.paperConfig().maps.itemFrameCursorUpdateInterval == 0 && itemstack.getItem() instanceof MapItem) { // CraftBukkit - Moved this.tickCounter % 10 logic here so item frames do not enter the other blocks // Paper - Make item frame map cursor update interval configurable
|
||||
@ -18,18 +18,18 @@ index 979571cc12f81e09df8570f7deb32f4c604188bd..0373b2de2b992b648f346d6df3960a35
|
||||
|
||||
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
|
||||
index 6bf89686ce5cf700ac06ec1e38f53af745098fa3..da0d1c9a1c4ae081bff9ca4230c9a1503885c354 100644
|
||||
index ba4e0ad7c7c2731d61ec7f60f19d7e9ec31a28ba..5b7245cd99593ee90e17c97e0104f3aba9ae05ea 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java
|
||||
@@ -49,6 +49,7 @@ public class ItemFrame extends HangingEntity {
|
||||
public static final int NUM_ROTATIONS = 8;
|
||||
@@ -50,6 +50,7 @@ public class ItemFrame extends HangingEntity {
|
||||
private static final float HEIGHT = 0.75F;
|
||||
public float dropChance;
|
||||
public boolean fixed;
|
||||
+ public @Nullable MapId cachedMapId; // Paper - Perf: Cache map ids on item frames
|
||||
|
||||
public ItemFrame(EntityType<? extends ItemFrame> type, Level world) {
|
||||
super(type, world);
|
||||
@@ -364,6 +365,7 @@ public class ItemFrame extends HangingEntity {
|
||||
@@ -322,6 +323,7 @@ public class ItemFrame extends HangingEntity {
|
||||
}
|
||||
|
||||
private void onItemChanged(ItemStack stack) {
|
@ -5,7 +5,7 @@ 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
|
||||
index ff2c6a7b4b8ae2f7e9e1c84e1a3bd04e0484d075..256fdd08a7653d1dc93cd13a976cd114253aa945 100644
|
||||
index 7272f154644366c3c467b265aadc59b879a7b7bd..a98fcfcf71b2a072d60120046d9aac9ad4546196 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
@@ -610,6 +610,14 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
@ -68,7 +68,7 @@ index 71733f918ed84b9879ac1b142ef6205c5e768a9c..c856384019eff2f2d0bb831ebe1ccb0f
|
||||
break;
|
||||
case BONE_MEAL_USE:
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 606797b07bb5eb0ce8fa9d01eaa74e0d6c10b56b..f371e76215a789f84eb5086a3d08bcf6e4e02dd8 100644
|
||||
index 9391259ffbee1da5c92ad4a253d99617aa57871a..8708f0df623e82074ecf858c8d1389b33ded07a1 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -1427,7 +1427,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@ -81,10 +81,10 @@ index 606797b07bb5eb0ce8fa9d01eaa74e0d6c10b56b..f371e76215a789f84eb5086a3d08bcf6
|
||||
// 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);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index b41646469bcbde02a1c2254247748bbcbbabddad..a06145c8ba3cd88c827bcc354e7dc2dafa3eda32 100644
|
||||
index f4ccaa880177c73b64df65db6b0b40e968629152..9a2e626c280e3dcdb1ef950afa5829daf2d0f073 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -915,7 +915,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -917,7 +917,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
Preconditions.checkArgument(effect != null, "Effect cannot be null");
|
||||
if (data != null) {
|
||||
Preconditions.checkArgument(effect.getData() != null, "Effect.%s does not have a valid Data", effect);
|
@ -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.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
index 36c97ac40d7e1127d95eeca396570b1d50b69a5c..96448895a0a18e6f819d0a2a629c04abd331fa85 100644
|
||||
index bc37a3fc38e1966af3722ed16b3f940c2a8387a9..b5622c5bcc97ff9241d236a35018918db5b2103a 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
@@ -1244,4 +1244,11 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
@@ -1261,4 +1261,11 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
return !this.getHandle().level().noCollision(this.getHandle(), aabb);
|
||||
}
|
||||
// Paper end - Collision API
|
@ -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
|
||||
index 79aa2d308c079205b50abae38fa88d69b51063e3..cce628673b6173f17ac81bce5469a7dbd8a2c648 100644
|
||||
index 9a8d64e43264605737c43e2a3512e9addc770db4..4aa8c742411fe9ae1312f3663859eb107fcf68ef 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1989,6 +1989,11 @@ public final class CraftServer implements Server {
|
||||
@@ -1992,6 +1992,11 @@ public final class CraftServer implements Server {
|
||||
|
||||
ServerLevel worldServer = ((CraftWorld) world).getHandle();
|
||||
Location structureLocation = world.locateNearestStructure(location, structureType, radius, findUnexplored);
|
||||
@ -20,7 +20,7 @@ index 79aa2d308c079205b50abae38fa88d69b51063e3..cce628673b6173f17ac81bce5469a7db
|
||||
BlockPos structurePosition = CraftLocation.toBlockPosition(structureLocation);
|
||||
|
||||
// Create map with trackPlayer = true, unlimitedTracking = true
|
||||
@@ -1999,6 +2004,31 @@ public final class CraftServer implements Server {
|
||||
@@ -2002,6 +2007,31 @@ public final class CraftServer implements Server {
|
||||
|
||||
return CraftItemStack.asBukkitCopy(stack);
|
||||
}
|
@ -11,10 +11,10 @@ This patch prevents server from sending namespaced commands when player
|
||||
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
|
||||
index 38e19bd86bdef97dbea5ae2a4e7692ba10d39c47..5c9d3ce9c84fd86209023306ad15a9bcb1725b0d 100644
|
||||
index 1502f080e65a942b36fb16c87a409d9e1a53edfe..9206806204862e7b50f5c520660a07bdd7604480 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -817,6 +817,11 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -820,6 +820,11 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
ParseResults<CommandSourceStack> parseresults = this.server.getCommands().getDispatcher().parse(stringreader, this.player.createCommandSourceStack());
|
||||
|
||||
this.server.getCommands().getDispatcher().getCompletionSuggestions(parseresults).thenAccept((suggestions) -> {
|
@ -9,10 +9,10 @@ food consumption, turtle egg count decreases, ice to water
|
||||
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
|
||||
index af4ee7e936dad42c458488b128d733a34b08afb5..266fd2874293091f7bf49dcb8c9295250ac7286c 100644
|
||||
index 717d015dd4637dd9d568b751be1dc1046b0a0560..c680f081ba548f84f07a968a46811090c53e57e3 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
@@ -434,8 +434,8 @@ public class ServerPlayerGameMode {
|
||||
@@ -439,8 +439,8 @@ public class ServerPlayerGameMode {
|
||||
isCorrectTool = flag1; // Paper - Trigger bee_nest_destroyed trigger in the correct place
|
||||
|
||||
itemstack.mineBlock(this.level, iblockdata1, pos, this.player);
|
||||
@ -24,7 +24,7 @@ index af4ee7e936dad42c458488b128d733a34b08afb5..266fd2874293091f7bf49dcb8c929525
|
||||
|
||||
// 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
|
||||
index 21a7f9414e27c73b58fd75fbe68cf889f52a5d01..f6bed27ddbc47c894e315fc59c2721923b486ef8 100644
|
||||
index c75227b2ea165dcd65c203e60157ac7cdebd4bc6..4669b1877be5eecf6738eefd81a35bde531759d6 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/BeehiveBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/BeehiveBlock.java
|
||||
@@ -86,8 +86,8 @@ public class BeehiveBlock extends BaseEntityBlock {
|
||||
@ -36,13 +36,13 @@ index 21a7f9414e27c73b58fd75fbe68cf889f52a5d01..f6bed27ddbc47c894e315fc59c272192
|
||||
+ public void playerDestroy(Level world, Player player, BlockPos pos, BlockState state, @Nullable BlockEntity blockEntity, ItemStack tool, boolean includeDrops, boolean dropExp) { // Paper - fix drops not preventing stats/food exhaustion
|
||||
+ super.playerDestroy(world, player, pos, state, blockEntity, tool, includeDrops, dropExp); // Paper - fix drops not preventing stats/food exhaustion
|
||||
if (!world.isClientSide && blockEntity instanceof BeehiveBlockEntity tileentitybeehive) {
|
||||
if (EnchantmentHelper.getItemEnchantmentLevel(Enchantments.SILK_TOUCH, tool) == 0) {
|
||||
if (!EnchantmentHelper.hasTag(tool, EnchantmentTags.PREVENTS_BEE_SPAWNS_WHEN_MINING)) {
|
||||
tileentitybeehive.emptyAllLivingFromHive(player, state, BeehiveBlockEntity.BeeReleaseStatus.EMERGENCY);
|
||||
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 c09851136944bd58d82b3a9d19719b0354802824..a757a45d423e1729c9374391df4186ae0522e1ac 100644
|
||||
index 232e6216dc36aa698047fc0badf78c347414b3a5..c083dc8b2a69c3747b250d13f1a28ad22b5e6119 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/Block.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/Block.java
|
||||
@@ -403,10 +403,18 @@ public class Block extends BlockBehaviour implements ItemLike {
|
||||
@@ -402,10 +402,18 @@ public class Block extends BlockBehaviour implements ItemLike {
|
||||
return this.defaultBlockState();
|
||||
}
|
||||
|
||||
@ -77,7 +77,7 @@ index 7fdf744a2be55313cc75c1322f6534f55cf463f5..f446c40c4d90307c568faa2866800f53
|
||||
|
||||
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
|
||||
index 4bfe53e3a231a7bec461759e78c7a6cbcb8bb625..013302623d3ca3ff88f242d740af935dcf4844a6 100644
|
||||
index e862814c1e54776f11050623b52476accc2f1f79..ac775afb265430ac202cfa3900a036d11a308b1e 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/IceBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/IceBlock.java
|
||||
@@ -33,8 +33,8 @@ public class IceBlock extends HalfTransparentBlock {
|
@ -5,10 +5,10 @@ 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
|
||||
index e8be7ddbef12b27ed5c5fcfa8b726d5a85058aa9..0e797e2714a2fd103cbd51548764577fd9b6412d 100644
|
||||
index 45673a7630977e833df84e29e2f0b0012a3ab049..4d2fbade3a01ca26ff107f1323ae23db6dad8ef8 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
|
||||
@@ -641,6 +641,15 @@ public class EnderDragon extends Mob implements Enemy {
|
||||
@@ -658,6 +658,15 @@ public class EnderDragon extends Mob implements Enemy {
|
||||
|
||||
@Override
|
||||
public void kill() {
|
@ -6,10 +6,10 @@ Subject: [PATCH] Configurable entity tracking range by Y coordinate
|
||||
Options to configure entity tracking by Y coordinate, also for each entity category.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
index bff776f07bcc7841acc5757c1f53bde1812756c8..e7994d0f45b186938dd5606284290f56f110d7ed 100644
|
||||
index 8eae75993ad60226a86456487f3b3a59999ab423..38df456d3646c384d17ae9aec60c18fcd0651b4b 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -1754,6 +1754,15 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -1593,6 +1593,15 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
double d1 = vec3d.x * vec3d.x + vec3d.z * vec3d.z;
|
||||
double d2 = d0 * d0;
|
||||
boolean flag = d1 <= d2 && this.entity.broadcastToPlayer(player) && ChunkMap.this.isChunkTracked(player, this.entity.chunkPosition().x, this.entity.chunkPosition().z);
|
@ -82,7 +82,7 @@ index 6247a21c9c391abf1f6db3482c659593e4f29355..9ccca41bf23efadba5329cc584bbcdca
|
||||
|
||||
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
|
||||
index ea04eb049e16d1027d15f9863d1fcd16f090c464..0aa28caa1254137c0bae8e213bd08c9a654f5335 100644
|
||||
index b2fab1e6a83b2603aeb8565b25022f9e99a61029..8ba99f6ef2b50ceb8e279ed559a375ada6877576 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -359,14 +359,22 @@ public abstract class PlayerList {
|
||||
@ -119,10 +119,10 @@ index ea04eb049e16d1027d15f9863d1fcd16f090c464..0aa28caa1254137c0bae8e213bd08c9a
|
||||
// Paper end - Use single player info update packet on join
|
||||
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
|
||||
index a06145c8ba3cd88c827bcc354e7dc2dafa3eda32..89268fc4a0570da27c53ad5f5a36cfbc1615c3fb 100644
|
||||
index 9a2e626c280e3dcdb1ef950afa5829daf2d0f073..42c35d628744db8e715cf72c17803e2e1a94697b 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -199,6 +199,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -201,6 +201,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
private final ConversationTracker conversationTracker = new ConversationTracker();
|
||||
private final Set<String> channels = new HashSet<String>();
|
||||
private final Map<UUID, Set<WeakReference<Plugin>>> invertedVisibilityEntities = new HashMap<>();
|
||||
@ -130,7 +130,7 @@ index a06145c8ba3cd88c827bcc354e7dc2dafa3eda32..89268fc4a0570da27c53ad5f5a36cfbc
|
||||
private static final WeakHashMap<Plugin, WeakReference<Plugin>> pluginWeakReferences = new WeakHashMap<>();
|
||||
private int hash = 0;
|
||||
private double health = 20;
|
||||
@@ -2073,7 +2074,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -2086,7 +2087,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
otherPlayer.setUUID(uuidOverride);
|
||||
}
|
||||
// Paper end
|
||||
@ -139,7 +139,7 @@ index a06145c8ba3cd88c827bcc354e7dc2dafa3eda32..89268fc4a0570da27c53ad5f5a36cfbc
|
||||
if (original != null) otherPlayer.setUUID(original); // Paper - uuid override
|
||||
}
|
||||
|
||||
@@ -2177,6 +2178,41 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -2190,6 +2191,41 @@ 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
|
||||
}
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add BlockFace to BlockDamageEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
index 266fd2874293091f7bf49dcb8c9295250ac7286c..dd78a1685bd841577aa9d5010fffda1468901baf 100644
|
||||
index c680f081ba548f84f07a968a46811090c53e57e3..d839f8df658c894f144ba4637d290ffbed77e132 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
@@ -256,7 +256,7 @@ public class ServerPlayerGameMode {
|
||||
@@ -261,7 +261,7 @@ public class ServerPlayerGameMode {
|
||||
}
|
||||
return;
|
||||
}
|
||||
@ -18,10 +18,10 @@ index 266fd2874293091f7bf49dcb8c9295250ac7286c..dd78a1685bd841577aa9d5010fffda14
|
||||
if (blockEvent.isCancelled()) {
|
||||
// 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
|
||||
index 97ce8663744041bd57bbb1000f77a05e01156a6c..cdb5fd2642e7c5325f11633de8d58a5a8cdc2c77 100644
|
||||
index 2f2b09b2b9bd8730b83ade4d7da996b3b6696e0a..69e191d4394e1b22fdf4ba817cb2ec0ae3805414 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -650,13 +650,13 @@ public class CraftEventFactory {
|
||||
@@ -651,13 +651,13 @@ public class CraftEventFactory {
|
||||
/**
|
||||
* BlockDamageEvent
|
||||
*/
|
@ -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
|
||||
index 27d736d34c91c08782fa8fd60742e296580e08f2..73669ce44d3b62183f983365df5a46c10e1458bf 100644
|
||||
index 94c5dcfdf1dae1f4764c3c7287e4b51928a35a4c..84d735d358e2b58df0fccc8ffc5ef3346e62071d 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -420,6 +420,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -426,6 +426,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@javax.annotation.Nullable
|
||||
private UUID originWorld;
|
||||
public boolean freezeLocked = false; // Paper - Freeze Tick Lock API
|
||||
@ -16,7 +16,7 @@ index 27d736d34c91c08782fa8fd60742e296580e08f2..73669ce44d3b62183f983365df5a46c1
|
||||
|
||||
public void setOrigin(@javax.annotation.Nonnull Location location) {
|
||||
this.origin = location.toVector();
|
||||
@@ -643,6 +644,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -619,6 +620,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
public void onClientRemoval() {}
|
||||
|
||||
public void setPose(net.minecraft.world.entity.Pose pose) {
|
||||
@ -25,10 +25,10 @@ index 27d736d34c91c08782fa8fd60742e296580e08f2..73669ce44d3b62183f983365df5a46c1
|
||||
if (pose == this.getPose()) {
|
||||
return;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
index 96448895a0a18e6f819d0a2a629c04abd331fa85..d52b7c5739b8ea51cb91c45ddcad6237b9ce5a5e 100644
|
||||
index b5622c5bcc97ff9241d236a35018918db5b2103a..a8b9b50991361160880b9fc0a94cad30c319e62e 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
@@ -897,6 +897,20 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
@@ -899,6 +899,20 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
public boolean isSneaking() {
|
||||
return this.getHandle().isShiftKeyDown();
|
||||
}
|
@ -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
|
||||
index 5c9d3ce9c84fd86209023306ad15a9bcb1725b0d..30e0563ba54021bf8f2896bee8060e723ad84d48 100644
|
||||
index 9206806204862e7b50f5c520660a07bdd7604480..122244a37872a21fe0df5f6ab8f4cad941b59479 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -932,8 +932,17 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -935,8 +935,17 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
this.disconnect("Invalid hotbar selection (Hacking?)", org.bukkit.event.player.PlayerKickEvent.Cause.ILLEGAL_ACTION); // Paper - kick event cause
|
||||
return;
|
||||
}
|
||||
@ -28,7 +28,7 @@ index 5c9d3ce9c84fd86209023306ad15a9bcb1725b0d..30e0563ba54021bf8f2896bee8060e72
|
||||
this.player.connection.send(new ClientboundContainerSetSlotPacket(-2, 0, packet.getSlot(), this.player.getInventory().getItem(packet.getSlot())));
|
||||
this.player.connection.send(new ClientboundSetCarriedItemPacket(this.player.getInventory().selected));
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/player/Inventory.java b/src/main/java/net/minecraft/world/entity/player/Inventory.java
|
||||
index 2c20441cce1e07239a65aadfb85004fcdf3672c8..1e77482a98869e464c1f0a873cff8febf7924c8c 100644
|
||||
index 688ed0c32b05b0135b94ec05738cdc6ff8dcb677..a62e7354bf67a66bdf9cd7c8f5d2e8f6bcacc74f 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Inventory.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Inventory.java
|
||||
@@ -171,7 +171,13 @@ public class Inventory implements Container, Nameable {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Allow trident custom damage
|
||||
|
||||
|
||||
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 c75ac52f302e8e29e0bdea32c85ccf6713257a9b..3ff06cc6ad35567bcb1f29115db63c11a8e79dbb 100644
|
||||
index e45c3a9805d9fac1fabe6d891c817743acd9969e..cb71f468e90f076caf2c0dcc5f2ba2745c737c22 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/projectile/ThrownTrident.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/projectile/ThrownTrident.java
|
||||
@@ -35,10 +35,12 @@ public class ThrownTrident extends AbstractArrow {
|
||||
@@ -36,10 +36,12 @@ public class ThrownTrident extends AbstractArrow {
|
||||
|
||||
public ThrownTrident(EntityType<? extends ThrownTrident> type, Level world) {
|
||||
super(type, world);
|
||||
@ -16,17 +16,17 @@ index c75ac52f302e8e29e0bdea32c85ccf6713257a9b..3ff06cc6ad35567bcb1f29115db63c11
|
||||
}
|
||||
|
||||
public ThrownTrident(Level world, LivingEntity owner, ItemStack stack) {
|
||||
super(EntityType.TRIDENT, owner, world, stack);
|
||||
super(EntityType.TRIDENT, owner, world, stack, (ItemStack) null);
|
||||
+ this.setBaseDamage(net.minecraft.world.item.TridentItem.BASE_DAMAGE); // Paper - Allow trident custom damage
|
||||
this.entityData.set(ThrownTrident.ID_LOYALTY, (byte) EnchantmentHelper.getLoyalty(stack));
|
||||
this.entityData.set(ThrownTrident.ID_LOYALTY, this.getLoyaltyFromItem(stack));
|
||||
this.entityData.set(ThrownTrident.ID_FOIL, stack.hasFoil());
|
||||
}
|
||||
@@ -128,7 +130,7 @@ public class ThrownTrident extends AbstractArrow {
|
||||
@@ -129,7 +131,7 @@ public class ThrownTrident extends AbstractArrow {
|
||||
@Override
|
||||
protected void onHitEntity(EntityHitResult entityHitResult) {
|
||||
Entity entity = entityHitResult.getEntity();
|
||||
- float f = 8.0F;
|
||||
+ float f = (float) this.getBaseDamage(); // Paper - Allow trident custom damage
|
||||
|
||||
if (entity instanceof LivingEntity entityliving) {
|
||||
f += EnchantmentHelper.getDamageBonus(this.getPickupItemStackOrigin(), entityliving.getType());
|
||||
Entity entity1 = this.getOwner();
|
||||
DamageSource damagesource = this.damageSources().trident(this, (Entity) (entity1 == null ? this : entity1));
|
||||
Level world = this.level();
|
@ -14,10 +14,10 @@ ensure that the returned found structure (which may for example be a buried
|
||||
treasure that will be marked on a treasure map) is the same as in vanilla.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
|
||||
index c4972e5767488878f7929226258c41c1cc30a47f..c9cd18ce79a6ee7297a8fd14f4dbe712570b3ced 100644
|
||||
index 102de569415ef011dacdca9a6ea8134d0ef62454..29697fad32dad3377eebc82d280ba48d3c1ad516 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
|
||||
@@ -266,12 +266,15 @@ public abstract class ChunkGenerator {
|
||||
@@ -265,12 +265,15 @@ public abstract class ChunkGenerator {
|
||||
int i1 = placement.spacing();
|
||||
|
||||
for (int j1 = -radius; j1 <= radius; ++j1) {
|
@ -23,10 +23,10 @@ index 4d654c4f0b6210a9841427789ba70ce5d1d308be..9d93130f23addb18b97d7f5ec013faef
|
||||
public String getName() {
|
||||
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
|
||||
index 89268fc4a0570da27c53ad5f5a36cfbc1615c3fb..357255d58c2ec1e20828a544e5ae9f0927485cef 100644
|
||||
index 42c35d628744db8e715cf72c17803e2e1a94697b..de031ff4b976db173eae55294f598cad9c052df7 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -254,6 +254,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -256,6 +256,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
return this.server.getPlayer(this.getUniqueId()) != null;
|
||||
}
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Fix inventory desync
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index a79023c9e3265221e55cae1879f9c0052dafbef6..88ea8ed1b81ece6315bc8dcde04b5fa1bb6a7d04 100644
|
||||
index e16474c6c4a371070a81324037a441e6bafbb78e..d52b6fcaf59a798925c32076fc6ecd8ba822bf48 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -397,6 +397,7 @@ public class ServerPlayer extends Player {
|
||||
@@ -402,6 +402,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
|
||||
// Use method to resend items in hands in case of client desync, because the item use got cancelled.
|
||||
// For example, when cancelling the leash event
|
||||
@ -16,21 +16,6 @@ index a79023c9e3265221e55cae1879f9c0052dafbef6..88ea8ed1b81ece6315bc8dcde04b5fa1
|
||||
public void resendItemInHands() {
|
||||
this.containerMenu.findSlot(this.getInventory(), this.getInventory().selected).ifPresent(s -> {
|
||||
this.containerSynchronizer.sendSlotChange(this.containerMenu, s, this.getMainHandItem());
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
index 5b169de9c2a34044dcf46c613291ae56a83ad5d2..80f0831fbd78ece360fe5ea850146a61dbe8c23c 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
@@ -1466,8 +1466,9 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Targeti
|
||||
if (itemstack.is(Items.LEAD) && this.canBeLeashed(player)) {
|
||||
// CraftBukkit start - fire PlayerLeashEntityEvent
|
||||
if (CraftEventFactory.callPlayerLeashEntityEvent(this, player, player, hand).isCancelled()) {
|
||||
- ((ServerPlayer) player).resendItemInHands(); // SPIGOT-7615: Resend to fix client desync with used item
|
||||
+ // ((ServerPlayer) player).resendItemInHands(); // SPIGOT-7615: Resend to fix client desync with used item // Paper - handled below
|
||||
((ServerPlayer) player).connection.send(new ClientboundSetEntityLinkPacket(this, this.getLeashHolder()));
|
||||
+ player.containerMenu.sendAllDataToRemote(); // Paper - Fix inventory desync
|
||||
return InteractionResult.PASS;
|
||||
}
|
||||
// CraftBukkit end
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/Cow.java b/src/main/java/net/minecraft/world/entity/animal/Cow.java
|
||||
index 5a7b1be351834a6b8889b1380cede1be025cb302..e336934f37075a827843e4b1bb2b6b660d2c60c9 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/Cow.java
|
@ -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
|
||||
index 88ea8ed1b81ece6315bc8dcde04b5fa1bb6a7d04..9179434d490bc8546ba3a35434998b9fc916e6b2 100644
|
||||
index d52b6fcaf59a798925c32076fc6ecd8ba822bf48..82906acbaa7e34de7519f15559bf40772f0f6ff2 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -1618,12 +1618,17 @@ public class ServerPlayer extends Player {
|
||||
@@ -1659,12 +1659,17 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
this.nextContainerCounter();
|
||||
AbstractContainerMenu container = factory.createMenu(this.containerCounter, this.getInventory(), this);
|
||||
|
||||
@ -27,7 +27,7 @@ index 88ea8ed1b81ece6315bc8dcde04b5fa1bb6a7d04..9179434d490bc8546ba3a35434998b9f
|
||||
if (container == null && !cancelled) { // Let pre-cancelled events fall through
|
||||
// SPIGOT-5263 - close chest if cancelled
|
||||
if (factory instanceof Container) {
|
||||
@@ -1645,7 +1650,7 @@ public class ServerPlayer extends Player {
|
||||
@@ -1686,7 +1691,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
|
||||
} else {
|
||||
// CraftBukkit start
|
||||
this.containerMenu = container;
|
||||
@ -79,10 +79,10 @@ index 3d36d79a4e7f16f6face3465cdf54656984f3ebc..41f3cdec7deabf34358b8087df77169f
|
||||
if (!player.isImmobile()) player.connection.send(new ClientboundOpenScreenPacket(container.containerId, windowType, io.papermc.paper.adventure.PaperAdventure.asVanilla(adventure$title))); // Paper - Prevent opening inventories when frozen
|
||||
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
|
||||
index cdb5fd2642e7c5325f11633de8d58a5a8cdc2c77..64d4246b9d13e6fe8b638c4a6b664f87fc0e66a0 100644
|
||||
index 69e191d4394e1b22fdf4ba817cb2ec0ae3805414..70f5a07206453124e7069bb013184038b4def654 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -1381,10 +1381,21 @@ public class CraftEventFactory {
|
||||
@@ -1382,10 +1382,21 @@ public class CraftEventFactory {
|
||||
}
|
||||
|
||||
public static AbstractContainerMenu callInventoryOpenEvent(ServerPlayer player, AbstractContainerMenu container) {
|
||||
@ -105,7 +105,7 @@ index cdb5fd2642e7c5325f11633de8d58a5a8cdc2c77..64d4246b9d13e6fe8b638c4a6b664f87
|
||||
if (player.containerMenu != player.inventoryMenu) { // fire INVENTORY_CLOSE if one already open
|
||||
player.connection.handleContainerClose(new ServerboundContainerClosePacket(player.containerMenu.containerId), InventoryCloseEvent.Reason.OPEN_NEW); // Paper - Inventory close reason
|
||||
}
|
||||
@@ -1399,10 +1410,10 @@ public class CraftEventFactory {
|
||||
@@ -1400,10 +1411,10 @@ public class CraftEventFactory {
|
||||
|
||||
if (event.isCancelled()) {
|
||||
container.transferTo(player.containerMenu, craftPlayer);
|
||||
@ -117,4 +117,4 @@ index cdb5fd2642e7c5325f11633de8d58a5a8cdc2c77..64d4246b9d13e6fe8b638c4a6b664f87
|
||||
+ return com.mojang.datafixers.util.Pair.of(event.titleOverride(), container); // Paper - Add titleOverride to InventoryOpenEvent
|
||||
}
|
||||
|
||||
public static ItemStack callPreCraftEvent(Container matrix, Container resultInventory, ItemStack result, InventoryView lastCraftView, boolean isRepair) {
|
||||
public static ItemStack callPreCraftEvent(CraftingContainer matrix, Container resultInventory, ItemStack result, InventoryView lastCraftView, boolean isRepair) {
|
@ -4,24 +4,11 @@ Date: Mon, 11 Sep 2023 12:01:57 +1000
|
||||
Subject: [PATCH] Add slot sanity checks in container clicks
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/core/component/DataComponentPatch.java b/src/main/java/net/minecraft/core/component/DataComponentPatch.java
|
||||
index 2a00a2c8102a4a88edcfc8c680c3711efeb75b4a..33340e8ebe23a1a9ce587be34551fb929c41d0fd 100644
|
||||
--- a/src/main/java/net/minecraft/core/component/DataComponentPatch.java
|
||||
+++ b/src/main/java/net/minecraft/core/component/DataComponentPatch.java
|
||||
@@ -71,7 +71,7 @@ public final class DataComponentPatch {
|
||||
if (i == 0 && j == 0) {
|
||||
return DataComponentPatch.EMPTY;
|
||||
} else {
|
||||
- Reference2ObjectMap<DataComponentType<?>, Optional<?>> reference2objectmap = new Reference2ObjectArrayMap(i + j);
|
||||
+ Reference2ObjectMap<DataComponentType<?>, Optional<?>> reference2objectmap = new Reference2ObjectArrayMap(Math.min(i + j, 256)); // Paper - sensible initial size limit
|
||||
|
||||
DataComponentType datacomponenttype;
|
||||
int k;
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 30e0563ba54021bf8f2896bee8060e723ad84d48..e13097ceba283fdf165d7e6327fe78590252fe94 100644
|
||||
index 122244a37872a21fe0df5f6ab8f4cad941b59479..9e57d0b1222b7dd4b9dd1d9f82b4c2f7fc7bcc3c 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2970,6 +2970,12 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -2987,6 +2987,12 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
break;
|
||||
case SWAP:
|
||||
if ((packet.getButtonNum() >= 0 && packet.getButtonNum() < 9) || packet.getButtonNum() == 40) {
|
@ -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
|
||||
index e2d411fe3f8b00c18c2cfb8d11cd9b46e461fb1a..203f4dd2255cffdab468fe1ec869ce9b989cace1 100644
|
||||
index 5ff1e755301336a4e6ec6757510d0c595eacd7a6..f420989056c5c86c94333361f1733fd4b7488283 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/LecternBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/LecternBlock.java
|
||||
@@ -178,6 +178,16 @@ public class LecternBlock extends BaseEntityBlock {
|
||||
@@ -179,6 +179,16 @@ public class LecternBlock extends BaseEntityBlock {
|
||||
}
|
||||
|
||||
private static void changePowered(Level world, BlockPos pos, BlockState state, boolean powered) {
|
@ -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
|
||||
index 7c510d673253e53c1cebbe7af2aacbcaa59cb9de..776437ae42865baccab4fb5d3f2715c8f0519b8a 100644
|
||||
index 099b5364aa16afb4fb30ffca3e1bea8f52185150..0774711e3797c10526c65b7e5824a739c04597e7 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||
@@ -36,12 +36,19 @@ public final class CraftItemStack extends ItemStack {
|
@ -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
|
||||
index 80f0831fbd78ece360fe5ea850146a61dbe8c23c..5581fd6656fc13ea1d036d6caab2aba39c5320ac 100644
|
||||
index 3988782c51b9d517ec003185c7b64605249206e2..56873752ae1ae0d2a36cb171d2de6884e15c01a5 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
@@ -1153,19 +1153,26 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Targeti
|
||||
@@ -1104,19 +1104,26 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
|
||||
|
||||
@Override
|
||||
public void setItemSlot(EquipmentSlot slot, ItemStack stack) {
|
||||
@ -25,11 +25,11 @@ index 80f0831fbd78ece360fe5ea850146a61dbe8c23c..5581fd6656fc13ea1d036d6caab2aba3
|
||||
- this.onEquipItem(slot, (ItemStack) this.handItems.set(slot.getIndex(), stack), stack);
|
||||
+ this.onEquipItem(slot, (ItemStack) this.handItems.set(slot.getIndex(), stack), stack, silent); // Paper - Fix silent equipment change
|
||||
break;
|
||||
case ARMOR:
|
||||
case HUMANOID_ARMOR:
|
||||
- this.onEquipItem(slot, (ItemStack) this.armorItems.set(slot.getIndex(), stack), stack);
|
||||
+ this.onEquipItem(slot, (ItemStack) this.armorItems.set(slot.getIndex(), stack), stack, silent); // Paper - Fix silent equipment change
|
||||
break;
|
||||
case BODY:
|
||||
case ANIMAL_ARMOR:
|
||||
ItemStack itemstack1 = this.bodyArmorItem;
|
||||
|
||||
this.bodyArmorItem = stack;
|
||||
@ -39,10 +39,10 @@ index 80f0831fbd78ece360fe5ea850146a61dbe8c23c..5581fd6656fc13ea1d036d6caab2aba3
|
||||
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java b/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java
|
||||
index 87ada535362303097862e811d3d573997983064f..0c5fe46d2da113beff3e220843593d616e37d4ca 100644
|
||||
index 6627126ab02dbd5e9d1de6b186d75d850ef11280..3b5cf6ffb74d11bea5eb21bd66d679734ff5000c 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java
|
||||
@@ -250,8 +250,8 @@ public abstract class AbstractSkeleton extends Monster implements RangedAttackMo
|
||||
@@ -254,8 +254,8 @@ public abstract class AbstractSkeleton extends Monster implements RangedAttackMo
|
||||
// Paper end - shouldBurnInDay API
|
||||
|
||||
@Override
|
@ -8,7 +8,7 @@ disables saving any forced stats, so it stays at the same value (without enablin
|
||||
fixes stat initialization to not cause a NullPointerException
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/stats/ServerStatsCounter.java b/src/main/java/net/minecraft/stats/ServerStatsCounter.java
|
||||
index 9501e5f25f5c4d3069e554d4dc82b0e094156682..f890738d3bb9fb5e70a9d323c6cec97f9948f9cf 100644
|
||||
index ec437644adff6a6ec1e3fe2dd3a6354edafde1db..fb7342f7a5008a283c3400c6313c637de8210dfa 100644
|
||||
--- a/src/main/java/net/minecraft/stats/ServerStatsCounter.java
|
||||
+++ b/src/main/java/net/minecraft/stats/ServerStatsCounter.java
|
||||
@@ -48,13 +48,6 @@ public class ServerStatsCounter extends StatsCounter {
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add missing InventoryHolders to inventories
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/Container.java b/src/main/java/net/minecraft/world/Container.java
|
||||
index 39f126347459a68e8bcc59e374a1b9fe507b7497..f402dbbfe3a443e6bc51f88b85abe937852b52f0 100644
|
||||
index db41ffbd24adccd78edf3368ba1f7a3ab9f6072c..5db5ba026462ca642dcee718af732f80fadabef5 100644
|
||||
--- a/src/main/java/net/minecraft/world/Container.java
|
||||
+++ b/src/main/java/net/minecraft/world/Container.java
|
||||
@@ -103,7 +103,7 @@ public interface Container extends Clearable {
|
||||
@ -148,10 +148,10 @@ index 85e336637db8643fc5aca1dba724c9b341cbf46f..12b466ccb7c36021cf807c4f3fd2bcb0
|
||||
@Override
|
||||
public <T> Optional<T> evaluate(BiFunction<Level, BlockPos, T> getter) {
|
||||
diff --git a/src/main/java/net/minecraft/world/inventory/EnchantmentMenu.java b/src/main/java/net/minecraft/world/inventory/EnchantmentMenu.java
|
||||
index 18612988acaee570038bffd1361aa3ffdc938852..2f62957e061f513e01ec617f22791a7f27d65f02 100644
|
||||
index 6f88ce0076460215f5c1a965aa2bd7050071b611..c1b9c3ad2cccfa520e9d73b786142624ac5f3380 100644
|
||||
--- a/src/main/java/net/minecraft/world/inventory/EnchantmentMenu.java
|
||||
+++ b/src/main/java/net/minecraft/world/inventory/EnchantmentMenu.java
|
||||
@@ -60,7 +60,7 @@ public class EnchantmentMenu extends AbstractContainerMenu {
|
||||
@@ -66,7 +66,7 @@ public class EnchantmentMenu extends AbstractContainerMenu {
|
||||
|
||||
public EnchantmentMenu(int syncId, Inventory playerInventory, ContainerLevelAccess context) {
|
||||
super(MenuType.ENCHANTMENT, syncId);
|
||||
@ -161,10 +161,10 @@ index 18612988acaee570038bffd1361aa3ffdc938852..2f62957e061f513e01ec617f22791a7f
|
||||
public void setChanged() {
|
||||
super.setChanged();
|
||||
diff --git a/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java b/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java
|
||||
index ecf3cdc16d1ea830c4d45b57f69204118af3218a..db9444dda248260372d96ce239a590e88a4c1142 100644
|
||||
index 15ec798e149d80aace186f84b9236ddeaba690c3..1678f6c8b2c7db761783e53043169bf12bc2cb29 100644
|
||||
--- a/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java
|
||||
+++ b/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java
|
||||
@@ -59,8 +59,8 @@ public class GrindstoneMenu extends AbstractContainerMenu {
|
||||
@@ -60,8 +60,8 @@ public class GrindstoneMenu extends AbstractContainerMenu {
|
||||
|
||||
public GrindstoneMenu(int syncId, Inventory playerInventory, final ContainerLevelAccess context) {
|
||||
super(MenuType.GRINDSTONE, syncId);
|
||||
@ -261,10 +261,10 @@ index d4592218d761eb38402e3d95c642e80a708cb333..4c4266a85c38e41e6c7e6144a68624f4
|
||||
public ResultContainer() {
|
||||
this.itemStacks = NonNullList.withSize(1, ItemStack.EMPTY);
|
||||
diff --git a/src/main/java/net/minecraft/world/inventory/StonecutterMenu.java b/src/main/java/net/minecraft/world/inventory/StonecutterMenu.java
|
||||
index 1a5d8debc053b24e5856de916f1d248b36f645ba..eade15820dd9db38b6af2a5c4314acfb14ca03e9 100644
|
||||
index 977ccef3c9fa7685209f3eca894a3b69501ebcc1..5ddae1afab0a68465ea60395c84b0997ee994f88 100644
|
||||
--- a/src/main/java/net/minecraft/world/inventory/StonecutterMenu.java
|
||||
+++ b/src/main/java/net/minecraft/world/inventory/StonecutterMenu.java
|
||||
@@ -68,7 +68,7 @@ public class StonecutterMenu extends AbstractContainerMenu {
|
||||
@@ -69,7 +69,7 @@ public class StonecutterMenu extends AbstractContainerMenu {
|
||||
this.input = ItemStack.EMPTY;
|
||||
this.slotUpdateListener = () -> {
|
||||
};
|
||||
@ -273,7 +273,7 @@ index 1a5d8debc053b24e5856de916f1d248b36f645ba..eade15820dd9db38b6af2a5c4314acfb
|
||||
@Override
|
||||
public void setChanged() {
|
||||
super.setChanged();
|
||||
@@ -83,7 +83,7 @@ public class StonecutterMenu extends AbstractContainerMenu {
|
||||
@@ -84,7 +84,7 @@ public class StonecutterMenu extends AbstractContainerMenu {
|
||||
}
|
||||
// CraftBukkit end
|
||||
};
|
@ -10,10 +10,10 @@ which would cause a crash on Folia but would appear to function
|
||||
fine on Paper.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
|
||||
index 2ca1f01ab59000949cbde1766c9811a72dbfb4ff..88f0aca2da0e14ed5ec0513944fa0ba28b73b5d1 100644
|
||||
index 5e1a68e3a920aab10a459b9b54f6abd59e7855e0..d42585bccb03f8ee1be5e37cfbe8520af4cc5454 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
|
||||
@@ -301,6 +301,13 @@ public class ChunkSerializer {
|
||||
@@ -303,6 +303,13 @@ public class ChunkSerializer {
|
||||
for (int k1 = 0; k1 < nbttaglist3.size(); ++k1) {
|
||||
CompoundTag nbttagcompound4 = nbttaglist3.getCompound(k1);
|
||||
|
||||
@ -27,7 +27,7 @@ index 2ca1f01ab59000949cbde1766c9811a72dbfb4ff..88f0aca2da0e14ed5ec0513944fa0ba2
|
||||
((ChunkAccess) object1).setBlockEntityNbt(nbttagcompound4);
|
||||
}
|
||||
|
||||
@@ -505,10 +512,19 @@ public class ChunkSerializer {
|
||||
@@ -507,10 +514,19 @@ public class ChunkSerializer {
|
||||
CompoundTag nbttagcompound1 = nbttaglist1.getCompound(i);
|
||||
boolean flag = nbttagcompound1.getBoolean("keepPacked");
|
||||
|
@ -7,10 +7,10 @@ Subject: [PATCH] Fix missing map initialize event call
|
||||
public net.minecraft.world.level.storage.DimensionDataStorage readSavedData(Ljava/util/function/Function;Lnet/minecraft/util/datafix/DataFixTypes;Ljava/lang/String;)Lnet/minecraft/world/level/saveddata/SavedData;
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 055fcf3d51852ca466c7189f36382e0b0d0d86d2..2da315d288efa66f7bff96923ebd5eac5130ba39 100644
|
||||
index 6e9a3b6a1595a1731ca8187d2610c840337a12ed..8b5eabea1a0926c22b58ef8761caee3a06aa5ee0 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1664,13 +1664,24 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1662,13 +1662,24 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@Nullable
|
||||
@Override
|
||||
public MapItemSavedData getMapData(MapId id) {
|
@ -5,7 +5,7 @@ Subject: [PATCH] Fix UnsafeValues#loadAdvancement
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
index 256fdd08a7653d1dc93cd13a976cd114253aa945..b5abf9c7e5e09c670ae2435c23587e0482fbe917 100644
|
||||
index a98fcfcf71b2a072d60120046d9aac9ad4546196..17caf21e23aa7f5a5216923e73aae94a59bcac44 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
@@ -322,9 +322,30 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
@ -6,10 +6,10 @@ Subject: [PATCH] Add player idle duration API
|
||||
Implements API for getting and resetting a player's idle duration.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 357255d58c2ec1e20828a544e5ae9f0927485cef..af14b09630af4a092491e6b9a7b3f418cc82c0de 100644
|
||||
index de031ff4b976db173eae55294f598cad9c052df7..1deaaf99d09cd46bcc4d609e6015cc1a288d5029 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -3400,6 +3400,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -3413,6 +3413,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
}
|
||||
// Paper end
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Don't check if we can see non-visible entities
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
index e7994d0f45b186938dd5606284290f56f110d7ed..027f2734b0ff226437f4c94430215929b6ea2219 100644
|
||||
index 38df456d3646c384d17ae9aec60c18fcd0651b4b..cf4517e57169856acd0782e5ced4eb8c045b8d78 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -1765,7 +1765,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -1604,7 +1604,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
// Paper end - Configurable entity tracking range by Y
|
||||
|
||||
// CraftBukkit start - respect vanish API
|
@ -5,10 +5,10 @@ Subject: [PATCH] Fix NPE in SculkBloomEvent world access
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/SculkCatalystBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/SculkCatalystBlockEntity.java
|
||||
index faa708976469263093b673d756ac5570f3680236..81dd0aa6a90fd9dda9e7752f85b9cf4568e3b575 100644
|
||||
index 8d95d129cae03af9ded699047742324807186994..a74732902c0494c67e6acf2fc04581ff9c46b832 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/SculkCatalystBlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/SculkCatalystBlockEntity.java
|
||||
@@ -34,9 +34,16 @@ public class SculkCatalystBlockEntity extends BlockEntity implements GameEventLi
|
||||
@@ -35,9 +35,16 @@ public class SculkCatalystBlockEntity extends BlockEntity implements GameEventLi
|
||||
public SculkCatalystBlockEntity(BlockPos pos, BlockState state) {
|
||||
super(BlockEntityType.SCULK_CATALYST, pos, state);
|
||||
this.catalystListener = new SculkCatalystBlockEntity.CatalystListener(state, new BlockPositionSource(pos));
|
||||
@ -26,7 +26,7 @@ index faa708976469263093b673d756ac5570f3680236..81dd0aa6a90fd9dda9e7752f85b9cf45
|
||||
public static void serverTick(Level world, BlockPos pos, BlockState state, SculkCatalystBlockEntity blockEntity) {
|
||||
org.bukkit.craftbukkit.event.CraftEventFactory.sourceBlockOverride = blockEntity.getBlockPos(); // CraftBukkit - SPIGOT-7068: Add source block override, not the most elegant way but better than passing down a BlockPosition up to five methods deep.
|
||||
blockEntity.catalystListener.getSculkSpreader().updateCursors(world, pos, world.getRandom(), true);
|
||||
@@ -66,13 +73,12 @@ public class SculkCatalystBlockEntity extends BlockEntity implements GameEventLi
|
||||
@@ -67,13 +74,12 @@ public class SculkCatalystBlockEntity extends BlockEntity implements GameEventLi
|
||||
final SculkSpreader sculkSpreader;
|
||||
private final BlockState blockState;
|
||||
private final PositionSource positionSource;
|
@ -5,10 +5,10 @@ Subject: [PATCH] Allow null itemstack for Player#sendEquipmentChange
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index af14b09630af4a092491e6b9a7b3f418cc82c0de..e9bd24861bca4554898306117bb533d19171cedf 100644
|
||||
index 1deaaf99d09cd46bcc4d609e6015cc1a288d5029..0865e088357757a253f73b492b43b6075b237e4f 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -1125,7 +1125,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -1127,7 +1127,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
|
||||
@Override
|
||||
public void sendEquipmentChange(LivingEntity entity, EquipmentSlot slot, ItemStack item) {
|
@ -47,7 +47,7 @@ index c978f3b2d42f512e982f289e76c2422e41b7eec6..bb8e962e63c7a2d931f9bd7f7c002aa3
|
||||
Vec3 vec3d = raytrace1.getFrom().subtract(raytrace1.getTo());
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index f371e76215a789f84eb5086a3d08bcf6e4e02dd8..7732d838ef33936b6728042f8d6be49b500e6dd2 100644
|
||||
index 8708f0df623e82074ecf858c8d1389b33ded07a1..a9e4b6fb0f93e65b1a309abb5911b1b72d521f23 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -1161,9 +1161,15 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
@ -6,10 +6,10 @@ Subject: [PATCH] Broadcast take item packets with collector as source
|
||||
This fixes players (which can't view the collector) seeing item pickups with themselves as the target.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index d314d5f9f66a86376d66cd607e3545c5d95fd12e..844da8d55e43607239b54c7cb823cf26f2b04ed1 100644
|
||||
index 54bb93eae61ed223a9287671f5d47d978170824f..a4940a6dccb6937a2461d7b34a9250c2699083e3 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -3698,7 +3698,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -3720,7 +3720,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
|
||||
public void take(Entity item, int count) {
|
||||
if (!item.isRemoved() && !this.level().isClientSide && (item instanceof ItemEntity || item instanceof AbstractArrow || item instanceof ExperienceOrb)) {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Expand LingeringPotion API
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/projectile/ThrownPotion.java b/src/main/java/net/minecraft/world/entity/projectile/ThrownPotion.java
|
||||
index d8ac724d01d81b8c52f8e05451212ac1cd775c0b..c64e0d623124ad9116cb6c5c7c3320fad7cc1aa3 100644
|
||||
index 5c6cb752f61c3f3c2960a337173fb7dfe86cc1d3..86c4b593a97431efd062b8c9d86bf92269c00536 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/projectile/ThrownPotion.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/projectile/ThrownPotion.java
|
||||
@@ -272,7 +272,7 @@ public class ThrownPotion extends ThrowableItemProjectile implements ItemSupplie
|
||||
@@ -274,7 +274,7 @@ public class ThrownPotion extends ThrowableItemProjectile implements ItemSupplie
|
||||
boolean noEffects = potioncontents.hasEffects(); // Paper - Fix potions splash events
|
||||
// CraftBukkit start
|
||||
org.bukkit.event.entity.LingeringPotionSplashEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callLingeringPotionSplashEvent(this, position, entityareaeffectcloud);
|
@ -45,7 +45,7 @@ index 0471d9c85af02133f99cca4e181b83b58a3f1abc..4f701788bd21b61cad251a3a88f9bc41
|
||||
BlockState iblockdata = BaseFireBlock.getState(this.level(), blockposition);
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 7732d838ef33936b6728042f8d6be49b500e6dd2..8b4b4017f9874a153c27a96a7df1a966c5bdf4f3 100644
|
||||
index a9e4b6fb0f93e65b1a309abb5911b1b72d521f23..d6cdbe44cfddecc2a28c28892431aaa45f73cb8a 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -793,7 +793,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add hand to fish event for all player interactions
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
|
||||
index e603307871b623ce437f4b1b68ab306fbdd9919d..9962d50ea342cd47428a814519b2d54f547753a4 100644
|
||||
index e70ca1b2e6fbbc1f20e65429298d01b4ebd2dd29..270f4c94912b16c7d4a2d62670847cbb5e011819 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
|
||||
@@ -481,7 +481,15 @@ public class FishingHook extends Projectile {
|
||||
@@ -482,7 +482,15 @@ public class FishingHook extends Projectile {
|
||||
@Override
|
||||
public void readAdditionalSaveData(CompoundTag nbt) {}
|
||||
|
||||
@ -24,7 +24,7 @@ index e603307871b623ce437f4b1b68ab306fbdd9919d..9962d50ea342cd47428a814519b2d54f
|
||||
net.minecraft.world.entity.player.Player entityhuman = this.getPlayerOwner();
|
||||
|
||||
if (!this.level().isClientSide && entityhuman != null && !this.shouldStopFishing(entityhuman)) {
|
||||
@@ -489,7 +497,7 @@ public class FishingHook extends Projectile {
|
||||
@@ -490,7 +498,7 @@ public class FishingHook extends Projectile {
|
||||
|
||||
if (this.hookedIn != null) {
|
||||
// CraftBukkit start
|
||||
@ -33,7 +33,7 @@ index e603307871b623ce437f4b1b68ab306fbdd9919d..9962d50ea342cd47428a814519b2d54f
|
||||
this.level().getCraftServer().getPluginManager().callEvent(playerFishEvent);
|
||||
|
||||
if (playerFishEvent.isCancelled()) {
|
||||
@@ -518,7 +526,7 @@ public class FishingHook extends Projectile {
|
||||
@@ -519,7 +527,7 @@ public class FishingHook extends Projectile {
|
||||
}
|
||||
// Paper end
|
||||
// CraftBukkit start
|
||||
@ -42,7 +42,7 @@ index e603307871b623ce437f4b1b68ab306fbdd9919d..9962d50ea342cd47428a814519b2d54f
|
||||
playerFishEvent.setExpToDrop(this.random.nextInt(6) + 1);
|
||||
this.level().getCraftServer().getPluginManager().callEvent(playerFishEvent);
|
||||
|
||||
@@ -552,7 +560,7 @@ public class FishingHook extends Projectile {
|
||||
@@ -553,7 +561,7 @@ public class FishingHook extends Projectile {
|
||||
|
||||
if (this.onGround()) {
|
||||
// CraftBukkit start
|
||||
@ -51,7 +51,7 @@ index e603307871b623ce437f4b1b68ab306fbdd9919d..9962d50ea342cd47428a814519b2d54f
|
||||
this.level().getCraftServer().getPluginManager().callEvent(playerFishEvent);
|
||||
|
||||
if (playerFishEvent.isCancelled()) {
|
||||
@@ -563,7 +571,7 @@ public class FishingHook extends Projectile {
|
||||
@@ -564,7 +572,7 @@ public class FishingHook extends Projectile {
|
||||
}
|
||||
// CraftBukkit start
|
||||
if (i == 0) {
|
||||
@ -61,15 +61,15 @@ index e603307871b623ce437f4b1b68ab306fbdd9919d..9962d50ea342cd47428a814519b2d54f
|
||||
if (playerFishEvent.isCancelled()) {
|
||||
return 0;
|
||||
diff --git a/src/main/java/net/minecraft/world/item/FishingRodItem.java b/src/main/java/net/minecraft/world/item/FishingRodItem.java
|
||||
index 87e1f74c3d37c9dd23350c9cbc190252e8cb88cd..fd71efd124e54168e6f9b35b1a5ab836141ab2d2 100644
|
||||
index 364c3090057405f83130089d275baf1a61d8e0ca..efb21967fdd2c3b4cb35db6faf213d55da5fc30e 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/FishingRodItem.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/FishingRodItem.java
|
||||
@@ -30,7 +30,7 @@ public class FishingRodItem extends Item {
|
||||
|
||||
if (user.fishing != null) {
|
||||
if (!world.isClientSide) {
|
||||
- i = user.fishing.retrieve(itemstack);
|
||||
+ i = user.fishing.retrieve(hand, itemstack); // Paper - Add hand parameter to PlayerFishEvent
|
||||
- int i = user.fishing.retrieve(itemstack);
|
||||
+ int i = user.fishing.retrieve(hand, itemstack); // Paper - Add hand parameter to PlayerFishEvent
|
||||
|
||||
itemstack.hurtAndBreak(i, user, LivingEntity.getSlotForHand(hand));
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ also changed. Also in several places, the breed item was stored after
|
||||
it was decreased by one to consume the item.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/Animal.java b/src/main/java/net/minecraft/world/entity/animal/Animal.java
|
||||
index 3bd13c9b8c7573726ae7defdc3c0f32876d1cf1f..5193cf1d3c922d750a11e492b7636215e23ad0d6 100644
|
||||
index 370c444153d04fe7896952219604d83a19a996e2..e96fca314bebea5fcdb684d3478af1b6dc5f13cf 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/Animal.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/Animal.java
|
||||
@@ -147,8 +147,9 @@ public abstract class Animal extends AgeableMob {
|
||||
@ -54,10 +54,10 @@ index 3bd13c9b8c7573726ae7defdc3c0f32876d1cf1f..5193cf1d3c922d750a11e492b7636215
|
||||
this.level().broadcastEntityEvent(this, (byte) 18);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/Panda.java b/src/main/java/net/minecraft/world/entity/animal/Panda.java
|
||||
index 0440fd2d1bb3f87641ad88de6d5ae64617536a6d..db60b91c2b26ca8cdb66e05deab7742ffe212767 100644
|
||||
index 293d6891948e99ac9bd741008f7dcbc5fc1a2e3d..e108f876d3f129c6287f13d68427aed2a6f0c5b1 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/Panda.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/Panda.java
|
||||
@@ -668,8 +668,9 @@ public class Panda extends Animal {
|
||||
@@ -673,8 +673,9 @@ public class Panda extends Animal {
|
||||
this.usePlayerItem(player, hand, itemstack);
|
||||
this.ageUp((int) ((float) (-this.getAge() / 20) * 0.1F), true);
|
||||
} else if (!this.level().isClientSide && this.getAge() == 0 && this.canFallInLove()) {
|
||||
@ -69,10 +69,10 @@ index 0440fd2d1bb3f87641ad88de6d5ae64617536a6d..db60b91c2b26ca8cdb66e05deab7742f
|
||||
if (this.level().isClientSide || this.isSitting() || this.isInWater()) {
|
||||
return InteractionResult.PASS;
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/armadillo/Armadillo.java b/src/main/java/net/minecraft/world/entity/animal/armadillo/Armadillo.java
|
||||
index 4e38bed2a450e90a416bfc03e4231b95f67133ea..b38281f963377cc82b360e8457da7cad033b8c36 100644
|
||||
index 38bb6e627c5500923103c3c9552eddcc63257a1d..792d9039ac0561464c666977ff8308e4c629e5eb 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/armadillo/Armadillo.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/armadillo/Armadillo.java
|
||||
@@ -351,8 +351,8 @@ public class Armadillo extends Animal {
|
||||
@@ -348,8 +348,8 @@ public class Armadillo extends Animal {
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -84,10 +84,10 @@ index 4e38bed2a450e90a416bfc03e4231b95f67133ea..b38281f963377cc82b360e8457da7cad
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java b/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java
|
||||
index 8ebe18a1abbac81094e6aab19ba76edc0255e3b7..4eb26874f21726bbc6e6ad78bfaf4ecd268c7246 100644
|
||||
index 71c1bc87ab5942fa07f187fa44089c08b5804e91..147974651d37e81d81ca97bfa31c9df9867492be 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java
|
||||
@@ -389,7 +389,7 @@ public class Camel extends AbstractHorse implements PlayerRideableJumping, Saddl
|
||||
@@ -390,7 +390,7 @@ public class Camel extends AbstractHorse implements PlayerRideableJumping, Saddl
|
||||
boolean flag1 = this.isTamed() && this.getAge() == 0 && this.canFallInLove();
|
||||
|
||||
if (flag1) {
|
||||
@ -97,10 +97,10 @@ index 8ebe18a1abbac81094e6aab19ba76edc0255e3b7..4eb26874f21726bbc6e6ad78bfaf4ecd
|
||||
|
||||
boolean flag2 = this.isBaby();
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java b/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java
|
||||
index 8cae4e154ca07493aba9acadd4ff7150d7ae4f67..9357cf0179d19fbdfe76413e909a99b924c85780 100644
|
||||
index f1e43254936feedfe0ffbf77071505f3a65e5053..1f5ed236fb7c0c1b0181675747d25d233f534284 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java
|
||||
@@ -571,7 +571,7 @@ public abstract class AbstractHorse extends Animal implements ContainerListener,
|
||||
@@ -572,7 +572,7 @@ public abstract class AbstractHorse extends Animal implements ContainerListener,
|
||||
b0 = 5;
|
||||
if (!this.level().isClientSide && this.isTamed() && this.getAge() == 0 && !this.isInLove()) {
|
||||
flag = true;
|
||||
@ -109,7 +109,7 @@ index 8cae4e154ca07493aba9acadd4ff7150d7ae4f67..9357cf0179d19fbdfe76413e909a99b9
|
||||
}
|
||||
} else if (item.is(Items.GOLDEN_APPLE) || item.is(Items.ENCHANTED_GOLDEN_APPLE)) {
|
||||
f = 10.0F;
|
||||
@@ -579,7 +579,7 @@ public abstract class AbstractHorse extends Animal implements ContainerListener,
|
||||
@@ -580,7 +580,7 @@ public abstract class AbstractHorse extends Animal implements ContainerListener,
|
||||
b0 = 10;
|
||||
if (!this.level().isClientSide && this.isTamed() && this.getAge() == 0 && !this.isInLove()) {
|
||||
flag = true;
|
||||
@ -119,10 +119,10 @@ index 8cae4e154ca07493aba9acadd4ff7150d7ae4f67..9357cf0179d19fbdfe76413e909a99b9
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/horse/Llama.java b/src/main/java/net/minecraft/world/entity/animal/horse/Llama.java
|
||||
index 724c4c8493a4b167911dd526ed8662ab4f9b2b66..36d654073ab4058db54830d9447d7d959a0b25f1 100644
|
||||
index 82c57124433cc033c99e609e8ad71e03d340bc5e..cf6a3a63b6f2b96943c0f399e8c82d293fee31ba 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/horse/Llama.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/horse/Llama.java
|
||||
@@ -184,7 +184,7 @@ public class Llama extends AbstractChestedHorse implements VariantHolder<Llama.V
|
||||
@@ -179,7 +179,7 @@ public class Llama extends AbstractChestedHorse implements VariantHolder<Llama.V
|
||||
f = 10.0F;
|
||||
if (this.isTamed() && this.getAge() == 0 && this.canFallInLove()) {
|
||||
flag = true;
|
@ -29,10 +29,10 @@ index 52439f4b959c74027eb191a3af960c70beb978e8..a2c057d92ea34368c7efc538b6e5b15e
|
||||
public void addModifier(AttributeModifier modifier) {
|
||||
throw new UnsupportedOperationException("Cannot modify default attributes");
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/attribute/CraftAttributeInstance.java b/src/main/java/org/bukkit/craftbukkit/attribute/CraftAttributeInstance.java
|
||||
index 7d16545665f74ce619f7b18e568226642c84ceee..c8dffec6e4524a6b02dd068429e4b12f256d1741 100644
|
||||
index cd6a492f56b3dee5985c068e20009b6c833e143b..64cef8aaecbc96bdcebd461feb72cdd5398492f7 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/attribute/CraftAttributeInstance.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/attribute/CraftAttributeInstance.java
|
||||
@@ -44,6 +44,21 @@ public class CraftAttributeInstance implements AttributeInstance {
|
||||
@@ -45,6 +45,21 @@ public class CraftAttributeInstance implements AttributeInstance {
|
||||
return result;
|
||||
}
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Fix missing event call for entity teleport API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
index d52b7c5739b8ea51cb91c45ddcad6237b9ce5a5e..3ab04c4bdbe26ff7f6f54eb9cdd58376c592fa05 100644
|
||||
index a8b9b50991361160880b9fc0a94cad30c319e62e..b8eb9166e44da8745a056bf68f2f9316ce25d7a7 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
@@ -256,6 +256,17 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
@@ -258,6 +258,17 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
return false;
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user