13
0
geforkt von Mirrors/Paper

more more more more more more more more more more more work: passing the torch

Dieser Commit ist enthalten in:
Noah van der Aa 2023-09-22 17:51:48 +02:00
Ursprung 3aa8e7ef3f
Commit ac7e4ad35e
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 547D90BC6FF753CF
54 geänderte Dateien mit 228 neuen und 236 gelöschten Zeilen

Datei anzeigen

@ -72,7 +72,7 @@ public net/minecraft/world/entity/Mob leashInfoTag
Co-authored-by: William Blake Galbreath <blake.galbreath@gmail.com>
diff --git a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
index f651d866355557d10d4bb8730e0aceac483d3ba7..f2500cbe0aecf4959921a56c88a8947839a9b0e4 100644
index b5ea499b78970ec1575893e3b52900bf34feb3ec..e9db6b5096e7368b4a32a0e86eebccac15ab443b 100644
--- a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
+++ b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
@@ -351,7 +351,7 @@ public interface DispenseItemBehavior {
@ -111,10 +111,10 @@ index 6cd6d69a20e95e344fc18ab67dc300824537a59b..2e2a7c2cf3081187da817479a9da3eb1
}
}
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
index 153b82e4a3134ff0e40f267f1a005bc9184785ef..1337abd1ad70fb67d1ebba0fc0245470c988f7c5 100644
index 567f264ec20dd9657f5618aeaafcfdf40680675f..a04cf2cb736dc327f063a5ce035af5817657b052 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -1003,7 +1003,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -1331,7 +1331,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
}
// Paper end
@ -124,10 +124,10 @@ index 153b82e4a3134ff0e40f267f1a005bc9184785ef..1337abd1ad70fb67d1ebba0fc0245470
return this.anyPlayerCloseEnoughForSpawning(pos, false);
}
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 06df21e55fdb70558b85fc095a04b3bb64fbe770..c6a7aace64785f76792b03be08fb69e4cb93d1b3 100644
index 565b5aca5854876ae640d9d93b3ae24da6e12b70..eeec2311c157df3347f291ff1502370d3dc194b6 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -1091,7 +1091,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -771,7 +771,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
} else {
AABB axisalignedbb = (new AABB(blockposition1, new BlockPos(blockposition1.getX(), this.getMaxBuildHeight(), blockposition1.getZ()))).inflate(3.0D);
List<LivingEntity> list = this.getEntitiesOfClass(LivingEntity.class, axisalignedbb, (entityliving) -> {
@ -137,7 +137,7 @@ index 06df21e55fdb70558b85fc095a04b3bb64fbe770..c6a7aace64785f76792b03be08fb69e4
if (!list.isEmpty()) {
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
index 6cc9c28032cafd15d884223a01208ce6f027c151..14bbc86bbaad49b2af16f3b171eb667c28eda702 100644
index 73e2948210139e40e234b5e2107f9008f3094964..fb7a401269a2ebfc998c14e1957dfd580d444c06 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
@@ -92,7 +92,7 @@ public class ServerPlayerGameMode {
@ -242,10 +242,10 @@ index 19540fd4a7f992888fadb6501d0c8a5a7e71fcf6..e241ae250f4f04a17ef2c583d00b065a
public void start() {
this.creeper.getNavigation().stop();
diff --git a/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java b/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java
index c7b914cc0d702c6dd04add5247ec509d5870abb3..247aca0b612f5079a0596350e8311c385df8ab1c 100644
index 363892e0c26bab89d2abaa44d8736e2fd84d292f..111a244087e24f25ba8524a46a228da10cd9498a 100644
--- a/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java
+++ b/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java
@@ -237,9 +237,10 @@ public class Goat extends Animal {
@@ -239,9 +239,10 @@ public class Goat extends Animal {
player.setItemInHand(hand, itemstack1);
return InteractionResult.sidedSuccess(this.level().isClientSide);
} else {
@ -258,10 +258,10 @@ index c7b914cc0d702c6dd04add5247ec509d5870abb3..247aca0b612f5079a0596350e8311c38
}
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 6bab94ac458081e9ed6e1999a9a3f884dd710604..49d7109b6ca63c8073db777549a65b2fcb70967e 100644
index a974b57dfb007d14194c566421216003ffb0c5d6..09e9c0e55c789f03a4b64136f28154bd114db6f5 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
@@ -250,7 +250,13 @@ public abstract class AbstractHorse extends Animal implements ContainerListener,
@@ -252,7 +252,13 @@ public abstract class AbstractHorse extends Animal implements ContainerListener,
@Override
public void equipSaddle(@Nullable SoundSource sound) {
@ -323,10 +323,10 @@ index f174094febfdfdc309f1b50877be60bae8a98156..5f407535298a31a34cfe114dd863fd6a
return 1;
}
diff --git a/src/main/java/net/minecraft/world/entity/raid/Raids.java b/src/main/java/net/minecraft/world/entity/raid/Raids.java
index 380afb885e85e4cf80e746d217033345a7514443..41457c9f27b18fa2734a6cca297ec5186470e82f 100644
index 4a0f4c83228187a2082ad029680056b1801f77bd..31831811ce16265e9828fa34d9e67d8ac195d723 100644
--- a/src/main/java/net/minecraft/world/entity/raid/Raids.java
+++ b/src/main/java/net/minecraft/world/entity/raid/Raids.java
@@ -125,7 +125,7 @@ public class Raids extends SavedData {
@@ -134,7 +134,7 @@ public class Raids extends SavedData {
// CraftBukkit end
} else {
player.removeEffect(MobEffects.BAD_OMEN);
@ -335,7 +335,7 @@ index 380afb885e85e4cf80e746d217033345a7514443..41457c9f27b18fa2734a6cca297ec518
}
if (flag) {
@@ -140,7 +140,7 @@ public class Raids extends SavedData {
@@ -149,7 +149,7 @@ public class Raids extends SavedData {
}
// CraftBukkit end
raid.absorbBadOmen(player);
@ -345,10 +345,10 @@ index 380afb885e85e4cf80e746d217033345a7514443..41457c9f27b18fa2734a6cca297ec518
player.awardStat(Stats.RAID_TRIGGER);
CriteriaTriggers.BAD_OMEN.trigger(player);
diff --git a/src/main/java/net/minecraft/world/inventory/BeaconMenu.java b/src/main/java/net/minecraft/world/inventory/BeaconMenu.java
index 335d0a85378c04dd466fafd42048b2474c815cb9..f984af71fc034e09147fa339bd5f260a7466e127 100644
index 685c35419de7e3c4e854a28118a243e65250ef59..0b1a0be964d799f1706c273092dc653fa04e8014 100644
--- a/src/main/java/net/minecraft/world/inventory/BeaconMenu.java
+++ b/src/main/java/net/minecraft/world/inventory/BeaconMenu.java
@@ -167,6 +167,11 @@ public class BeaconMenu extends AbstractContainerMenu {
@@ -178,6 +178,11 @@ public class BeaconMenu extends AbstractContainerMenu {
// Paper end
public void updateEffects(Optional<MobEffect> primary, Optional<MobEffect> secondary) {
@ -383,12 +383,12 @@ index 10b0720ce7eed58fa3cd8c8051efa6225f7d73e1..ac0bc87f60c4e1562d1301522183e449
} else {
ListTag listTag = compoundTag.getList("Items", 10);
diff --git a/src/main/java/net/minecraft/world/item/SaddleItem.java b/src/main/java/net/minecraft/world/item/SaddleItem.java
index 11e8f2bf261abcb75d4dd011702c8f396e9f5be4..7234010d81078d357ab9bca422e44864a9e269bb 100644
index ca6a2b9840c9ade87ec8effab01d4f184fe876b7..43129ecefcc8beccbcf2978f262b1ce8cf49ca43 100644
--- a/src/main/java/net/minecraft/world/item/SaddleItem.java
+++ b/src/main/java/net/minecraft/world/item/SaddleItem.java
@@ -18,7 +18,7 @@ public class SaddleItem extends Item {
if (entity instanceof Saddleable saddleable && entity.isAlive()) {
if (!saddleable.isSaddled() && saddleable.isSaddleable()) {
if (entity instanceof Saddleable saddleable) {
if (entity.isAlive() && !saddleable.isSaddled() && saddleable.isSaddleable()) {
if (!user.level().isClientSide) {
- saddleable.equipSaddle(SoundSource.NEUTRAL);
+ saddleable.equipSaddle(SoundSource.NEUTRAL, stack.copyWithCount(1)); // Paper - Fix saddles losing nbt data - MC-191591
@ -396,7 +396,7 @@ index 11e8f2bf261abcb75d4dd011702c8f396e9f5be4..7234010d81078d357ab9bca422e44864
stack.shrink(1);
}
diff --git a/src/main/java/net/minecraft/world/level/block/AzaleaBlock.java b/src/main/java/net/minecraft/world/level/block/AzaleaBlock.java
index 023ed8441d629629828051b4098b09b06ce51a75..95b53450a807fccfa55b59852da52785b8cf3e3d 100644
index eba153ad0025d92ffb5d8de65f69a8e812b81533..087f3b3cc180e16195efdc0b402701fd9f5d78b4 100644
--- a/src/main/java/net/minecraft/world/level/block/AzaleaBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/AzaleaBlock.java
@@ -45,4 +45,11 @@ public class AzaleaBlock extends BushBlock implements BonemealableBlock {
@ -425,7 +425,7 @@ index 2932419b7ca3f066b1db329829af36ba31e17c65..e11eced0bf15dfecaf64f5e1c28e973c
return;
}
diff --git a/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
index 436290eaa0dab05a642b67b265117dbe5eceb8b7..5ccc419b904aec590c5624438da61ca6724b20d6 100644
index 6e0969f780df2f75b468fb4969e10d6aecf4ec62..18cb88ce3d3d0999772f361d66b0c9c3f7cbac85 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
@@ -674,13 +674,10 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit
@ -447,10 +447,10 @@ index 436290eaa0dab05a642b67b265117dbe5eceb8b7..5ccc419b904aec590c5624438da61ca6
}
}
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 147e808c7e2b3ed16861c989c1ba4a0b99a5be38..2b3bb4513557e8d81bf2b0a3e10c34cec6a6d43e 100644
index ca91b82a21a46b1a62564b5157882a845eae8737..db38c178543e221251ae8c6ad618ad9372af7f40 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
@@ -282,7 +282,11 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name
@@ -291,7 +291,11 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name
org.bukkit.block.Block block = org.bukkit.craftbukkit.block.CraftBlock.at(level, worldPosition);
new io.papermc.paper.event.block.BeaconDeactivatedEvent(block).callEvent();
// Paper end

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Remove unnecessary onTrackingStart during navigation warning
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index c6a7aace64785f76792b03be08fb69e4cb93d1b3..5bdae591d344fc9b72ffcc1a44fb5e495b1e6bb2 100644
index eeec2311c157df3347f291ff1502370d3dc194b6..89ac71cd9305b21e78abbc31a3f2319eae636cfb 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -2683,7 +2683,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -2310,7 +2310,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
if (entity instanceof Mob) {
Mob entityinsentient = (Mob) entity;
@ -17,7 +17,7 @@ index c6a7aace64785f76792b03be08fb69e4cb93d1b3..5bdae591d344fc9b72ffcc1a44fb5e49
String s = "onTrackingStart called during navigation iteration";
Util.logAndPauseIfInIde("onTrackingStart called during navigation iteration", new IllegalStateException("onTrackingStart called during navigation iteration"));
@@ -2768,7 +2768,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -2395,7 +2395,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
if (entity instanceof Mob) {
Mob entityinsentient = (Mob) entity;

Datei anzeigen

@ -7,7 +7,7 @@ Upstream didn't modify the isLovedItem check in wantsToPickup
so piglins never actually tried to pickup interestItems
diff --git a/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinAi.java b/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinAi.java
index c8e6893a7d2be08d6b0d111aa6e58e72f3376edc..5f2bb0160c49d404a06551880e08c589a5b2a0a7 100644
index b98179602f5b26ecd4df46837b15ca186f65cb38..f0059bd69705ecc7964867b103c93e1df9985803 100644
--- a/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinAi.java
+++ b/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinAi.java
@@ -402,7 +402,7 @@ public class PiglinAi {

Datei anzeigen

@ -12,10 +12,10 @@ Fires the event when a Raider tries to pick up a raid banner
to become raid leader.
diff --git a/src/main/java/net/minecraft/world/entity/monster/piglin/Piglin.java b/src/main/java/net/minecraft/world/entity/monster/piglin/Piglin.java
index 7ef04ef7995b093eef022b397cda8c27c8faede0..27d9145693a772cd1b5d171da303c934101f3be8 100644
index 1c42425b9211bea7cb189e967e566ad80fd278c2..6407ddef8442fce4f310ac4babf3e3de0dd5fc9a 100644
--- a/src/main/java/net/minecraft/world/entity/monster/piglin/Piglin.java
+++ b/src/main/java/net/minecraft/world/entity/monster/piglin/Piglin.java
@@ -429,7 +429,7 @@ public class Piglin extends AbstractPiglin implements CrossbowAttackMob, Invento
@@ -424,7 +424,7 @@ public class Piglin extends AbstractPiglin implements CrossbowAttackMob, Invento
@Override
protected void pickUpItem(ItemEntity item) {
@ -25,7 +25,7 @@ index 7ef04ef7995b093eef022b397cda8c27c8faede0..27d9145693a772cd1b5d171da303c934
}
diff --git a/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinAi.java b/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinAi.java
index 5f2bb0160c49d404a06551880e08c589a5b2a0a7..d98c526676202741e628d5e317b8cdd3f4d3be0a 100644
index f0059bd69705ecc7964867b103c93e1df9985803..5c13e376dd079134da465044f1057bcce66973a3 100644
--- a/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinAi.java
+++ b/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinAi.java
@@ -241,7 +241,10 @@ public class PiglinAi {
@ -49,7 +49,7 @@ index 5f2bb0160c49d404a06551880e08c589a5b2a0a7..d98c526676202741e628d5e317b8cdd3
if (PiglinAi.isLovedItem(itemstack, piglin)) { // CraftBukkit - Changes to allow for custom payment in bartering
diff --git a/src/main/java/net/minecraft/world/entity/raid/Raider.java b/src/main/java/net/minecraft/world/entity/raid/Raider.java
index 9948085f51659f9b896622251739343d658dd0b2..57fdcdaf54fd1c92a6e51a3a81789029096e5abe 100644
index 5538f7a9024d8708b70de836aa78a4015656a828..cdbc925ef61b8b439415f0a89368227890bcecb2 100644
--- a/src/main/java/net/minecraft/world/entity/raid/Raider.java
+++ b/src/main/java/net/minecraft/world/entity/raid/Raider.java
@@ -245,6 +245,11 @@ public abstract class Raider extends PatrollingMonster {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Correctly handle interactions with items on cooldown
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
index 14bbc86bbaad49b2af16f3b171eb667c28eda702..34ecfb89372f459117db99d57a7edd6f681bbe8a 100644
index fb7a401269a2ebfc998c14e1957dfd580d444c06..482e6b217c073ceff30c238c3a8cd8ea526bb07c 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
@@ -521,6 +521,7 @@ public class ServerPlayerGameMode {
@@ -519,6 +519,7 @@ public class ServerPlayerGameMode {
BlockState iblockdata = world.getBlockState(blockposition);
InteractionResult enuminteractionresult = InteractionResult.PASS;
boolean cancelledBlock = false;
@ -16,7 +16,7 @@ index 14bbc86bbaad49b2af16f3b171eb667c28eda702..34ecfb89372f459117db99d57a7edd6f
if (!iblockdata.getBlock().isEnabled(world.enabledFeatures())) {
return InteractionResult.FAIL;
@@ -530,10 +531,10 @@ public class ServerPlayerGameMode {
@@ -528,10 +529,10 @@ public class ServerPlayerGameMode {
}
if (player.getCooldowns().isOnCooldown(stack.getItem())) {
@ -30,10 +30,10 @@ index 14bbc86bbaad49b2af16f3b171eb667c28eda702..34ecfb89372f459117db99d57a7edd6f
this.interactResult = event.useItemInHand() == Event.Result.DENY;
this.interactPosition = blockposition.immutable();
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 7ec74be4ac660c85a3c9a1d60de45dfa374c9c1f..e2a346d2cd813dd64ab61403e531f9ebf221d4b4 100644
index 5a2fc10fb677291df95fceccff734cb9a78c81d6..4b28ae4a9bc9a295457cfcb84a86705db8f18502 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -542,7 +542,13 @@ public class CraftEventFactory {
@@ -544,7 +544,13 @@ public class CraftEventFactory {
return CraftEventFactory.callPlayerInteractEvent(who, action, position, direction, itemstack, false, hand, null);
}
@ -47,7 +47,7 @@ index 7ec74be4ac660c85a3c9a1d60de45dfa374c9c1f..e2a346d2cd813dd64ab61403e531f9eb
Player player = (who == null) ? null : (Player) who.getBukkitEntity();
CraftItemStack itemInHand = CraftItemStack.asCraftMirror(itemstack);
@@ -577,6 +583,11 @@ public class CraftEventFactory {
@@ -579,6 +585,11 @@ public class CraftEventFactory {
if (cancelledBlock) {
event.setUseInteractedBlock(Event.Result.DENY);
}

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Add PlayerInventorySlotChangeEvent
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 02eacfb09ce437d5bbb38c5f0e71d7b78793dedc..a114d53e3bdd5889882d72ea46f109a91ad5d65b 100644
index 545e5ef99560291210310d69e2572b40f25c605b..e9ddb8380534a49be7c9c82eb16c6fa1389f694a 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -371,6 +371,25 @@ public class ServerPlayer extends Player {
@@ -328,6 +328,25 @@ public class ServerPlayer extends Player {
}
}
@ -35,7 +35,7 @@ index 02eacfb09ce437d5bbb38c5f0e71d7b78793dedc..a114d53e3bdd5889882d72ea46f109a9
@Override
public void dataChanged(AbstractContainerMenu handler, int property, int value) {}
diff --git a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java b/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java
index 19b0ae77e99c972159cb236403f420baa0cc46e0..b9e8d8b91b307e37900d0d2e8c823e63faed7cea 100644
index 1a19c6dc49cac784ca56d92ec755d6ead9811b20..176c8048f2fb3822fc14af9bfe5676c9d0768ca3 100644
--- a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java
+++ b/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java
@@ -302,7 +302,7 @@ public abstract class AbstractContainerMenu {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Elder Guardian appearance API
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index d4fd2fa83d1d8e9d97465b92edd913c05d20c69c..d3897174efde2f304f5a92772d5218961c561246 100644
index ba93dbec8b22809133335e975f64caa85df30c9b..b4007ef683c64aeb8656d38a592d1037fcf8edaa 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -3154,6 +3154,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -3128,6 +3128,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
// Paper end

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Add entity knockback API
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index 9add16b4bacd5b823f5f0ffa957f8d79b063edb5..4e1cf7e826298986dafc423d258dd7cd532e63c1 100644
index c45d7e1262534255025392a804c9e4f47213f637..2477c1be05de15f8210da464787c38cc039891c0 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -1016,5 +1016,11 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {

Datei anzeigen

@ -27,10 +27,10 @@ index 6bd0afddbcc461149dfe9a5c7a86fff6ea13a5f1..148d233f4f5278ff39eacdaa0f4f0e7d
+ }
}
diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java
index 0303b7f80fe0939ce1e50cdfd3d93456f09a8259..c1a492827bbde63dd464402767d4c6a2cdf689eb 100644
index 06a2210ba7d17fe1676d59794639211e20c1d7ea..dbf230ab5a89b39dba724a0507076102574e860f 100644
--- a/src/main/java/net/minecraft/server/Main.java
+++ b/src/main/java/net/minecraft/server/Main.java
@@ -181,6 +181,18 @@ public class Main {
@@ -178,6 +178,18 @@ public class Main {
return;
}

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] fixed entity vehicle collision event not called
diff --git a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java
index d948850a44464618117c441cca94775b0319b157..9948a28dae4edba877c13ef0156be5ff58df3fa2 100644
index 350d931f99bea1291f890d87fca6ae644c1a9fe9..44a6118d3bd67a95180f750c17967561946e2e87 100644
--- a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java
+++ b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java
@@ -144,7 +144,15 @@ public abstract class AbstractMinecart extends Entity {
@@ -149,7 +149,15 @@ public abstract class AbstractMinecart extends Entity {
@Override
public boolean canCollideWith(Entity other) {

Datei anzeigen

@ -31,10 +31,10 @@ index 9fb11df7131f400e6e631146c32efccea83adf56..1282911b97292cde30dff83de756bc91
if (inSittingPose) {
this.entityData.set(DATA_FLAGS_ID, (byte)(b | 1));
diff --git a/src/main/java/net/minecraft/world/entity/animal/Fox.java b/src/main/java/net/minecraft/world/entity/animal/Fox.java
index 5052bcf16bb09b7bcf39566fef1378b1c4970fe6..62604ed2e82afd3603ccac5d9c6e285c431542b1 100644
index 9f24fb3ea75b9dcb41f70f6e4b0d6cd5dca57ff6..31d4683f5e158f076ce9a416b7003478af293688 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Fox.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Fox.java
@@ -427,7 +427,7 @@ public class Fox extends Animal implements VariantHolder<Fox.Type> {
@@ -433,7 +433,7 @@ public class Fox extends Animal implements VariantHolder<Fox.Type> {
this.setSleeping(nbt.getBoolean("Sleeping"));
this.setVariant(Fox.Type.byName(nbt.getString("Type")));
@ -43,7 +43,7 @@ index 5052bcf16bb09b7bcf39566fef1378b1c4970fe6..62604ed2e82afd3603ccac5d9c6e285c
this.setIsCrouching(nbt.getBoolean("Crouching"));
if (this.level() instanceof ServerLevel) {
this.setTargetGoals();
@@ -440,6 +440,12 @@ public class Fox extends Animal implements VariantHolder<Fox.Type> {
@@ -446,6 +446,12 @@ public class Fox extends Animal implements VariantHolder<Fox.Type> {
}
public void setSitting(boolean sitting) {
@ -57,10 +57,10 @@ index 5052bcf16bb09b7bcf39566fef1378b1c4970fe6..62604ed2e82afd3603ccac5d9c6e285c
}
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 4f03e50d8d9d67aa9a62fbb3bdb14f5ba851e08a..f43c4fed59c4c75540008284ddb197d9a6b5487b 100644
index 130761afcaa6723e0a9d9a518f1b526c344484b4..683cc5f9f066d554383fcd30e3654ac06ec76510 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Panda.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Panda.java
@@ -135,6 +135,7 @@ public class Panda extends Animal {
@@ -138,6 +138,7 @@ public class Panda extends Animal {
}
public void sit(boolean sitting) {
@ -69,32 +69,32 @@ index 4f03e50d8d9d67aa9a62fbb3bdb14f5ba851e08a..f43c4fed59c4c75540008284ddb197d9
}
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 2030fdb3124f793d7b545135b1db32fe9be27050..4efa7e331cc974008c653a04687a336e97626445 100644
index faf3e31f23d71bbc345bf98d4240490ac4677843..1d9427da270edb447a2c8e031c4f05fe5d39603b 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
@@ -591,7 +591,7 @@ public class Camel extends AbstractHorse implements PlayerRideableJumping, Rider
@@ -556,7 +556,7 @@ public class Camel extends AbstractHorse implements PlayerRideableJumping, Saddl
}
public void sitDown() {
- if (!this.isCamelSitting()) {
+ if (!this.isCamelSitting() && new io.papermc.paper.event.entity.EntityToggleSitEvent(this.getBukkitEntity(), true).callEvent()) { // Paper
this.playSound(SoundEvents.CAMEL_SIT, 1.0F, 1.0F);
this.playSound(SoundEvents.CAMEL_SIT, 1.0F, this.getVoicePitch());
this.setPose(Pose.SITTING);
this.resetLastPoseChangeTick(-this.level().getGameTime());
@@ -599,7 +599,7 @@ public class Camel extends AbstractHorse implements PlayerRideableJumping, Rider
this.gameEvent(GameEvent.ENTITY_ACTION);
@@ -565,7 +565,7 @@ public class Camel extends AbstractHorse implements PlayerRideableJumping, Saddl
}
public void standUp() {
- if (this.isCamelSitting()) {
+ if (this.isCamelSitting() && new io.papermc.paper.event.entity.EntityToggleSitEvent(this.getBukkitEntity(), false).callEvent()) { // Paper
this.playSound(SoundEvents.CAMEL_STAND, 1.0F, 1.0F);
this.playSound(SoundEvents.CAMEL_STAND, 1.0F, this.getVoicePitch());
this.setPose(Pose.STANDING);
this.resetLastPoseChangeTick(this.level().getGameTime());
@@ -607,6 +607,7 @@ public class Camel extends AbstractHorse implements PlayerRideableJumping, Rider
this.gameEvent(GameEvent.ENTITY_ACTION);
@@ -574,6 +574,7 @@ public class Camel extends AbstractHorse implements PlayerRideableJumping, Saddl
}
public void standUpInstantly() {
+ if (this.isCamelSitting() && !new io.papermc.paper.event.entity.EntityToggleSitEvent(this.getBukkitEntity(), false).callEvent()) return; // Paper
this.setPose(Pose.STANDING);
this.gameEvent(GameEvent.ENTITY_ACTION);
this.resetLastPoseChangeTickToFullStand(this.level().getGameTime());
}

Datei anzeigen

@ -0,0 +1,32 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jake Potrebic <jake.m.potrebic@gmail.com>
Date: Thu, 23 Jun 2022 19:25:51 -0700
Subject: [PATCH] Track projectile source for fireworks from dispensers
diff --git a/build.gradle.kts b/build.gradle.kts
index 26618ddf85952694ae2c78f41a19e4b9a324f059..2ed1851b9594a6a53168c594fc08f4f8ade2cacd 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -26,7 +26,8 @@ dependencies {
all its classes to check if they are plugins.
Scanning takes about 1-2 seconds so adding this speeds up the server start.
*/
- implementation("org.apache.logging.log4j:log4j-core:2.19.0") // Paper - implementation
+ implementation("org.apache.logging.log4j:log4j-core:2.19.0")
+ implementation(project(mapOf("path" to ":paper-api"))) // Paper - implementation
log4jPlugins.annotationProcessorConfigurationName("org.apache.logging.log4j:log4j-core:2.19.0") // Paper - Needed to generate meta for our Log4j plugins
runtimeOnly(log4jPlugins.output)
alsoShade(log4jPlugins.output)
diff --git a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
index e9db6b5096e7368b4a32a0e86eebccac15ab443b..f9ab6d4f6e7f430d41b79227e74136a3e980f340 100644
--- a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
+++ b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
@@ -517,6 +517,7 @@ public interface DispenseItemBehavior {
itemstack1 = CraftItemStack.asNMSCopy(event.getItem());
Vec3 vec3d = DispenseItemBehavior.getEntityPokingOutOfBlockPos(pointer, EntityType.FIREWORK_ROCKET, enumdirection);
FireworkRocketEntity entityfireworks = new FireworkRocketEntity(pointer.level(), itemstack1, vec3d.x(), vec3d.y(), vec3d.z(), true); // Paper - GH-2871 - fix last firework in stack having no effects when dispensed
+ entityfireworks.projectileSource = new org.bukkit.craftbukkit.projectiles.CraftBlockProjectileSource(pointer.blockEntity()); // Paper - track projectile source for fireworks
entityfireworks.shoot((double) enumdirection.getStepX(), (double) enumdirection.getStepY(), (double) enumdirection.getStepZ(), 0.5F, 1.0F);
pointer.level().addFreshEntity(entityfireworks);

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] Fix EntityCombustEvent cancellation cant fully prevent
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index e09a4ebbbcd2e3f55b8b764cbc36d72bc3092085..32093c96a22221f17411aaf260db071f27350966 100644
index 2a13d5f4cf86b4ae5e5cf2d0602fbcd275b1c080..53f5f0497cbebaf65afe232ba7603f4e14376e46 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -3291,6 +3291,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -3201,6 +3201,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
pluginManager.callEvent(entityCombustEvent);
if (!entityCombustEvent.isCancelled()) {
this.setSecondsOnFire(entityCombustEvent.getDuration(), false);

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Add PrePlayerAttackEntityEvent
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
index b69e0cd17467752707a33540cd6113dc21554ca1..53487f0a4fe672298c3b83d24a2a603641afcde8 100644
index b40961ad53437a5aa603f658ed56fca827de5716..6bf59f8e7f23ffabd2c6f739fe0daf9da6246e1d 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
@@ -1239,8 +1239,17 @@ public abstract class Player extends LivingEntity {
@@ -1245,8 +1245,17 @@ public abstract class Player extends LivingEntity {
}
public void attack(Entity target) {

Datei anzeigen

@ -6,7 +6,7 @@ Subject: [PATCH] ensure reset EnderDragon boss event name
Fix MC-257487
diff --git a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
index 294f384326c01d28c28908a56905b925b1b3bd76..c63f05a3d29146bfb8d5c93df5706145e3eaf716 100644
index 44f799d595d7150f00dfdfa2f85c87386f896607..390542c42fe957e8e2d21c879c1c8908c8970b44 100644
--- a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
+++ b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
@@ -73,6 +73,7 @@ public class EndDragonFight {
@ -26,7 +26,7 @@ index 294f384326c01d28c28908a56905b925b1b3bd76..c63f05a3d29146bfb8d5c93df5706145
this.gateways = new ObjectArrayList();
this.ticksSinceLastPlayerScan = 21;
this.skipArenaLoadedCheck = false;
@@ -498,6 +499,10 @@ public class EndDragonFight {
@@ -503,6 +504,10 @@ public class EndDragonFight {
this.ticksSinceDragonSeen = 0;
if (dragon.hasCustomName()) {
this.dragonEvent.setName(dragon.getDisplayName());

Datei anzeigen

@ -10,10 +10,10 @@ public net.minecraft.world.entity.monster.warden.WardenSpawnTracker cooldownTick
public net.minecraft.world.entity.monster.warden.WardenSpawnTracker increaseWarningLevel()V
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index d3897174efde2f304f5a92772d5218961c561246..0ccfced204aaaece005238c16cc0b50486859c60 100644
index b4007ef683c64aeb8656d38a592d1037fcf8edaa..3aa1a23c439ab6a54f2229654278395a65deadfe 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -3159,6 +3159,41 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -3133,6 +3133,41 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
public void showElderGuardian(boolean silent) {
if (getHandle().connection != null) getHandle().connection.send(new ClientboundGameEventPacket(ClientboundGameEventPacket.GUARDIAN_ELDER_EFFECT, silent ? 0F : 1F));
}

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] More vanilla friendly methods to update trades
diff --git a/src/main/java/net/minecraft/world/entity/npc/Villager.java b/src/main/java/net/minecraft/world/entity/npc/Villager.java
index 4bef7abbed6b64c2f126c81af5484eff200e620f..e30d5ae3e2900f43d7cafde71b8196f26e872841 100644
index 84cee8fb09f90424438de336f60d9388da1b39de..f555e29c7f9ea4ddb243a018bdc93d2bf1950c3c 100644
--- a/src/main/java/net/minecraft/world/entity/npc/Villager.java
+++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java
@@ -943,6 +943,12 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
@@ -944,6 +944,12 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
@Override
protected void updateTrades() {
@ -19,9 +19,9 @@ index 4bef7abbed6b64c2f126c81af5484eff200e620f..e30d5ae3e2900f43d7cafde71b8196f2
+ public boolean updateTrades(int amount) {
+ // Paper end
VillagerData villagerdata = this.getVillagerData();
Int2ObjectMap<VillagerTrades.ItemListing[]> int2objectmap = (Int2ObjectMap) VillagerTrades.TRADES.get(villagerdata.getProfession());
Int2ObjectMap int2objectmap;
@@ -952,9 +958,11 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
@@ -961,9 +967,11 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
if (avillagertrades_imerchantrecipeoption != null) {
MerchantOffers merchantrecipelist = this.getOffers();

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] Add /paper dumplisteners command
Co-authored-by: TwoLeggedCat <80929284+TwoLeggedCat@users.noreply.github.com>
diff --git a/src/main/java/io/papermc/paper/command/PaperCommand.java b/src/main/java/io/papermc/paper/command/PaperCommand.java
index b7fc337ab2bbe3c6d80ed70834e294ab3a7f9dc2..05b29305f5e3018a662884c2ef1af5ae4f6867ee 100644
index 1fd0854fb4f8ab3b5da3cda5ddd2535a0faa6adf..a6793f227fa90a37260cf0b9d5e9b6f1f47ff920 100644
--- a/src/main/java/io/papermc/paper/command/PaperCommand.java
+++ b/src/main/java/io/papermc/paper/command/PaperCommand.java
@@ -43,6 +43,7 @@ public final class PaperCommand extends Command {
@@ -42,6 +42,7 @@ public final class PaperCommand extends Command {
commands.put(Set.of("syncloadinfo"), new SyncLoadInfoCommand());
commands.put(Set.of("dumpitem"), new DumpItemCommand());
commands.put(Set.of("mobcaps", "playermobcaps"), new MobcapsCommand());

Datei anzeigen

@ -7,10 +7,10 @@ Makes certain entities check all players when searching for a player
instead of just checking players in their world.
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 5bdae591d344fc9b72ffcc1a44fb5e495b1e6bb2..37873ea2876a89ac8ea702ab0a71171e044852bc 100644
index 89ac71cd9305b21e78abbc31a3f2319eae636cfb..23dd27fb62609cfc648a1d1da66a59aa18fa0d8f 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -2805,4 +2805,12 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -2432,4 +2432,12 @@ public class ServerLevel extends Level implements WorldGenLevel {
entity.updateDynamicGameEventListener(DynamicGameEventListener::move);
}
}
@ -24,10 +24,10 @@ index 5bdae591d344fc9b72ffcc1a44fb5e495b1e6bb2..37873ea2876a89ac8ea702ab0a71171e
+ // Paper end
}
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 66a2ae4b03a99613be03458dab23a904956fcfee..1ed68dc816964bc1bff7cc705dc738fc1c65efc9 100644
index c3b9d590497bf96fd0df4c00f863ab64ec91115e..b8174fd81aba6d47d4882fdd442fb3c011b755ac 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -3613,7 +3613,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -3672,7 +3672,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
public void onItemPickup(ItemEntity item) {
@ -37,10 +37,10 @@ index 66a2ae4b03a99613be03458dab23a904956fcfee..1ed68dc816964bc1bff7cc705dc738fc
if (entity instanceof ServerPlayer) {
CriteriaTriggers.THROWN_ITEM_PICKED_UP_BY_ENTITY.trigger((ServerPlayer) entity, item.getItem(), this);
diff --git a/src/main/java/net/minecraft/world/entity/monster/ZombieVillager.java b/src/main/java/net/minecraft/world/entity/monster/ZombieVillager.java
index 59ed51907fc21784b37a55ee01207d8a730ae29a..25ed5571b24e590bc95056020d84496492b53298 100644
index 4b2cd6d34ea4081cad86041f57ccda41807d4279..807cff3fb51269b97d9aecbcc4706f0a139dfeaa 100644
--- a/src/main/java/net/minecraft/world/entity/monster/ZombieVillager.java
+++ b/src/main/java/net/minecraft/world/entity/monster/ZombieVillager.java
@@ -269,7 +269,7 @@ public class ZombieVillager extends Zombie implements VillagerDataHolder {
@@ -272,7 +272,7 @@ public class ZombieVillager extends Zombie implements VillagerDataHolder {
entityvillager.finalizeSpawn(world, world.getCurrentDifficultyAt(entityvillager.blockPosition()), MobSpawnType.CONVERSION, (SpawnGroupData) null, (CompoundTag) null);
entityvillager.refreshBrain(world);
if (this.conversionStarter != null) {
@ -50,10 +50,10 @@ index 59ed51907fc21784b37a55ee01207d8a730ae29a..25ed5571b24e590bc95056020d844964
if (entityhuman instanceof ServerPlayer) {
CriteriaTriggers.CURED_ZOMBIE_VILLAGER.trigger((ServerPlayer) entityhuman, this, entityvillager);
diff --git a/src/main/java/net/minecraft/world/level/EntityGetter.java b/src/main/java/net/minecraft/world/level/EntityGetter.java
index d860ddae508f53d06f74d8ae0efdfc500c1ddf07..3b959f42d958bf0f426853aee56753d6c455fcdb 100644
index e82a56c32f4179dc6a8df97f314dc3b4370e818d..8f3c767449f63fad54e45cbbb7a50352e5dbee4b 100644
--- a/src/main/java/net/minecraft/world/level/EntityGetter.java
+++ b/src/main/java/net/minecraft/world/level/EntityGetter.java
@@ -243,4 +243,11 @@ public interface EntityGetter {
@@ -231,4 +231,11 @@ public interface EntityGetter {
return null;
}

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Fix async entity add due to fungus trees
diff --git a/src/main/java/net/minecraft/server/level/WorldGenRegion.java b/src/main/java/net/minecraft/server/level/WorldGenRegion.java
index 52fd12c474c01f3b53d0f6596b7a6fafee52bd0d..877498729c66de9aa6a27c9148f7494d7895615c 100644
index d99626d529ac2d18f662e5af0264643e8582e12d..277984647658a067e66fd1766ab00736ea9083c3 100644
--- a/src/main/java/net/minecraft/server/level/WorldGenRegion.java
+++ b/src/main/java/net/minecraft/server/level/WorldGenRegion.java
@@ -228,6 +228,7 @@ public class WorldGenRegion implements WorldGenLevel {

Datei anzeigen

@ -11,7 +11,7 @@ the logic associated with damaging them
public net.minecraft.world.entity.LivingEntity entityEventForEquipmentBreak(Lnet/minecraft/world/entity/EquipmentSlot;)B
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index 4e1cf7e826298986dafc423d258dd7cd532e63c1..91c9818de29812ee595a65f9620f075021663e47 100644
index 2477c1be05de15f8210da464787c38cc039891c0..0bd820f556494880926c719981a8d33797ee350d 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -1017,6 +1017,53 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Friction API
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 1ed68dc816964bc1bff7cc705dc738fc1c65efc9..6a50f553753d4a7c596ad081c6bb3557afa884d6 100644
index b8174fd81aba6d47d4882fdd442fb3c011b755ac..ac89d89081cde83b700dd7c13930cd14bf1e2bc4 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -262,6 +262,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
@ -40,7 +40,7 @@ index 1ed68dc816964bc1bff7cc705dc738fc1c65efc9..6a50f553753d4a7c596ad081c6bb3557
@@ -803,6 +809,15 @@ public abstract class LivingEntity extends Entity implements Attackable {
absorptionAmount = 0;
}
this.setAbsorptionAmount(absorptionAmount);
this.internalSetAbsorptionAmount(absorptionAmount);
+
+ if (nbt.contains("Paper.FrictionState")) {
+ String fs = nbt.getString("Paper.FrictionState");
@ -132,7 +132,7 @@ index d160db37a3b7ef44b6de8fef209eeccef46c3a95..5e83fabb20bc2b0668cbf48530053ca1
public int getHealth() {
return item.health;
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index 91c9818de29812ee595a65f9620f075021663e47..4b8d619e447d761cb09252388e09c843bbc7d3a2 100644
index 0bd820f556494880926c719981a8d33797ee350d..dc6f09332d76b9f23e42fce42a2900d7a3d968a4 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -1064,6 +1064,18 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {

Datei anzeigen

@ -9,15 +9,15 @@ also check if all packets are ignored during the shutdown process.
See net.minecraft.network.Connection#channelRead0(ChannelHandlerContext, Packet) and net.minecraft.util.thread.BlockableEventLoop#executeIfPossible(Runnable)
diff --git a/src/main/java/net/minecraft/network/protocol/PacketUtils.java b/src/main/java/net/minecraft/network/protocol/PacketUtils.java
index 52a84eeb3b7df782cbf91aac6df42fb8f99077f6..d2f0a0755317f5fa9a1ccf7db346aa77fd287d80 100644
index 047fc7206131e0f36ab45d04e98b7a235431e342..ae052902ccaa0959882be26bbe2f3c93bfd463d2 100644
--- a/src/main/java/net/minecraft/network/protocol/PacketUtils.java
+++ b/src/main/java/net/minecraft/network/protocol/PacketUtils.java
@@ -41,7 +41,7 @@ public class PacketUtils {
@@ -25,7 +25,7 @@ public class PacketUtils {
public static <T extends PacketListener> void ensureRunningOnSameThread(Packet<T> packet, T listener, BlockableEventLoop<?> engine) throws RunningOnDifferentThreadException {
if (!engine.isSameThread()) {
- engine.executeIfPossible(() -> {
+ engine.execute(() -> { // Paper - Fix preemptive player kick on a server shutdown.
packetProcessing.push(listener); // Paper - detailed watchdog information
try { // Paper - detailed watchdog information
if (MinecraftServer.getServer().hasStopped() || (listener instanceof ServerGamePacketListenerImpl && ((ServerGamePacketListenerImpl) listener).processedDisconnect)) return; // CraftBukkit, MC-142590
if (MinecraftServer.getServer().hasStopped() || (listener instanceof ServerCommonPacketListenerImpl && ((ServerCommonPacketListenerImpl) listener).processedDisconnect)) return; // CraftBukkit, MC-142590
if (listener.shouldHandleMessage(packet)) {
co.aikar.timings.Timing timing = co.aikar.timings.MinecraftTimings.getPacketTiming(packet); // Paper - timings

Datei anzeigen

@ -8,10 +8,10 @@ offhand slot isn't sent. This is not correct because you *can* put stuff into th
by pressing the offhand swap item
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index a114d53e3bdd5889882d72ea46f109a91ad5d65b..dc5fda83a66afbfeb7897fc20b4742899d8aca08 100644
index e9ddb8380534a49be7c9c82eb16c6fa1389f694a..299c960b7601ca695d95ef96e31bf652a2bb7dac 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -340,6 +340,13 @@ public class ServerPlayer extends Player {
@@ -297,6 +297,13 @@ public class ServerPlayer extends Player {
}
@ -26,7 +26,7 @@ index a114d53e3bdd5889882d72ea46f109a91ad5d65b..dc5fda83a66afbfeb7897fc20b474289
public void sendSlotChange(AbstractContainerMenu handler, int slot, ItemStack stack) {
ServerPlayer.this.connection.send(new ClientboundContainerSetSlotPacket(handler.containerId, handler.incrementStateId(), slot, stack));
diff --git a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java b/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java
index b9e8d8b91b307e37900d0d2e8c823e63faed7cea..706b354ac9a1a6a4a1e61b2a109180d1dd22bbbd 100644
index 176c8048f2fb3822fc14af9bfe5676c9d0768ca3..3ef712299fe248602b0b117c0a8e285cdf4e05c2 100644
--- a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java
+++ b/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java
@@ -200,6 +200,7 @@ public abstract class AbstractContainerMenu {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Player Entity Tracking Events
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
index 1337abd1ad70fb67d1ebba0fc0245470c988f7c5..3b9fcc33fdd91b02f7f9681329b2f3d523a5cd5a 100644
index a04cf2cb736dc327f063a5ce035af5817657b052..0f543ccb5363037647f471d21171ab0ed3d0d993 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -1546,9 +1546,18 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -1847,9 +1847,18 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
// CraftBukkit end
if (flag) {
if (this.seenBy.add(player.connection)) {

Datei anzeigen

@ -82,23 +82,23 @@ index d088479d160dbd2fc90b48a30553be141db8eef2..15add3f4dfd718ec09bb1db4f2222346
public static class DataItem<T> {
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index bf73cdaa4f05e4415b9d072ad46774361deddad8..b95ad6e975048364876dd47686438688f65773db 100644
index 58fdede705e55801c4dff11db1b9d29b2430c19c..e09a775e0c5ddc46260f0eb3c9454945d9d18299 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2784,7 +2784,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -2634,7 +2634,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
// Entity in bucket - SPIGOT-4048 and SPIGOT-6859a
if ((entity instanceof Bucketable && entity instanceof LivingEntity && origItem != null && origItem.asItem() == Items.WATER_BUCKET) && (event.isCancelled() || ServerGamePacketListenerImpl.this.player.getInventory().getSelected() == null || ServerGamePacketListenerImpl.this.player.getInventory().getSelected().getItem() != origItem)) {
- ServerGamePacketListenerImpl.this.send(new ClientboundAddEntityPacket(entity));
- send(new ClientboundAddEntityPacket(entity));
+ entity.getEntityData().resendPossiblyDesyncedEntity(player); // Paper - The entire mob gets deleted, so resend it.
player.containerMenu.sendAllDataToRemote();
}
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 815eb218b6612b13c6deff636509bad35eeace62..490f2d6f7a43d0a5915a80960c1c7c48b3eea19f 100644
index 5cf97d15ac8536ce5cd5e63c00aa137e2565eea5..e199f723517fc4ed7f5320ac18bf3e5c45fca560 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -371,7 +371,7 @@ public abstract class PlayerList {
@@ -357,7 +357,7 @@ public abstract class PlayerList {
((ServerLevel)player.level()).getChunkSource().chunkMap.addEntity(player); // Paper - track entity now
// CraftBukkit end

Datei anzeigen

@ -8,10 +8,10 @@ Fixes some wrong reasons, and adds missing spawn reasons for entities.
Co-authored-by: Doc <nachito94@msn.com>
diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java
index c7e127e62b7616997c123c47d86ed751c12fd151..c11e805dc4b77f08cadb0e99d86635036405da3e 100644
index 5981b2bd5745ac32cdb377c15c4384d074a47680..0d38fe5a88af0afce85b8be7051d0e2f43f0ac34 100644
--- a/src/main/java/net/minecraft/world/entity/EntityType.java
+++ b/src/main/java/net/minecraft/world/entity/EntityType.java
@@ -348,7 +348,7 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT
@@ -349,7 +349,7 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT
@Nullable
public T spawn(ServerLevel world, @Nullable ItemStack stack, @Nullable Player player, BlockPos pos, MobSpawnType spawnReason, boolean alignPosition, boolean invertY) {
// CraftBukkit start

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] fix Instruments
properly handle Player#playNote
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 0ccfced204aaaece005238c16cc0b50486859c60..c9775b294dd6982d5064f3553fab1f0f0a667121 100644
index 3aa1a23c439ab6a54f2229654278395a65deadfe..7f26c6bff8fcc51d0d1c544225caceb2cb7c2d0c 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -724,29 +724,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -684,29 +684,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
if (this.getHandle().connection == null) return;

Datei anzeigen

@ -6,7 +6,7 @@ Subject: [PATCH] Improve inlining for some hot BlockBehavior and FluidState
diff --git a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
index 27680befd64967ef3c2ae0f35c9e7bd68d474314..de4c1e4701236e7d5ec77339c51ad6a9d8288bb6 100644
index 04b27d3797057b80e71d2d32c9e31c3fba39c86b..525632059dc7cf911ce485e925a3c8d6ba5a4f86 100644
--- a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
+++ b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
@@ -963,15 +963,15 @@ public abstract class BlockBehaviour implements FeatureElement {
@ -37,7 +37,7 @@ index 27680befd64967ef3c2ae0f35c9e7bd68d474314..de4c1e4701236e7d5ec77339c51ad6a9
return this.canOcclude;
}
@@ -1251,11 +1251,11 @@ public abstract class BlockBehaviour implements FeatureElement {
@@ -1255,11 +1255,11 @@ public abstract class BlockBehaviour implements FeatureElement {
return this.getBlock() == block;
}

Datei anzeigen

@ -9,19 +9,19 @@ stack before a single item had been taken. This fixes that so the stack size
is always 1.
diff --git a/src/main/java/net/minecraft/core/dispenser/AbstractProjectileDispenseBehavior.java b/src/main/java/net/minecraft/core/dispenser/AbstractProjectileDispenseBehavior.java
index 2542cf94ac76871f4ff02c3524e8606c96f50cc7..309ad5a1da6b3a297d5526cd9247359ac5f49406 100644
index e22d71c371952e91b838d10206d3dcdf9dc8716d..155bd3d6d9c7d3cac7fd04de8210301251d1e17a 100644
--- a/src/main/java/net/minecraft/core/dispenser/AbstractProjectileDispenseBehavior.java
+++ b/src/main/java/net/minecraft/core/dispenser/AbstractProjectileDispenseBehavior.java
@@ -28,7 +28,7 @@ public abstract class AbstractProjectileDispenseBehavior extends DefaultDispense
@@ -27,7 +27,7 @@ public abstract class AbstractProjectileDispenseBehavior extends DefaultDispense
// CraftBukkit start
// iprojectile.shoot((double) enumdirection.getStepX(), (double) ((float) enumdirection.getStepY() + 0.1F), (double) enumdirection.getStepZ(), this.getPower(), this.getUncertainty());
- ItemStack itemstack1 = stack.split(1);
+ ItemStack itemstack1 = stack.copyWithCount(1); // Paper - shrink below and single item in event
org.bukkit.block.Block block = worldserver.getWorld().getBlockAt(pointer.getPos().getX(), pointer.getPos().getY(), pointer.getPos().getZ());
org.bukkit.block.Block block = CraftBlock.at(worldserver, pointer.pos());
CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemstack1);
@@ -38,12 +38,13 @@ public abstract class AbstractProjectileDispenseBehavior extends DefaultDispense
@@ -37,12 +37,13 @@ public abstract class AbstractProjectileDispenseBehavior extends DefaultDispense
}
if (event.isCancelled()) {
@ -37,8 +37,8 @@ index 2542cf94ac76871f4ff02c3524e8606c96f50cc7..309ad5a1da6b3a297d5526cd9247359a
// Chain to handler for new item
ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem());
DispenseItemBehavior idispensebehavior = (DispenseItemBehavior) DispenserBlock.DISPENSER_REGISTRY.get(eventStack.getItem());
@@ -57,7 +58,7 @@ public abstract class AbstractProjectileDispenseBehavior extends DefaultDispense
((Entity) iprojectile).projectileSource = new org.bukkit.craftbukkit.projectiles.CraftBlockProjectileSource((DispenserBlockEntity) pointer.getEntity());
@@ -56,7 +57,7 @@ public abstract class AbstractProjectileDispenseBehavior extends DefaultDispense
((Entity) iprojectile).projectileSource = new org.bukkit.craftbukkit.projectiles.CraftBlockProjectileSource(pointer.blockEntity());
// CraftBukkit end
worldserver.addFreshEntity(iprojectile);
- // itemstack.shrink(1); // CraftBukkit - Handled during event processing
@ -47,19 +47,19 @@ index 2542cf94ac76871f4ff02c3524e8606c96f50cc7..309ad5a1da6b3a297d5526cd9247359a
}
diff --git a/src/main/java/net/minecraft/core/dispenser/BoatDispenseItemBehavior.java b/src/main/java/net/minecraft/core/dispenser/BoatDispenseItemBehavior.java
index 03baafa6884bba08c2d7646706a5480baf009d87..573244877f096c4ff4c68f7fcfd21f7423da1104 100644
index eb3b91a49d7831d7a3cbbee9323723956d3d3e00..80dbeb0a988c749feaaba26ce5ad93c181d88a5d 100644
--- a/src/main/java/net/minecraft/core/dispenser/BoatDispenseItemBehavior.java
+++ b/src/main/java/net/minecraft/core/dispenser/BoatDispenseItemBehavior.java
@@ -55,7 +55,7 @@ public class BoatDispenseItemBehavior extends DefaultDispenseItemBehavior {
@@ -57,7 +57,7 @@ public class BoatDispenseItemBehavior extends DefaultDispenseItemBehavior {
// Object object = this.isChestBoat ? new ChestBoat(worldserver, d1, d2 + d4, d3) : new EntityBoat(worldserver, d1, d2 + d4, d3);
// CraftBukkit start
- ItemStack itemstack1 = stack.split(1);
+ ItemStack itemstack1 = stack.copyWithCount(1); // Paper - shrink at end and single item in event
org.bukkit.block.Block block = worldserver.getWorld().getBlockAt(pointer.getPos().getX(), pointer.getPos().getY(), pointer.getPos().getZ());
org.bukkit.block.Block block = CraftBlock.at(worldserver, pointer.pos());
CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemstack1);
@@ -65,12 +65,13 @@ public class BoatDispenseItemBehavior extends DefaultDispenseItemBehavior {
@@ -67,12 +67,13 @@ public class BoatDispenseItemBehavior extends DefaultDispenseItemBehavior {
}
if (event.isCancelled()) {
@ -75,7 +75,7 @@ index 03baafa6884bba08c2d7646706a5480baf009d87..573244877f096c4ff4c68f7fcfd21f74
// Chain to handler for new item
ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem());
DispenseItemBehavior idispensebehavior = (DispenseItemBehavior) DispenserBlock.DISPENSER_REGISTRY.get(eventStack.getItem());
@@ -85,8 +86,7 @@ public class BoatDispenseItemBehavior extends DefaultDispenseItemBehavior {
@@ -87,8 +88,7 @@ public class BoatDispenseItemBehavior extends DefaultDispenseItemBehavior {
((Boat) object).setVariant(this.type);
((Boat) object).setYRot(enumdirection.toYRot());
@ -86,16 +86,16 @@ index 03baafa6884bba08c2d7646706a5480baf009d87..573244877f096c4ff4c68f7fcfd21f74
}
diff --git a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
index 876f44845a02b02c93233b302c7306eff40f1468..b4f5dbe9022dd20437c15c4f6fbe2ac06dacbadb 100644
index f9ab6d4f6e7f430d41b79227e74136a3e980f340..c0baec6ae9bd90410f47aa04d7c7704233375d1a 100644
--- a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
+++ b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
@@ -217,7 +217,7 @@ public interface DispenseItemBehavior {
// CraftBukkit start
ServerLevel worldserver = pointer.getLevel();
ServerLevel worldserver = pointer.level();
- ItemStack itemstack1 = stack.split(1);
+ ItemStack itemstack1 = stack.copyWithCount(1); // Paper - shrink below and single item in event
org.bukkit.block.Block block = worldserver.getWorld().getBlockAt(pointer.getPos().getX(), pointer.getPos().getY(), pointer.getPos().getZ());
org.bukkit.block.Block block = CraftBlock.at(worldserver, pointer.pos());
CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemstack1);
@@ -227,12 +227,13 @@ public interface DispenseItemBehavior {
@ -121,15 +121,15 @@ index 876f44845a02b02c93233b302c7306eff40f1468..b4f5dbe9022dd20437c15c4f6fbe2ac0
- // itemstack.shrink(1); // Handled during event processing
+ if (shrink) stack.shrink(1); // Paper - actually handle here
// CraftBukkit end
pointer.getLevel().gameEvent((Entity) null, GameEvent.ENTITY_PLACE, pointer.getPos());
pointer.level().gameEvent((Entity) null, GameEvent.ENTITY_PLACE, pointer.pos());
return stack;
@@ -271,7 +272,7 @@ public interface DispenseItemBehavior {
ServerLevel worldserver = pointer.getLevel();
ServerLevel worldserver = pointer.level();
// CraftBukkit start
- ItemStack itemstack1 = stack.split(1);
+ ItemStack itemstack1 = stack.copyWithCount(1); // Paper - shrink below and single item in event
org.bukkit.block.Block block = worldserver.getWorld().getBlockAt(pointer.getPos().getX(), pointer.getPos().getY(), pointer.getPos().getZ());
org.bukkit.block.Block block = CraftBlock.at(worldserver, pointer.pos());
CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemstack1);
@@ -281,12 +282,13 @@ public interface DispenseItemBehavior {
@ -163,8 +163,8 @@ index 876f44845a02b02c93233b302c7306eff40f1468..b4f5dbe9022dd20437c15c4f6fbe2ac0
// CraftBukkit start
- ItemStack itemstack1 = stack.split(1);
+ ItemStack itemstack1 = stack.copyWithCount(1); // Paper - shrink below and single item in event
Level world = pointer.getLevel();
org.bukkit.block.Block block = world.getWorld().getBlockAt(pointer.getPos().getX(), pointer.getPos().getY(), pointer.getPos().getZ());
Level world = pointer.level();
org.bukkit.block.Block block = CraftBlock.at(world, pointer.pos());
CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemstack1);
@@ -336,12 +338,13 @@ public interface DispenseItemBehavior {
}
@ -197,8 +197,8 @@ index 876f44845a02b02c93233b302c7306eff40f1468..b4f5dbe9022dd20437c15c4f6fbe2ac0
// CraftBukkit start
- ItemStack itemstack1 = stack.split(1);
+ ItemStack itemstack1 = stack.copyWithCount(1); // Paper - shrink below and single item in event
Level world = pointer.getLevel();
org.bukkit.block.Block block = world.getWorld().getBlockAt(pointer.getPos().getX(), pointer.getPos().getY(), pointer.getPos().getZ());
Level world = pointer.level();
org.bukkit.block.Block block = CraftBlock.at(world, pointer.pos());
CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemstack1);
@@ -391,12 +394,13 @@ public interface DispenseItemBehavior {
}
@ -230,8 +230,8 @@ index 876f44845a02b02c93233b302c7306eff40f1468..b4f5dbe9022dd20437c15c4f6fbe2ac0
} while (!entityhorsechestedabstract.isTamed());
- ItemStack itemstack1 = stack.split(1);
+ ItemStack itemstack1 = stack.copyWithCount(1); // Paper - shrink below
Level world = pointer.getLevel();
org.bukkit.block.Block block = world.getWorld().getBlockAt(pointer.getPos().getX(), pointer.getPos().getY(), pointer.getPos().getZ());
Level world = pointer.level();
org.bukkit.block.Block block = CraftBlock.at(world, pointer.pos());
CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemstack1);
@@ -463,10 +468,13 @@ public interface DispenseItemBehavior {
}
@ -257,12 +257,12 @@ index 876f44845a02b02c93233b302c7306eff40f1468..b4f5dbe9022dd20437c15c4f6fbe2ac0
return stack;
}
@@ -489,7 +497,7 @@ public interface DispenseItemBehavior {
Direction enumdirection = (Direction) pointer.getBlockState().getValue(DispenserBlock.FACING);
Direction enumdirection = (Direction) pointer.state().getValue(DispenserBlock.FACING);
// CraftBukkit start
ServerLevel worldserver = pointer.getLevel();
ServerLevel worldserver = pointer.level();
- ItemStack itemstack1 = stack.split(1);
+ ItemStack itemstack1 = stack.copyWithCount(1); // Paper - shrink below and single item in event
org.bukkit.block.Block block = worldserver.getWorld().getBlockAt(pointer.getPos().getX(), pointer.getPos().getY(), pointer.getPos().getZ());
org.bukkit.block.Block block = CraftBlock.at(worldserver, pointer.pos());
CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemstack1);
@@ -499,12 +507,13 @@ public interface DispenseItemBehavior {
@ -282,9 +282,9 @@ index 876f44845a02b02c93233b302c7306eff40f1468..b4f5dbe9022dd20437c15c4f6fbe2ac0
ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem());
DispenseItemBehavior idispensebehavior = (DispenseItemBehavior) DispenserBlock.DISPENSER_REGISTRY.get(eventStack.getItem());
@@ -521,7 +530,7 @@ public interface DispenseItemBehavior {
DispenseItemBehavior.setEntityPokingOutOfBlock(pointer, entityfireworks, enumdirection);
entityfireworks.shoot((double) enumdirection.getStepX(), (double) enumdirection.getStepY(), (double) enumdirection.getStepZ(), 0.5F, 1.0F);
pointer.getLevel().addFreshEntity(entityfireworks);
pointer.level().addFreshEntity(entityfireworks);
- // itemstack.shrink(1); // Handled during event processing
+ if (shrink) stack.shrink(1); // Paper - actually handle here
// CraftBukkit end
@ -296,7 +296,7 @@ index 876f44845a02b02c93233b302c7306eff40f1468..b4f5dbe9022dd20437c15c4f6fbe2ac0
// CraftBukkit start
- ItemStack itemstack1 = stack.split(1);
+ ItemStack itemstack1 = stack.copyWithCount(1); // Paper - shrink below and single item in event
org.bukkit.block.Block block = worldserver.getWorld().getBlockAt(pointer.getPos().getX(), pointer.getPos().getY(), pointer.getPos().getZ());
org.bukkit.block.Block block = CraftBlock.at(worldserver, pointer.pos());
CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemstack1);
@@ -556,12 +565,13 @@ public interface DispenseItemBehavior {
@ -316,7 +316,7 @@ index 876f44845a02b02c93233b302c7306eff40f1468..b4f5dbe9022dd20437c15c4f6fbe2ac0
ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem());
DispenseItemBehavior idispensebehavior = (DispenseItemBehavior) DispenserBlock.DISPENSER_REGISTRY.get(eventStack.getItem());
@@ -576,7 +586,7 @@ public interface DispenseItemBehavior {
entitysmallfireball.projectileSource = new org.bukkit.craftbukkit.projectiles.CraftBlockProjectileSource((DispenserBlockEntity) pointer.getEntity());
entitysmallfireball.projectileSource = new org.bukkit.craftbukkit.projectiles.CraftBlockProjectileSource(pointer.blockEntity());
worldserver.addFreshEntity(entitysmallfireball);
- // itemstack.shrink(1); // Handled during event processing
@ -326,50 +326,41 @@ index 876f44845a02b02c93233b302c7306eff40f1468..b4f5dbe9022dd20437c15c4f6fbe2ac0
}
@@ -620,7 +630,7 @@ public interface DispenseItemBehavior {
BlockState iblockdata = worldserver.getBlockState(blockposition);
if (iblockdata.isAir() || iblockdata.canBeReplaced() || (dispensiblecontaineritem instanceof BucketItem && iblockdata.getBlock() instanceof LiquidBlockContainer && ((LiquidBlockContainer) iblockdata.getBlock()).canPlaceLiquid(worldserver, blockposition, iblockdata, ((BucketItem) dispensiblecontaineritem).content))) {
org.bukkit.block.Block block = worldserver.getWorld().getBlockAt(pointer.getPos().getX(), pointer.getPos().getY(), pointer.getPos().getZ());
if (iblockdata.isAir() || iblockdata.canBeReplaced() || (dispensiblecontaineritem instanceof BucketItem && iblockdata.getBlock() instanceof LiquidBlockContainer && ((LiquidBlockContainer) iblockdata.getBlock()).canPlaceLiquid((Player) null, worldserver, blockposition, iblockdata, ((BucketItem) dispensiblecontaineritem).content))) {
org.bukkit.block.Block block = CraftBlock.at(worldserver, pointer.pos());
- CraftItemStack craftItem = CraftItemStack.asCraftMirror(stack);
+ CraftItemStack craftItem = CraftItemStack.asCraftMirror(stack.copyWithCount(1)); // Paper - single item in event
BlockDispenseEvent event = new BlockDispenseEvent(block, craftItem.clone(), new org.bukkit.util.Vector(x, y, z));
if (!DispenserBlock.eventFired) {
@@ -693,7 +703,7 @@ public interface DispenseItemBehavior {
@@ -694,7 +704,7 @@ public interface DispenseItemBehavior {
// CraftBukkit start
org.bukkit.block.Block bukkitBlock = worldserver.getWorld().getBlockAt(pointer.getPos().getX(), pointer.getPos().getY(), pointer.getPos().getZ());
org.bukkit.block.Block bukkitBlock = CraftBlock.at(worldserver, pointer.pos());
- CraftItemStack craftItem = CraftItemStack.asCraftMirror(stack);
+ CraftItemStack craftItem = CraftItemStack.asCraftMirror(stack.copyWithCount(1)); // Paper - single item in event
BlockDispenseEvent event = new BlockDispenseEvent(bukkitBlock, craftItem.clone(), new org.bukkit.util.Vector(blockposition.getX(), blockposition.getY(), blockposition.getZ()));
if (!DispenserBlock.eventFired) {
@@ -740,7 +750,7 @@ public interface DispenseItemBehavior {
@@ -802,7 +812,7 @@ public interface DispenseItemBehavior {
BlockPos blockposition = pointer.pos().relative((Direction) pointer.state().getValue(DispenserBlock.FACING));
// CraftBukkit start
org.bukkit.block.Block bukkitBlock = worldserver.getWorld().getBlockAt(pointer.getPos().getX(), pointer.getPos().getY(), pointer.getPos().getZ());
- CraftItemStack craftItem = CraftItemStack.asCraftMirror(stack);
+ CraftItemStack craftItem = CraftItemStack.asCraftMirror(stack); // Paper - ignore stack size on damageable items
BlockDispenseEvent event = new BlockDispenseEvent(bukkitBlock, craftItem.clone(), new org.bukkit.util.Vector(0, 0, 0));
if (!DispenserBlock.eventFired) {
@@ -801,7 +811,7 @@ public interface DispenseItemBehavior {
BlockPos blockposition = pointer.getPos().relative((Direction) pointer.getBlockState().getValue(DispenserBlock.FACING));
// CraftBukkit start
org.bukkit.block.Block block = worldserver.getWorld().getBlockAt(pointer.getPos().getX(), pointer.getPos().getY(), pointer.getPos().getZ());
org.bukkit.block.Block block = CraftBlock.at(worldserver, pointer.pos());
- CraftItemStack craftItem = CraftItemStack.asCraftMirror(stack);
+ CraftItemStack craftItem = CraftItemStack.asCraftMirror(stack.copyWithCount(1)); // Paper - single item in event
BlockDispenseEvent event = new BlockDispenseEvent(block, craftItem.clone(), new org.bukkit.util.Vector(0, 0, 0));
if (!DispenserBlock.eventFired) {
@@ -867,7 +877,7 @@ public interface DispenseItemBehavior {
@@ -868,7 +878,7 @@ public interface DispenseItemBehavior {
// CraftBukkit start
// EntityTNTPrimed entitytntprimed = new EntityTNTPrimed(worldserver, (double) blockposition.getX() + 0.5D, (double) blockposition.getY(), (double) blockposition.getZ() + 0.5D, (EntityLiving) null);
- ItemStack itemstack1 = stack.split(1);
+ ItemStack itemstack1 = stack.copyWithCount(1); // Paper - shrink at end and single item in event
org.bukkit.block.Block block = worldserver.getWorld().getBlockAt(pointer.getPos().getX(), pointer.getPos().getY(), pointer.getPos().getZ());
org.bukkit.block.Block block = CraftBlock.at(worldserver, pointer.pos());
CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemstack1);
@@ -877,12 +887,13 @@ public interface DispenseItemBehavior {
@@ -878,12 +888,13 @@ public interface DispenseItemBehavior {
}
if (event.isCancelled()) {
@ -385,7 +376,7 @@ index 876f44845a02b02c93233b302c7306eff40f1468..b4f5dbe9022dd20437c15c4f6fbe2ac0
// Chain to handler for new item
ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem());
DispenseItemBehavior idispensebehavior = (DispenseItemBehavior) DispenserBlock.DISPENSER_REGISTRY.get(eventStack.getItem());
@@ -898,7 +909,7 @@ public interface DispenseItemBehavior {
@@ -899,7 +910,7 @@ public interface DispenseItemBehavior {
worldserver.addFreshEntity(entitytntprimed);
worldserver.playSound((Player) null, entitytntprimed.getX(), entitytntprimed.getY(), entitytntprimed.getZ(), SoundEvents.TNT_PRIMED, SoundSource.BLOCKS, 1.0F, 1.0F);
worldserver.gameEvent((Entity) null, GameEvent.ENTITY_PLACE, blockposition);
@ -394,73 +385,60 @@ index 876f44845a02b02c93233b302c7306eff40f1468..b4f5dbe9022dd20437c15c4f6fbe2ac0
return stack;
}
});
@@ -925,7 +936,7 @@ public interface DispenseItemBehavior {
@@ -926,7 +937,7 @@ public interface DispenseItemBehavior {
// CraftBukkit start
org.bukkit.block.Block bukkitBlock = worldserver.getWorld().getBlockAt(pointer.getPos().getX(), pointer.getPos().getY(), pointer.getPos().getZ());
org.bukkit.block.Block bukkitBlock = CraftBlock.at(worldserver, pointer.pos());
- CraftItemStack craftItem = CraftItemStack.asCraftMirror(stack);
+ CraftItemStack craftItem = CraftItemStack.asCraftMirror(stack.copyWithCount(1)); // Paper - single item in event
BlockDispenseEvent event = new BlockDispenseEvent(bukkitBlock, craftItem.clone(), new org.bukkit.util.Vector(blockposition.getX(), blockposition.getY(), blockposition.getZ()));
if (!DispenserBlock.eventFired) {
@@ -974,7 +985,7 @@ public interface DispenseItemBehavior {
@@ -975,7 +986,7 @@ public interface DispenseItemBehavior {
// CraftBukkit start
org.bukkit.block.Block bukkitBlock = worldserver.getWorld().getBlockAt(pointer.getPos().getX(), pointer.getPos().getY(), pointer.getPos().getZ());
org.bukkit.block.Block bukkitBlock = CraftBlock.at(worldserver, pointer.pos());
- CraftItemStack craftItem = CraftItemStack.asCraftMirror(stack);
+ CraftItemStack craftItem = CraftItemStack.asCraftMirror(stack.copyWithCount(1)); // Paper - single item in event
BlockDispenseEvent event = new BlockDispenseEvent(bukkitBlock, craftItem.clone(), new org.bukkit.util.Vector(blockposition.getX(), blockposition.getY(), blockposition.getZ()));
if (!DispenserBlock.eventFired) {
@@ -1047,7 +1058,7 @@ public interface DispenseItemBehavior {
@@ -1048,7 +1059,7 @@ public interface DispenseItemBehavior {
// CraftBukkit start
org.bukkit.block.Block bukkitBlock = worldserver.getWorld().getBlockAt(pointer.getPos().getX(), pointer.getPos().getY(), pointer.getPos().getZ());
org.bukkit.block.Block bukkitBlock = CraftBlock.at(worldserver, pointer.pos());
- CraftItemStack craftItem = CraftItemStack.asCraftMirror(stack);
+ CraftItemStack craftItem = CraftItemStack.asCraftMirror(stack.copyWithCount(1)); // Paper - only single item in event
BlockDispenseEvent event = new BlockDispenseEvent(bukkitBlock, craftItem.clone(), new org.bukkit.util.Vector(blockposition.getX(), blockposition.getY(), blockposition.getZ()));
if (!DispenserBlock.eventFired) {
diff --git a/src/main/java/net/minecraft/core/dispenser/ShearsDispenseItemBehavior.java b/src/main/java/net/minecraft/core/dispenser/ShearsDispenseItemBehavior.java
index 8b2e9d11f61276f53e7d15af7a119569c0b661fc..9b0049dfeaec9b688bf276f2ac2b18943b5696b2 100644
--- a/src/main/java/net/minecraft/core/dispenser/ShearsDispenseItemBehavior.java
+++ b/src/main/java/net/minecraft/core/dispenser/ShearsDispenseItemBehavior.java
@@ -37,7 +37,7 @@ public class ShearsDispenseItemBehavior extends OptionalDispenseItemBehavior {
ServerLevel worldserver = pointer.getLevel();
// CraftBukkit start
org.bukkit.block.Block bukkitBlock = worldserver.getWorld().getBlockAt(pointer.getPos().getX(), pointer.getPos().getY(), pointer.getPos().getZ());
- CraftItemStack craftItem = CraftItemStack.asCraftMirror(stack);
+ CraftItemStack craftItem = CraftItemStack.asCraftMirror(stack); // Paper - ignore stack size on damageable items
BlockDispenseEvent event = new BlockDispenseEvent(bukkitBlock, craftItem.clone(), new org.bukkit.util.Vector(0, 0, 0));
if (!DispenserBlock.eventFired) {
diff --git a/src/main/java/net/minecraft/core/dispenser/ShulkerBoxDispenseBehavior.java b/src/main/java/net/minecraft/core/dispenser/ShulkerBoxDispenseBehavior.java
index 38b5d8f7b66f5130dbd126957a4a1e59ec543e4a..0159ed9cbc644c39fa79e62327f13375193fdc98 100644
index f84987c36a16df19286d6f1badfb1ffb9cc7e770..6f2adf2334e35e8a617a4ced0c1af2abf32bbd8d 100644
--- a/src/main/java/net/minecraft/core/dispenser/ShulkerBoxDispenseBehavior.java
+++ b/src/main/java/net/minecraft/core/dispenser/ShulkerBoxDispenseBehavior.java
@@ -34,7 +34,7 @@ public class ShulkerBoxDispenseBehavior extends OptionalDispenseItemBehavior {
// CraftBukkit start
org.bukkit.block.Block bukkitBlock = pointer.getLevel().getWorld().getBlockAt(pointer.getPos().getX(), pointer.getPos().getY(), pointer.getPos().getZ());
org.bukkit.block.Block bukkitBlock = CraftBlock.at(pointer.level(), pointer.pos());
- CraftItemStack craftItem = CraftItemStack.asCraftMirror(stack);
+ CraftItemStack craftItem = CraftItemStack.asCraftMirror(stack.copyWithCount(1)); // Paper - single item in event
BlockDispenseEvent event = new BlockDispenseEvent(bukkitBlock, craftItem.clone(), new org.bukkit.util.Vector(blockposition.getX(), blockposition.getY(), blockposition.getZ()));
if (!DispenserBlock.eventFired) {
diff --git a/src/main/java/net/minecraft/world/item/ArmorItem.java b/src/main/java/net/minecraft/world/item/ArmorItem.java
index 98aae5bb3cff07fcc081ad4d6c2be8728f3d1637..d7a0cbde8f8c99276307502674c71463fbe7e89c 100644
index a745dc02ae25bcf10cee954b6e53f8b106fd045d..42d87800a328f71c5127ce5599ca4c71cc9bb1cd 100644
--- a/src/main/java/net/minecraft/world/item/ArmorItem.java
+++ b/src/main/java/net/minecraft/world/item/ArmorItem.java
@@ -61,7 +61,7 @@ public class ArmorItem extends Item implements Equipable {
@@ -62,7 +62,7 @@ public class ArmorItem extends Item implements Equipable {
} else {
LivingEntity entityliving = (LivingEntity) list.get(0);
EquipmentSlot enumitemslot = Mob.getEquipmentSlotForItem(armor);
- ItemStack itemstack1 = armor.split(1);
+ ItemStack itemstack1 = armor.copyWithCount(1); // Paper - shrink below and single item in event
// CraftBukkit start
Level world = pointer.getLevel();
org.bukkit.block.Block block = world.getWorld().getBlockAt(pointer.getPos().getX(), pointer.getPos().getY(), pointer.getPos().getZ());
@@ -73,12 +73,13 @@ public class ArmorItem extends Item implements Equipable {
Level world = pointer.level();
org.bukkit.block.Block block = CraftBlock.at(world, pointer.pos());
@@ -74,12 +74,13 @@ public class ArmorItem extends Item implements Equipable {
}
if (event.isCancelled()) {
@ -476,7 +454,7 @@ index 98aae5bb3cff07fcc081ad4d6c2be8728f3d1637..d7a0cbde8f8c99276307502674c71463
// Chain to handler for new item
ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem());
DispenseItemBehavior idispensebehavior = (DispenseItemBehavior) DispenserBlock.DISPENSER_REGISTRY.get(eventStack.getItem());
@@ -95,6 +96,7 @@ public class ArmorItem extends Item implements Equipable {
@@ -96,6 +97,7 @@ public class ArmorItem extends Item implements Equipable {
((Mob) entityliving).setPersistenceRequired();
}
@ -485,19 +463,19 @@ index 98aae5bb3cff07fcc081ad4d6c2be8728f3d1637..d7a0cbde8f8c99276307502674c71463
}
}
diff --git a/src/main/java/net/minecraft/world/item/MinecartItem.java b/src/main/java/net/minecraft/world/item/MinecartItem.java
index 127a799f7848b32664b77bf67847ca6b8ac9a90d..c6d2f764efa9b8bec730bbe757d480e365b25ccc 100644
index 496900fc805e7e3f6206777c9c9b0260839dd9b0..a33395dc5a94d89b5ab273c7832813b6ff9ea3b7 100644
--- a/src/main/java/net/minecraft/world/item/MinecartItem.java
+++ b/src/main/java/net/minecraft/world/item/MinecartItem.java
@@ -62,7 +62,7 @@ public class MinecartItem extends Item {
@@ -64,7 +64,7 @@ public class MinecartItem extends Item {
// CraftBukkit start
// EntityMinecartAbstract entityminecartabstract = EntityMinecartAbstract.createMinecart(worldserver, d0, d1 + d3, d2, ((ItemMinecart) itemstack.getItem()).type);
- ItemStack itemstack1 = stack.split(1);
+ ItemStack itemstack1 = stack.copyWithCount(1); // Paper - shrink below and single item in event
org.bukkit.block.Block block2 = worldserver.getWorld().getBlockAt(pointer.getPos().getX(), pointer.getPos().getY(), pointer.getPos().getZ());
org.bukkit.block.Block block2 = CraftBlock.at(worldserver, pointer.pos());
CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemstack1);
@@ -72,12 +72,13 @@ public class MinecartItem extends Item {
@@ -74,12 +74,13 @@ public class MinecartItem extends Item {
}
if (event.isCancelled()) {
@ -513,7 +491,7 @@ index 127a799f7848b32664b77bf67847ca6b8ac9a90d..c6d2f764efa9b8bec730bbe757d480e3
// Chain to handler for new item
ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem());
DispenseItemBehavior idispensebehavior = (DispenseItemBehavior) DispenserBlock.DISPENSER_REGISTRY.get(eventStack.getItem());
@@ -94,8 +95,7 @@ public class MinecartItem extends Item {
@@ -96,8 +97,7 @@ public class MinecartItem extends Item {
entityminecartabstract.setCustomName(stack.getHoverName());
}

Datei anzeigen

@ -56,10 +56,10 @@ index f1acd19432877a833f0d4339f9de4830a0f7b890..8d38ebfdc976b9695ed367591e58de8c
@Nullable
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java
index 2b3bb4513557e8d81bf2b0a3e10c34cec6a6d43e..c343ae1999672be8be0c982df2fadca8d05ebfa4 100644
index db38c178543e221251ae8c6ad618ad9372af7f40..2f12a1054c9c9e311e02dc5c3244ad3688db15ba 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
@@ -448,7 +448,7 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name
@@ -470,7 +470,7 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name
@Nullable
@Override
public AbstractContainerMenu createMenu(int syncId, Inventory playerInventory, Player player) {

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Add Sneaking API for Entities
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index bc0a46a6f2ae24b40d3997074c9084cdbb595602..1186ee7cc4671892346b7173d10125febcfbf88a 100644
index ba0c1be4f5303bd6a33fd27f4e8c9910a8325695..6915da7ef7f1179f1efb3a959194c573e6b362e9 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -1202,6 +1202,18 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {

Datei anzeigen

@ -5,12 +5,12 @@ Subject: [PATCH] Improve logging and errors
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index b95ad6e975048364876dd47686438688f65773db..ef702b934f75578900b7b3d0156c3ede7411aa4d 100644
index e09a775e0c5ddc46260f0eb3c9454945d9d18299..2702c9672947dcce8b2010fa8a062db7d41a4128 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -3601,7 +3601,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -3371,7 +3371,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
this.resetPlayerChatState(remotechatsession_a.validate(this.player.getGameProfile(), signaturevalidator, Duration.ZERO));
this.resetPlayerChatState(remotechatsession_a.validate(this.player.getGameProfile(), signaturevalidator));
} catch (ProfilePublicKey.ValidationException profilepublickey_b) {
- ServerGamePacketListenerImpl.LOGGER.error("Failed to validate profile key: {}", profilepublickey_b.getMessage());
+ // ServerGamePacketListenerImpl.LOGGER.error("Failed to validate profile key: {}", profilepublickey_b.getMessage()); // Paper - unnecessary log
@ -18,10 +18,10 @@ index b95ad6e975048364876dd47686438688f65773db..ef702b934f75578900b7b3d0156c3ede
}
diff --git a/src/main/java/net/minecraft/server/packs/PathPackResources.java b/src/main/java/net/minecraft/server/packs/PathPackResources.java
index 0232c29d96e1021a9f5a9678996993dc55fe7254..8ad8ad1189d7cdb58caaa39c482d32685afa3f9a 100644
index 89aa86a49eda563c82ccedc99641e699f8e578b0..4822f94ce183a99ad9e0d1bdc6c5708d958f6104 100644
--- a/src/main/java/net/minecraft/server/packs/PathPackResources.java
+++ b/src/main/java/net/minecraft/server/packs/PathPackResources.java
@@ -105,6 +105,12 @@ public class PathPackResources extends AbstractPackResources {
@@ -108,6 +108,12 @@ public class PathPackResources extends AbstractPackResources {
try (DirectoryStream<Path> directoryStream = Files.newDirectoryStream(path)) {
for(Path path2 : directoryStream) {
String string = path2.getFileName().toString();
@ -31,7 +31,7 @@ index 0232c29d96e1021a9f5a9678996993dc55fe7254..8ad8ad1189d7cdb58caaa39c482d3268
+ continue;
+ }
+ // Paper end
if (string.equals(string.toLowerCase(Locale.ROOT))) {
if (ResourceLocation.isValidNamespace(string)) {
set.add(string);
} else {
diff --git a/src/main/java/org/bukkit/craftbukkit/legacy/CraftLegacy.java b/src/main/java/org/bukkit/craftbukkit/legacy/CraftLegacy.java

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Improve PortalEvents
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 32093c96a22221f17411aaf260db071f27350966..9eb0cf5518ee29550526736acef6cbbf8912d6af 100644
index 53f5f0497cbebaf65afe232ba7603f4e14376e46..466518499122eb6c05303d0c547b4712779b97f6 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -3674,7 +3674,14 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -3584,7 +3584,14 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
Location enter = bukkitEntity.getLocation();
Location exit = CraftLocation.toBukkit(exitPosition, exitWorldServer.getWorld());

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Add config option for spider worldborder climbing
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 9eb0cf5518ee29550526736acef6cbbf8912d6af..ca93f7a5484fb93cdfb6bb7749ffbaefb6f43042 100644
index 466518499122eb6c05303d0c547b4712779b97f6..05d351c60e86014b384195c20bfeddcc214b7d4e 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -403,6 +403,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -402,6 +402,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@javax.annotation.Nullable
private UUID originWorld;
public boolean freezeLocked = false; // Paper - Freeze Tick Lock API
@ -16,7 +16,7 @@ index 9eb0cf5518ee29550526736acef6cbbf8912d6af..ca93f7a5484fb93cdfb6bb7749ffbaef
public void setOrigin(@javax.annotation.Nonnull Location location) {
this.origin = location.toVector();
@@ -1469,7 +1470,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -1343,7 +1344,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
io.papermc.paper.util.CollisionUtil.getCollisions(world, this, collisionBox, potentialCollisions, false, this.level.paperConfig().chunks.preventMovingIntoUnloadedChunks,
false, false, null, null);
@ -26,10 +26,10 @@ index 9eb0cf5518ee29550526736acef6cbbf8912d6af..ca93f7a5484fb93cdfb6bb7749ffbaef
}
diff --git a/src/main/java/net/minecraft/world/entity/monster/Spider.java b/src/main/java/net/minecraft/world/entity/monster/Spider.java
index d506091a739b04caf213e8fb0f71b5b78035aa0e..05432184077752b1d0cb764a5e39ed875748b2d6 100644
index 9e5d68fe86d17118df3d6a1c36b296f32b4d7fc1..71b5a9c97a13f703073c0122742ff9e8a0e49df2 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Spider.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Spider.java
@@ -84,7 +84,7 @@ public class Spider extends Monster {
@@ -86,7 +86,7 @@ public class Spider extends Monster {
public void tick() {
super.tick();
if (!this.level().isClientSide) {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Add missing SpigotConfig logCommands check
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index ef702b934f75578900b7b3d0156c3ede7411aa4d..771341996a41723cceb945e18ac8b5adae337d91 100644
index 2702c9672947dcce8b2010fa8a062db7d41a4128..4b8406a5cae41ca6db7170681b50bd23fb0f00d8 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2259,7 +2259,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -2098,7 +2098,9 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
private void performChatCommand(ServerboundChatCommandPacket packet, LastSeenMessages lastSeenMessages) {
// CraftBukkit start
String command = "/" + packet.command();
@ -16,5 +16,5 @@ index ef702b934f75578900b7b3d0156c3ede7411aa4d..771341996a41723cceb945e18ac8b5ad
ServerGamePacketListenerImpl.LOGGER.info(this.player.getScoreboardName() + " issued server command: " + command);
+ } // Paper
PlayerCommandPreprocessEvent event = new PlayerCommandPreprocessEvent(this.getCraftPlayer(), command, new LazyPlayerSet(this.server));
PlayerCommandPreprocessEvent event = new PlayerCommandPreprocessEvent(getCraftPlayer(), command, new LazyPlayerSet(server));
this.cserver.getPluginManager().callEvent(event);

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Flying Fall Damage
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
index 53487f0a4fe672298c3b83d24a2a603641afcde8..58152160d609d0e9d105153aeb166a56a7955603 100644
index 6bf59f8e7f23ffabd2c6f739fe0daf9da6246e1d..d58b4c0dbe651b5068212e5f14dce3164ee520f5 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
@@ -185,6 +185,7 @@ public abstract class Player extends LivingEntity {
@@ -186,6 +186,7 @@ public abstract class Player extends LivingEntity {
public float hurtDir; // Paper - protected -> public
// Paper start
public boolean affectsSpawning = true;
@ -16,7 +16,7 @@ index 53487f0a4fe672298c3b83d24a2a603641afcde8..58152160d609d0e9d105153aeb166a56
// Paper end
// CraftBukkit start
@@ -1758,7 +1759,7 @@ public abstract class Player extends LivingEntity {
@@ -1764,7 +1765,7 @@ public abstract class Player extends LivingEntity {
@Override
public boolean causeFallDamage(float fallDistance, float damageMultiplier, DamageSource damageSource) {
@ -26,10 +26,10 @@ index 53487f0a4fe672298c3b83d24a2a603641afcde8..58152160d609d0e9d105153aeb166a56
} else {
if (fallDistance >= 2.0F) {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index c9775b294dd6982d5064f3553fab1f0f0a667121..e50651a0c9f856d0cfca3b8ee3b664f19393690f 100644
index 7f26c6bff8fcc51d0d1c544225caceb2cb7c2d0c..0c1e4c7c1c57dec05b59e8c89c4534e9015de79d 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2376,6 +2376,19 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2350,6 +2350,19 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
this.getHandle().onUpdateAbilities();
}

Datei anzeigen

@ -41,10 +41,10 @@ index 8bde8c581796ed11809b80b9a30a33df86116745..4604f8b38460e9113e966889a679d454
public DamageSource outOfBorder() {
diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java
index 316df76570a7a6843b5a8ed2c44467a0cdf2a6cd..8f97c9df726ac20cfce7bdddd5dd4f8c5aa76c35 100644
index e6e7ac7c5c31b6ff16a7bae6cc0706d31ea16c07..c1eafcc5b0e6486a6bffc497091e1d48b6b31a7e 100644
--- a/src/main/java/net/minecraft/world/level/Explosion.java
+++ b/src/main/java/net/minecraft/world/level/Explosion.java
@@ -343,7 +343,7 @@ public class Explosion {
@@ -345,7 +345,7 @@ public class Explosion {
bukkitBlocks = event.blockList();
yield = event.getYield();
} else {
@ -130,10 +130,10 @@ index da4609caecc8183d02c301c7cedbca52ed39323f..716021520c228b5bbced525b751f5d41
// See BlockStateFactory#createBlockState(World, BlockPosition, IBlockData, TileEntity)
private static CraftBlockState getBlockState(World world, BlockPos blockPosition, net.minecraft.world.level.block.state.BlockState blockData, BlockEntity tileEntity) {
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index e2a346d2cd813dd64ab61403e531f9ebf221d4b4..ee382cae3feca1de40d95faf6af023c8a7df05b9 100644
index 4b28ae4a9bc9a295457cfcb84a86705db8f18502..52875848c97be4569b03f3ebdb02a332da06e361 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -1018,7 +1018,7 @@ public class CraftEventFactory {
@@ -1020,7 +1020,7 @@ public class CraftEventFactory {
CraftEventFactory.entityDamage = null;
EntityDamageEvent event;
if (damager == null) {

Datei anzeigen

@ -1,18 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jake Potrebic <jake.m.potrebic@gmail.com>
Date: Thu, 23 Jun 2022 19:25:51 -0700
Subject: [PATCH] Track projectile source for fireworks from dispensers
diff --git a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
index f2500cbe0aecf4959921a56c88a8947839a9b0e4..876f44845a02b02c93233b302c7306eff40f1468 100644
--- a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
+++ b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
@@ -516,6 +516,7 @@ public interface DispenseItemBehavior {
itemstack1 = CraftItemStack.asNMSCopy(event.getItem());
FireworkRocketEntity entityfireworks = new FireworkRocketEntity(pointer.getLevel(), itemstack1, pointer.x(), pointer.y(), pointer.x(), true); // Paper - GH-2871 - fix last firework in stack having no effects when dispensed
+ entityfireworks.projectileSource = new org.bukkit.craftbukkit.projectiles.CraftBlockProjectileSource(pointer.getEntity()); // Paper - track projectile source for fireworks
DispenseItemBehavior.setEntityPokingOutOfBlock(pointer, entityfireworks, enumdirection);
entityfireworks.shoot((double) enumdirection.getStepX(), (double) enumdirection.getStepY(), (double) enumdirection.getStepZ(), 0.5F, 1.0F);