13
0
geforkt von Mirrors/Paper

Almost all patches

Dieser Commit ist enthalten in:
Nassim Jahnke 2022-12-07 23:05:32 +01:00
Ursprung f8430d1de7
Commit 93507a8e41
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 6BE3B555EBC5982B
50 geänderte Dateien mit 129 neuen und 178 gelöschten Zeilen

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] Fire EntityChangeBlockEvent in more places
Co-authored-by: ChristopheG <61288881+chrisgdt@users.noreply.github.com>
diff --git a/src/main/java/net/minecraft/world/entity/LightningBolt.java b/src/main/java/net/minecraft/world/entity/LightningBolt.java
index 359c78b4f98c38c81af27a2c4cf0939da51e5a0b..50612c00f53821ccafce94835caf1ba442be299a 100644
index fa37b34cbd49b97ff0dc270b9d8a58ce2c9eddb3..0142aff35dea5bf5aff55e3293fb2d173c97e677 100644
--- a/src/main/java/net/minecraft/world/entity/LightningBolt.java
+++ b/src/main/java/net/minecraft/world/entity/LightningBolt.java
@@ -100,7 +100,7 @@ public class LightningBolt extends Entity {
@@ -98,7 +98,7 @@ public class LightningBolt extends Entity {
}
this.powerLightningRod();
@ -18,7 +18,7 @@ index 359c78b4f98c38c81af27a2c4cf0939da51e5a0b..50612c00f53821ccafce94835caf1ba4
this.gameEvent(GameEvent.LIGHTNING_STRIKE);
}
}
@@ -194,7 +194,7 @@ public class LightningBolt extends Entity {
@@ -192,7 +192,7 @@ public class LightningBolt extends Entity {
}
}
@ -27,7 +27,7 @@ index 359c78b4f98c38c81af27a2c4cf0939da51e5a0b..50612c00f53821ccafce94835caf1ba4
BlockState iblockdata = world.getBlockState(pos);
BlockPos blockposition1;
BlockState iblockdata1;
@@ -208,24 +208,29 @@ public class LightningBolt extends Entity {
@@ -206,24 +206,29 @@ public class LightningBolt extends Entity {
}
if (iblockdata1.getBlock() instanceof WeatheringCopper) {
@ -61,7 +61,7 @@ index 359c78b4f98c38c81af27a2c4cf0939da51e5a0b..50612c00f53821ccafce94835caf1ba4
if (!optional.isPresent()) {
break;
@@ -236,7 +241,7 @@ public class LightningBolt extends Entity {
@@ -234,7 +239,7 @@ public class LightningBolt extends Entity {
}
@ -70,7 +70,7 @@ index 359c78b4f98c38c81af27a2c4cf0939da51e5a0b..50612c00f53821ccafce94835caf1ba4
Iterator iterator = BlockPos.randomInCube(world.random, 10, pos, 1).iterator();
BlockPos blockposition1;
@@ -253,6 +258,7 @@ public class LightningBolt extends Entity {
@@ -251,6 +256,7 @@ public class LightningBolt extends Entity {
BlockPos blockposition1Final = blockposition1; // CraftBukkit - decompile error
WeatheringCopper.getPrevious(iblockdata).ifPresent((iblockdata1) -> {
@ -78,25 +78,8 @@ index 359c78b4f98c38c81af27a2c4cf0939da51e5a0b..50612c00f53821ccafce94835caf1ba4
world.setBlockAndUpdate(blockposition1Final, iblockdata1); // CraftBukkit - decompile error
});
world.levelEvent(3002, blockposition1, -1);
diff --git a/src/main/java/net/minecraft/world/entity/ai/behavior/TryLaySpawnOnWaterNearLand.java b/src/main/java/net/minecraft/world/entity/ai/behavior/TryLaySpawnOnWaterNearLand.java
index 09457cb957d8fef403198b027b33d310e5e5169f..3e7e79e8bf6abfa639a69b827a46047569ad1b0a 100644
--- a/src/main/java/net/minecraft/world/entity/ai/behavior/TryLaySpawnOnWaterNearLand.java
+++ b/src/main/java/net/minecraft/world/entity/ai/behavior/TryLaySpawnOnWaterNearLand.java
@@ -37,6 +37,12 @@ public class TryLaySpawnOnWaterNearLand extends Behavior<Frog> {
if (world.getBlockState(blockPos2).getCollisionShape(world, blockPos2).getFaceShape(Direction.UP).isEmpty() && world.getFluidState(blockPos2).is(Fluids.WATER)) {
BlockPos blockPos3 = blockPos2.above();
if (world.getBlockState(blockPos3).isAir()) {
+ // Paper start
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(entity, blockPos3, this.spawnBlock.defaultBlockState()).isCancelled()) {
+ entity.getBrain().eraseMemory(this.memoryModule); // forgot pregnant memory
+ return;
+ }
+ // Paper end
world.setBlock(blockPos3, this.spawnBlock.defaultBlockState(), 3);
world.playSound((Player)null, entity, SoundEvents.FROG_LAY_SPAWN, SoundSource.BLOCKS, 1.0F, 1.0F);
entity.getBrain().eraseMemory(this.memoryModule);
diff --git a/src/main/java/net/minecraft/world/item/AxeItem.java b/src/main/java/net/minecraft/world/item/AxeItem.java
index 03a6a99dcc0c8fcc32776dd49cf6092b899bf6ed..9c49d8f696864d2aad23208422c4ab5b598a0cd9 100644
index 0bff617f422e7bfececcdc6837ad91db20177388..1c096338a90d740a3813274278056017fa1ec844 100644
--- a/src/main/java/net/minecraft/world/item/AxeItem.java
+++ b/src/main/java/net/minecraft/world/item/AxeItem.java
@@ -54,6 +54,11 @@ public class AxeItem extends DiggerItem {
@ -163,7 +146,7 @@ index 32995cb5efdad0bc34ecacacb78cccd21220ba8d..c7195f2e12bbd6545f7bffcc2b4ba5cc
level.gameEvent(GameEvent.BLOCK_CHANGE, blockPos, GameEvent.Context.of(player, blockState3));
if (player != null) {
diff --git a/src/main/java/net/minecraft/world/level/block/ComposterBlock.java b/src/main/java/net/minecraft/world/level/block/ComposterBlock.java
index 2b1983d61fd3ed856770146de5cdfd33b4f63a46..492e3ffd6a4588a521486db631f3e8b2a25b74ec 100644
index f5c53696a7a5b9dcc09c54a1a68267fd2fb37fa3..564822911c25238900b361d564c5db3103900fb3 100644
--- a/src/main/java/net/minecraft/world/level/block/ComposterBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/ComposterBlock.java
@@ -221,7 +221,14 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Missing eating regain reason
diff --git a/src/main/java/net/minecraft/world/entity/animal/Cat.java b/src/main/java/net/minecraft/world/entity/animal/Cat.java
index ab86bfdaebe9b8791f0cfa6e0c61f80c8f891a93..745883a7b9c2590ae8e28db79e1bd0341a7e54bd 100644
index a0dd4a58937a4e49e430d8c1470fe84b709e8044..0114c1cf3b6b0500149a77ebc190cb7fa2832184 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Cat.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Cat.java
@@ -384,7 +384,7 @@ public class Cat extends TamableAnimal {
@@ -389,7 +389,7 @@ public class Cat extends TamableAnimal implements VariantHolder<CatVariant> {
if (!(item instanceof DyeItem)) {
if (item.isEdible() && this.isFood(itemstack) && this.getHealth() < this.getMaxHealth()) {
this.usePlayerItem(player, hand, itemstack);
@ -18,10 +18,10 @@ index ab86bfdaebe9b8791f0cfa6e0c61f80c8f891a93..745883a7b9c2590ae8e28db79e1bd034
}
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 9aec9f80c564fa3ae03e445423d9e50afc45f837..149be8bf166282e651a375a27ca209010f25d688 100644
index 39c6b9b74e072953abe6398ecfcdd444e6d8f194..7ae0e4b3aa8e861500ddc7b38aa671258b532fcd 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
@@ -211,7 +211,7 @@ public class Llama extends AbstractChestedHorse implements RangedAttackMob {
@@ -217,7 +217,7 @@ public class Llama extends AbstractChestedHorse implements VariantHolder<Llama.V
}
if (this.getHealth() < this.getMaxHealth() && f > 0.0F) {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Missing effect cause
diff --git a/src/main/java/net/minecraft/world/entity/animal/axolotl/Axolotl.java b/src/main/java/net/minecraft/world/entity/animal/axolotl/Axolotl.java
index da5e6141f548539cac720aba558e1b6f3a87e474..e7467fec2cab37c1a9933d1096724e3732913590 100644
index 40869fa047ba86d59ca25f691ddea8c55ed0c6dc..0d7f951e3837de7553d93f3d4525276048feb405 100644
--- a/src/main/java/net/minecraft/world/entity/animal/axolotl/Axolotl.java
+++ b/src/main/java/net/minecraft/world/entity/animal/axolotl/Axolotl.java
@@ -433,7 +433,7 @@ public class Axolotl extends Animal implements LerpingModel, Bucketable {
@@ -428,7 +428,7 @@ public class Axolotl extends Animal implements LerpingModel, VariantHolder<Axolo
player.addEffect(new MobEffectInstance(MobEffects.REGENERATION, i, 0), this, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.AXOLOTL); // CraftBukkit
}
@ -31,15 +31,15 @@ index b9dbe5301b04cb1aa5da3a3ee7560c806ce6a411..c8d6b5e60b6c8c612fa8580c63a32c4a
if (stack.isEmpty()) {
diff --git a/src/main/java/net/minecraft/world/item/SuspiciousStewItem.java b/src/main/java/net/minecraft/world/item/SuspiciousStewItem.java
index 494d1e8e12f15366a77c732271b46fdb9fb28ad1..3f0ee0141b46dcc70bd6b21921503dafa9c847a6 100644
index a4d9bdb63847eb0653a0e0772f7121c1bbaa8459..0d86deac578a3d4af15ed75e94ecd74948eb05cb 100644
--- a/src/main/java/net/minecraft/world/item/SuspiciousStewItem.java
+++ b/src/main/java/net/minecraft/world/item/SuspiciousStewItem.java
@@ -43,7 +43,7 @@ public class SuspiciousStewItem extends Item {
MobEffect mobEffect = MobEffect.byId(compoundTag2.getInt("EffectId"));
if (mobEffect != null) {
- user.addEffect(new MobEffectInstance(mobEffect, j));
+ user.addEffect(new MobEffectInstance(mobEffect, j), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.FOOD); // Paper
}
@@ -71,7 +71,7 @@ public class SuspiciousStewItem extends Item {
@Override
public ItemStack finishUsingItem(ItemStack stack, Level world, LivingEntity user) {
ItemStack itemStack = super.finishUsingItem(stack, world, user);
- listPotionEffects(itemStack, user::addEffect);
+ listPotionEffects(itemStack, effect -> user.addEffect(effect, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.FOOD)); // Paper
return user instanceof Player && ((Player)user).getAbilities().instabuild ? itemStack : new ItemStack(Items.BOWL);
}
}

Datei anzeigen

@ -7,14 +7,14 @@ This causes a moment where the player entity is sent with the previous location,
teleport packet which is sent shortly after is meant to correct that.
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 20f29f0570ceb077dbd92f19b27f36f2fdc925ed..21caac15a397bcbd5a170d71ace21dabd53f6694 100644
index ebefc46c41529659a0f1ce17191b852aabc1668a..d93c4e9218936afff97aa63ad4b8616b638eec85 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -1141,6 +1141,7 @@ public class ServerPlayer extends Player {
@@ -1163,6 +1163,7 @@ public class ServerPlayer extends Player {
// CraftBukkit end
this.setLevel(worldserver);
+ this.moveTo(exit.getX(), exit.getY(), exit.getZ(), exit.getYaw(), exit.getPitch()); // Paper - Set the location before
worldserver.addDuringPortalTeleport(this);
this.connection.teleport(exit); // CraftBukkit - use internal teleport without event
this.connection.resetPosition(); // CraftBukkit - sync position after changing it (from PortalTravelAgent#findAndteleport)
this.connection.resetPosition();
worldserver.addDuringPortalTeleport(this);

Datei anzeigen

@ -5,13 +5,13 @@ Subject: [PATCH] fix Jigsaw block kicking user
diff --git a/src/main/java/net/minecraft/world/level/block/entity/JigsawBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/JigsawBlockEntity.java
index fee4aef1bdae1b1ca57ff0b6c3fd2ec31439c37b..b56e4be3228489b5b910c23bde1717d5d3e2ad9a 100644
index 8efdd41fbd14a2127a6d52577550bb781bc8c5f7..182e16c1d968707a11329150d71b7d01df6c6e52 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/JigsawBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/JigsawBlockEntity.java
@@ -108,7 +108,12 @@ public class JigsawBlockEntity extends BlockEntity {
@@ -109,7 +109,12 @@ public class JigsawBlockEntity extends BlockEntity {
public void generate(ServerLevel world, int maxDepth, boolean keepJigsaws) {
BlockPos blockPos = this.getBlockPos().relative(this.getBlockState().getValue(JigsawBlock.ORIENTATION).front());
Registry<StructureTemplatePool> registry = world.registryAccess().registryOrThrow(Registry.TEMPLATE_POOL_REGISTRY);
Registry<StructureTemplatePool> registry = world.registryAccess().registryOrThrow(Registries.TEMPLATE_POOL);
- Holder<StructureTemplatePool> holder = registry.getHolderOrThrow(this.pool);
+ // Paper start - Replace getHolderOrThrow with a null check
+ Holder<StructureTemplatePool> holder = registry.getHolder(this.pool).orElse(null);
@ -23,10 +23,10 @@ index fee4aef1bdae1b1ca57ff0b6c3fd2ec31439c37b..b56e4be3228489b5b910c23bde1717d5
}
diff --git a/src/main/java/net/minecraft/world/level/levelgen/structure/pools/StructureTemplatePool.java b/src/main/java/net/minecraft/world/level/levelgen/structure/pools/StructureTemplatePool.java
index de7435f6596e200c8511224a0479c2ad499b2a97..bcf9eb1096b09748bcabba05bc9ffac494d3c611 100644
index 2c5165835dede1abc07ff508c820f0fe1a1027d0..194864460a5508b6b60f445d6c7923c2ae14a15b 100644
--- a/src/main/java/net/minecraft/world/level/levelgen/structure/pools/StructureTemplatePool.java
+++ b/src/main/java/net/minecraft/world/level/levelgen/structure/pools/StructureTemplatePool.java
@@ -89,7 +89,13 @@ public class StructureTemplatePool {
@@ -85,7 +85,13 @@ public class StructureTemplatePool {
}
public StructurePoolElement getRandomTemplate(RandomSource random) {

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] use BlockFormEvent for mud converting into clay
diff --git a/src/main/java/net/minecraft/world/level/block/PointedDripstoneBlock.java b/src/main/java/net/minecraft/world/level/block/PointedDripstoneBlock.java
index ef15adf66ea994d15a7d2718dd3d22cd07c31f98..ce4265a9cf01db335a6a88b91ae5e6ff4518ef92 100644
index 24524b673f78da1ce138b72d6d879c2e690f19ea..e78fdd317d59cfca6a28deb6e0bd02aabe91e930 100644
--- a/src/main/java/net/minecraft/world/level/block/PointedDripstoneBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/PointedDripstoneBlock.java
@@ -213,10 +213,13 @@ public class PointedDripstoneBlock extends Block implements Fallable, SimpleWate

Datei anzeigen

@ -43,10 +43,10 @@ index 966ac60daebb7bb211ab8096fc0c5f33db67320a..a8ab1d3ee81664193be39d2735d64951
// Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java
index e4c15fcbd21f70836c26133ef10f3d0da9b6c238..edce55a0cebe245cd944fcc1df735df66c736e43 100644
index 5f0acece20208047e9d17b6e72d77a5f80cb125f..e14a06bcd35422a692254b69d195d8452f43c7fb 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java
@@ -620,4 +620,12 @@ public class CraftBlockData implements BlockData {
@@ -623,4 +623,12 @@ public class CraftBlockData implements BlockData {
return this.state.isRandomlyTicking();
}
// Paper end

Datei anzeigen

@ -72,10 +72,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 c17d9a7cb69d3b6ea6e17b689921fa239db3552b..a4690391df0aa26abea1ad92e6143eb19c5d1143 100644
index 0b0377fa1483e4fcb31456af6c7e1749bd8af484..e9f7c08ae3ea9c578971b1ede88788572c20e277 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
@@ -211,9 +211,10 @@ public class Goat extends Animal {
@@ -236,9 +236,10 @@ public class Goat extends Animal {
player.setItemInHand(hand, itemstack1);
return InteractionResult.sidedSuccess(this.level.isClientSide);
} else {
@ -88,7 +88,7 @@ index c17d9a7cb69d3b6ea6e17b689921fa239db3552b..a4690391df0aa26abea1ad92e6143eb1
}
diff --git a/src/main/java/net/minecraft/world/entity/npc/CatSpawner.java b/src/main/java/net/minecraft/world/entity/npc/CatSpawner.java
index 8808cb9f5df43d781cbb9c7943ff2f222e3a6969..f1315693751cd1058620fae52816f312921b50a4 100644
index f174094febfdfdc309f1b50877be60bae8a98156..5f407535298a31a34cfe114dd863fd6a9b977707 100644
--- a/src/main/java/net/minecraft/world/entity/npc/CatSpawner.java
+++ b/src/main/java/net/minecraft/world/entity/npc/CatSpawner.java
@@ -87,8 +87,8 @@ public class CatSpawner implements CustomSpawner {
@ -137,10 +137,10 @@ index a223959f766ac41aff7aeff80606f5e7c37ebf49..1a90860bc39afb8bade96a5c6c40861d
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 4977f3fad3bfc12fd4c5f9fbe8beea2895247c57..c6aeda6497cb59673b469588142f5f15a338389d 100644
index 1e2af7d3a6d2ad0a298d2f6ac2d8110354282988..cac2768fe520b591990c7bc943ae7e95f49efb31 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
@@ -669,13 +669,10 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit
@@ -663,13 +663,10 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit
@Override
public void fillStackedContents(StackedContents finder) {

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 2b4565dfaff3ee4ea3a49d3195b1336eac5b5b68..cc291b58292d33613a639650a6c55293603bb6e5 100644
index 89e27bf61e1fc24d162dab3c33f942036b1f647e..00cb96f71cc5bd713abfd8b40b7b4418e06d8ad6 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -2555,7 +2555,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -2536,7 +2536,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
if (entity instanceof Mob) {
Mob entityinsentient = (Mob) entity;
@ -17,7 +17,7 @@ index 2b4565dfaff3ee4ea3a49d3195b1336eac5b5b68..cc291b58292d33613a639650a6c55293
String s = "onTrackingStart called during navigation iteration";
Util.logAndPauseIfInIde("onTrackingStart called during navigation iteration", new IllegalStateException("onTrackingStart called during navigation iteration"));
@@ -2640,7 +2640,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -2621,7 +2621,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
if (entity instanceof Mob) {
Mob entityinsentient = (Mob) entity;

Datei anzeigen

@ -7,10 +7,10 @@ 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 20c234e29e7c1f64a0fdbbe92e06efe8c99e6172..0ee023afcf5673df4b069f70ce90a2c3417d71b6 100644
index c3a2b83794c612340edf0bc67f58917f1f96db45..d552deba0a4f20d011defb464d31d8638d37c646 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
@@ -392,7 +392,7 @@ public class PiglinAi {
@@ -402,7 +402,7 @@ public class PiglinAi {
} else {
boolean flag = piglin.canAddToInventory(stack);

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 793576928dad6752dddd86e62d4c0800d8515fc4..abeb7285dc0d1e6687feaae8be2dbde1d61b7f11 100644
index 7b42f7bd100808cb2367d0d7c7361e8f2e597502..afa7ecfa8453da510ec5ccecb1ceeb1d9893d259 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
@@ -413,7 +413,7 @@ public class Piglin extends AbstractPiglin implements CrossbowAttackMob, Invento
@@ -432,7 +432,7 @@ public class Piglin extends AbstractPiglin implements CrossbowAttackMob, Invento
@Override
protected void pickUpItem(ItemEntity item) {
@ -25,10 +25,10 @@ index 793576928dad6752dddd86e62d4c0800d8515fc4..abeb7285dc0d1e6687feaae8be2dbde1
}
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 0ee023afcf5673df4b069f70ce90a2c3417d71b6..eedb4445c3aa47f09f5964fafff5e6f7f8b02c02 100644
index d552deba0a4f20d011defb464d31d8638d37c646..2e107f10d497a5696c7bc90ae3c5ecea98edb3e1 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
@@ -231,7 +231,10 @@ public class PiglinAi {
@@ -241,7 +241,10 @@ public class PiglinAi {
ItemStack itemstack;
// CraftBukkit start
@ -40,7 +40,7 @@ index 0ee023afcf5673df4b069f70ce90a2c3417d71b6..eedb4445c3aa47f09f5964fafff5e6f7
piglin.take(drop, drop.getItem().getCount());
itemstack = drop.getItem();
drop.discard();
@@ -241,6 +244,7 @@ public class PiglinAi {
@@ -251,6 +254,7 @@ public class PiglinAi {
} else {
return;
}

Datei anzeigen

@ -5,7 +5,7 @@ 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 5a60f5dc202c44b06ca34e9a19d45cb715f74fd3..0a5f8d990cce5df339fd9b2b0fcb291a20ddad41 100644
index 13031576c20bda3bb12c926f6cd938fa5fb105f2..58b093bb1de78ee3b3b2ea364aa50474883f443a 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
@@ -512,6 +512,7 @@ public class ServerPlayerGameMode {
@ -14,9 +14,9 @@ index 5a60f5dc202c44b06ca34e9a19d45cb715f74fd3..0a5f8d990cce5df339fd9b2b0fcb291a
boolean cancelledBlock = false;
+ boolean cancelledItem = false; // Paper - correctly handle items on cooldown
if (this.gameModeForPlayer == GameType.SPECTATOR) {
MenuProvider itileinventory = iblockdata.getMenuProvider(world, blockposition);
@@ -519,10 +520,10 @@ public class ServerPlayerGameMode {
if (!iblockdata.getBlock().isEnabled(world.enabledFeatures())) {
return InteractionResult.FAIL;
@@ -521,10 +522,10 @@ public class ServerPlayerGameMode {
}
if (player.getCooldowns().isOnCooldown(stack.getItem())) {
@ -30,7 +30,7 @@ index 5a60f5dc202c44b06ca34e9a19d45cb715f74fd3..0a5f8d990cce5df339fd9b2b0fcb291a
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 3bdde2057c9c2ac0e12cf3edab1c3150838dce01..03b3f29bde2bf6cb4e7b08a775bcc380a9404543 100644
index debaeb0ccf78c6a65efa13c8158d1ef4d90bdedd..ae59a1259db4c4cef6f0cd128850229a63491845 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -498,6 +498,12 @@ public class CraftEventFactory {

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 21caac15a397bcbd5a170d71ace21dabd53f6694..3b122f521c166253f20d233c0fcebdede6660be5 100644
index d93c4e9218936afff97aa63ad4b8616b638eec85..2be3a70bfde48b17f7a3680a8df966f9aa92d05b 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -318,6 +318,25 @@ public class ServerPlayer extends Player {
@@ -323,6 +323,25 @@ public class ServerPlayer extends Player {
}
}
@ -35,10 +35,10 @@ index 21caac15a397bcbd5a170d71ace21dabd53f6694..3b122f521c166253f20d233c0fcebded
@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 49b063655dfc09e30d446dbf07503fdda04a7e30..1ad44a49c1da9ede750984306960282f0df5844c 100644
index 495c605b36e2e1430988030d6c44675e0aaffd2f..4e471b19f1053bf6fd0979d4446a1361edf25aa2 100644
--- a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java
+++ b/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java
@@ -301,7 +301,7 @@ public abstract class AbstractContainerMenu {
@@ -302,7 +302,7 @@ public abstract class AbstractContainerMenu {
while (iterator.hasNext()) {
ContainerListener icrafting = (ContainerListener) iterator.next();

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 e5248ea5abfe693f62175d69288f5b686f3ebebe..66830ccee464083879f79db4111e08fecee417ec 100644
index a511e41a1bba469a3d21f758f6e363bd95ecc49c..6082d9279505f518100bc88e011e433d69d95897 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2936,6 +2936,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2938,6 +2938,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
// Paper end

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 5962f7a2b185d7d54a0f9e341a4fdf6e6f1c1ec5..0066b1abc008d245825abf1d256cb87fa9c2d877 100644
index 6a5698f05a5f839e643e747c21834aacb90feec8..31faf2d6492696f7d0c99a48edbc0d6f15db1209 100644
--- a/src/main/java/net/minecraft/server/Main.java
+++ b/src/main/java/net/minecraft/server/Main.java
@@ -155,6 +155,18 @@ public class Main {
@@ -158,6 +158,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 3f31a3c17ecca6e93b794478129b95ecff4e1a9c..c71120fe57a76c4638be5dcbda5a756cc2d62ffc 100644
index fc95865a52e0bffaf55ca9f19e7e6005dcd2ae2e..eec7d7a5b558830111831792c42665724613af23 100644
--- a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java
+++ b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java
@@ -143,7 +143,15 @@ public abstract class AbstractMinecart extends Entity {
@@ -142,7 +142,15 @@ public abstract class AbstractMinecart extends Entity {
@Override
public boolean canCollideWith(Entity other) {

Datei anzeigen

@ -31,19 +31,19 @@ index acc25fb309568864dd7b53ad6a7a3ee6ff18e82a..49f52baa02db18af6d8626754423ff15
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 6a66b5d1a3d8615dcc15057f03476e9ccbf4b4f2..06b11bdbccd76f166561bcaff444066cc46b4663 100644
index e4edeeb04fd7183514e53e20dcef8aca56f02f7d..bc2b98c9f34ad2b289f5da91d704bd836edec8c1 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Fox.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Fox.java
@@ -421,7 +421,7 @@ public class Fox extends Animal {
@@ -426,7 +426,7 @@ public class Fox extends Animal implements VariantHolder<Fox.Type> {
this.setSleeping(nbt.getBoolean("Sleeping"));
this.setFoxType(Fox.Type.byName(nbt.getString("Type")));
this.setVariant(Fox.Type.byName(nbt.getString("Type")));
- this.setSitting(nbt.getBoolean("Sitting"));
+ this.setSitting(nbt.getBoolean("Sitting"), false); // Paper
this.setIsCrouching(nbt.getBoolean("Crouching"));
if (this.level instanceof ServerLevel) {
this.setTargetGoals();
@@ -434,6 +434,12 @@ public class Fox extends Animal {
@@ -439,6 +439,12 @@ public class Fox extends Animal implements VariantHolder<Fox.Type> {
}
public void setSitting(boolean sitting) {
@ -57,10 +57,10 @@ index 6a66b5d1a3d8615dcc15057f03476e9ccbf4b4f2..06b11bdbccd76f166561bcaff444066c
}
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 a5633cb6824e801732f5ca2dbc01691794a6975b..87c9f1cba8eac70d54576d6ffb6f85fc5dcb8e8a 100644
index 0a18108fda778af5b600f77533770bd98584d60e..9c1e02c3a990cd0f8bba1c84c170b438278c02a7 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Panda.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Panda.java
@@ -131,6 +131,7 @@ public class Panda extends Animal {
@@ -132,6 +132,7 @@ public class Panda extends Animal {
}
public void sit(boolean sitting) {

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Add fire-tick-delay option
diff --git a/src/main/java/net/minecraft/world/level/block/FireBlock.java b/src/main/java/net/minecraft/world/level/block/FireBlock.java
index f17233ea94d61af41b4db1696b114e9c721466f8..2a0ab0568e93d610d75bf32d19eee56688bbaf97 100644
index cfddfcad9b09970b28dccd2dcd80be2c2dbed0e7..3d3f6b85c8463963d1ba557fab1de7a32cfd1a2f 100644
--- a/src/main/java/net/minecraft/world/level/block/FireBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/FireBlock.java
@@ -164,7 +164,7 @@ public class FireBlock extends BaseFireBlock {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Ignore impossible spawn tick
diff --git a/src/main/java/net/minecraft/world/level/BaseSpawner.java b/src/main/java/net/minecraft/world/level/BaseSpawner.java
index 572982353530663825ab2d576c3277197a5715a3..641709c3a2575dbe79165beff814cb77fa7dbdc1 100644
index b53fc8ca05fb44e6cb7ab6b27b8371b56795fe98..eae23b8cc808bbb4ca8fa804a4af6d6c15da9f1c 100644
--- a/src/main/java/net/minecraft/world/level/BaseSpawner.java
+++ b/src/main/java/net/minecraft/world/level/BaseSpawner.java
@@ -77,6 +77,7 @@ public abstract class BaseSpawner {
@@ -80,6 +80,7 @@ public abstract class BaseSpawner {
}
public void serverTick(ServerLevel world, BlockPos pos) {

Datei anzeigen

@ -5,10 +5,10 @@ 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 3d2b5f040715a0e4fac0e6786bd11a4d715330ce..9d601bf258a6d209a889afa7ba7f839c01f83cd8 100644
index c0c31a5d356d0754b478d84f0cef87fc84c4fea1..a548d09fa7646254c34f41d30fbc1300e7cef3c1 100644
--- a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
+++ b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
@@ -511,6 +511,7 @@ public interface DispenseItemBehavior {
@@ -512,6 +512,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

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 f2908cf61ff28bef44fcf46b15cf585e942fd7ce..6fa47becd0f83ac4273ef3a10c314aa27b08184b 100644
index 23a2551fa27a0882f939268ab1595c20b81194e7..407d954935a5213a31329c4008f262c450118422 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -3136,6 +3136,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -3155,6 +3155,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 4b2495aed39450eb148627a0787848fd7c35f1f9..0ea101f155936f7c340d9e1d1077c58b72551027 100644
index 2a770125bf31906a3def5e563fbfcc283c39127d..8742dc6efdbc9f80fabab78061c448da7953554e 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
@@ -1251,8 +1251,17 @@ public abstract class Player extends LivingEntity {
@@ -1233,8 +1233,17 @@ public abstract class Player extends LivingEntity {
}
public void attack(Entity target) {

Datei anzeigen

@ -6,10 +6,10 @@ 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 c36a543f091447ad50beb71741de3301e4fb81e3..a9052dd27005d244a96511fc5dbfa92f20a21f46 100644
index 8cf4ae35eb66e69de32295d707db6845b4b02962..e9eb32469a5c03f7a3677ef50fd4541c1ed662ad 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
@@ -67,7 +67,8 @@ public class EndDragonFight {
@@ -68,7 +68,8 @@ public class EndDragonFight {
private static final int GATEWAY_DISTANCE = 96;
public static final int DRAGON_SPAWN_Y = 128;
private static final Predicate<Entity> VALID_PLAYER = EntitySelector.ENTITY_STILL_ALIVE.and(EntitySelector.withinDistance(0.0D, 128.0D, 0.0D, 192.0D));
@ -19,7 +19,7 @@ index c36a543f091447ad50beb71741de3301e4fb81e3..a9052dd27005d244a96511fc5dbfa92f
public final ServerLevel level;
private final ObjectArrayList<Integer> gateways = new ObjectArrayList<>();
private final BlockPattern exitPortalPattern;
@@ -440,6 +441,10 @@ public class EndDragonFight {
@@ -450,6 +451,10 @@ public class EndDragonFight {
this.ticksSinceDragonSeen = 0;
if (dragon.hasCustomName()) {
this.dragonEvent.setName(dragon.getDisplayName());

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] fix MC-252817 (green map markers do not disappear).
this bug is caused by the fact that the itemframe's item is set to empty before the green marker is requested to be removed. this is fixed by getting the mapid from this method's parameter, rather than the air block now stored by the item frame.
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 d2a77b4ca343d19e1c70afe3f3906a9bd53d0eec..b9cb39efe14a877ddedc5a5e4141ee5199ea8daf 100644
index db60d29b051bad8d115b333e6c72287860a73123..428523feaa4f30260e32ba03937e88200246c693 100644
--- a/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java
+++ b/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java
@@ -283,7 +283,9 @@ public class ItemFrame extends HangingEntity {
@@ -284,7 +284,9 @@ public class ItemFrame extends HangingEntity {
}
private void removeFramedMap(ItemStack itemstack) {
@ -20,7 +20,7 @@ index d2a77b4ca343d19e1c70afe3f3906a9bd53d0eec..b9cb39efe14a877ddedc5a5e4141ee51
MapItemSavedData worldmap = MapItem.getSavedData(i, this.level);
if (worldmap != null) {
@@ -301,7 +303,12 @@ public class ItemFrame extends HangingEntity {
@@ -302,7 +304,12 @@ public class ItemFrame extends HangingEntity {
public OptionalInt getFramedMapId() {
ItemStack itemstack = this.getItem();

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] Reorder bukkit damage source entity for explosion to exclude
diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java
index 01477e7240f9e33d08d416a7d40ee10f3e5d4abf..31708d1e94b557896d42199aa0bc6ed26a4c6d8a 100644
index 446b0e74c406d3d57268d8332ea4c29a4dd5f9eb..e7ce14ab0732034107e735787354a6fb0ec90f54 100644
--- a/src/main/java/net/minecraft/world/level/Explosion.java
+++ b/src/main/java/net/minecraft/world/level/Explosion.java
@@ -239,8 +239,6 @@ public class Explosion {
@@ -235,8 +235,6 @@ public class Explosion {
double d13 = (1.0D - d7) * d12;
// CraftBukkit start
@ -18,7 +18,7 @@ index 01477e7240f9e33d08d416a7d40ee10f3e5d4abf..31708d1e94b557896d42199aa0bc6ed2
// Special case ender dragon only give knockback if no damage is cancelled
// Thinks to note:
@@ -252,6 +250,11 @@ public class Explosion {
@@ -248,6 +246,11 @@ public class Explosion {
continue;
}

Datei anzeigen

@ -9,10 +9,10 @@ clear the CombatTracker if the entity is dead. This fixes death messages
such as the "doomed to fall" messages.
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 763b065adee8fad24c6cc6898338ab57c6380baa..b4095a3e97e0d7f6fce66869bd88083c9c0cdbe5 100644
index 6d682a78c6fe4cbf44cd20449cfe89d530e1d28c..cd57fde197f622e5315c4a63936a9b66f5f05916 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -2194,8 +2194,10 @@ public abstract class LivingEntity extends Entity {
@@ -2207,8 +2207,10 @@ public abstract class LivingEntity extends Entity {
// CraftBukkit end
float f3 = this.getHealth();

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 66830ccee464083879f79db4111e08fecee417ec..a5220a4e514865c70700527bcd2f941d852564c0 100644
index 6082d9279505f518100bc88e011e433d69d95897..de6e79180f242a006310adad40b041f5ac6a2a3f 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2941,6 +2941,41 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2943,6 +2943,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 10b45ec24a5a0867106d1694312385ad1e267f43..49f82c954155115b2caa87d7624521a9f7982be2 100644
index ec46a095a26af507fdee0485f7c519c14decc95f..a62f69210ac63c44ade4f3ce9379071b93122afb 100644
--- a/src/main/java/net/minecraft/world/entity/npc/Villager.java
+++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java
@@ -919,6 +919,12 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
@@ -923,6 +923,12 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
@Override
protected void updateTrades() {
@ -21,7 +21,7 @@ index 10b45ec24a5a0867106d1694312385ad1e267f43..49f82c954155115b2caa87d7624521a9
VillagerData villagerdata = this.getVillagerData();
Int2ObjectMap<VillagerTrades.ItemListing[]> int2objectmap = (Int2ObjectMap) VillagerTrades.TRADES.get(villagerdata.getProfession());
@@ -928,9 +934,11 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
@@ -932,9 +938,11 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
if (avillagertrades_imerchantrecipeoption != null) {
MerchantOffers merchantrecipelist = this.getOffers();
@ -35,7 +35,7 @@ index 10b45ec24a5a0867106d1694312385ad1e267f43..49f82c954155115b2caa87d7624521a9
public void gossip(ServerLevel world, Villager villager, long time) {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java
index d1f5e1292246e0fb252d3d3409bbf37cc8166bbc..9220b1a7aa30ba59ac8dc6196859923b0675d8ec 100644
index 11e44a81934255fd4efa418009d8bb78c785cfd5..e0c083f54434120609cd95824cab509fa6c93427 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java
@@ -99,6 +99,34 @@ public class CraftVillager extends CraftAbstractVillager implements Villager {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] check global player list where appropriate
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index cc291b58292d33613a639650a6c55293603bb6e5..79aa3374fd47cd57d2e0810bb5afebbdb38a1892 100644
index 00cb96f71cc5bd713abfd8b40b7b4418e06d8ad6..6f76c17488c5855e86c145dbcfbdba80dacc232c 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -2677,4 +2677,12 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -2658,4 +2658,12 @@ public class ServerLevel extends Level implements WorldGenLevel {
entity.updateDynamicGameEventListener(DynamicGameEventListener::move);
}
}
@ -22,10 +22,10 @@ index cc291b58292d33613a639650a6c55293603bb6e5..79aa3374fd47cd57d2e0810bb5afebbd
+ // 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 b4095a3e97e0d7f6fce66869bd88083c9c0cdbe5..fb6fd9357f665a001238384475a9b674715700ba 100644
index cd57fde197f622e5315c4a63936a9b66f5f05916..cf0c087528fc6113a59e38b99fcf11406d1aa87c 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -3584,7 +3584,7 @@ public abstract class LivingEntity extends Entity {
@@ -3609,7 +3609,7 @@ public abstract class LivingEntity extends Entity {
}
public void onItemPickup(ItemEntity item) {
@ -48,10 +48,10 @@ index 6216513805add7c8f52e1ed6c77e2d26786b3ab5..3c4d142e982c34a23bdb5da1f51c8dca
return entityhuman instanceof ServerPlayer ? (ServerPlayer) entityhuman : null;
}
diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
index fcc5444a1268931a0fd2df1e6bbbc17cfd5a61e0..da877bfb87c34f83991dd0957f6042c7543edb3e 100644
index d9da6728d60e97eb9032b0a5aa71757d11f36e22..b0976c20c0b7ff0637809ed2082771f5b6f10b7a 100644
--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
+++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
@@ -98,7 +98,7 @@ public class ItemEntity extends Entity {
@@ -96,7 +96,7 @@ public class ItemEntity extends Entity {
Level world = this.level;
Objects.requireNonNull(this.level);
@ -61,10 +61,10 @@ index fcc5444a1268931a0fd2df1e6bbbc17cfd5a61e0..da877bfb87c34f83991dd0957f6042c7
@Override
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 fb0a77b4cf1ba47c73c00993bd9b7454240fe5d6..d1f7d912ad274cf90a912e44d63b39f9387a694b 100644
index aabedf25fa40ffa0d7b378c6006928f806ef0fa6..71a36cf9b976443cca9ab63cd0eb23253f638562 100644
--- a/src/main/java/net/minecraft/world/entity/monster/ZombieVillager.java
+++ b/src/main/java/net/minecraft/world/entity/monster/ZombieVillager.java
@@ -268,7 +268,7 @@ public class ZombieVillager extends Zombie implements VillagerDataHolder {
@@ -269,7 +269,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) {
@ -74,7 +74,7 @@ index fb0a77b4cf1ba47c73c00993bd9b7454240fe5d6..d1f7d912ad274cf90a912e44d63b39f9
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 87beea39636b641dc5b46c2755a00285b7671ac5..6e55f383f48e9a304b0acd541728394615dc6478 100644
index d860ddae508f53d06f74d8ae0efdfc500c1ddf07..3b959f42d958bf0f426853aee56753d6c455fcdb 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 {
@ -90,7 +90,7 @@ index 87beea39636b641dc5b46c2755a00285b7671ac5..6e55f383f48e9a304b0acd5417283946
+ // Paper end
}
diff --git a/src/main/java/net/minecraft/world/level/block/entity/SculkShriekerBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/SculkShriekerBlockEntity.java
index ec0eba674c940ee1d743cd32f9c2b690868757e0..5c4cf21fc64ad5cfc3896ac7e13d814dd44be6f4 100644
index f027c2967fcaf5c22abb03c977689485983382c4..0554afa72ae6d2f01886916031c8b90b0d45eb52 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/SculkShriekerBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/SculkShriekerBlockEntity.java
@@ -100,6 +100,13 @@ public class SculkShriekerBlockEntity extends BlockEntity implements VibrationLi

Datei anzeigen

@ -5,10 +5,10 @@ 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 80c1e0e47818486a68e0114b063395290365346b..0d3587e2d454fb0994ecff930b5e496a3999746a 100644
index 52fd12c474c01f3b53d0f6596b7a6fafee52bd0d..877498729c66de9aa6a27c9148f7494d7895615c 100644
--- a/src/main/java/net/minecraft/server/level/WorldGenRegion.java
+++ b/src/main/java/net/minecraft/server/level/WorldGenRegion.java
@@ -227,6 +227,7 @@ public class WorldGenRegion implements WorldGenLevel {
@@ -228,6 +228,7 @@ public class WorldGenRegion implements WorldGenLevel {
if (iblockdata.isAir()) {
return false;
} else {
@ -17,10 +17,10 @@ index 80c1e0e47818486a68e0114b063395290365346b..0d3587e2d454fb0994ecff930b5e496a
BlockEntity tileentity = iblockdata.hasBlockEntity() ? this.getBlockEntity(pos) : null;
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
index afa802987f96e7d0c5f28d26b759e36edf34b8f4..32865ef1903a5e499b27c82fd5be90aa084744cb 100644
index c6f896c230f343af2d825f0dff458a0e4578dbe8..99a9b348f6a2db4a1c41abc19b9b37dc4280c5a3 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
@@ -372,10 +372,10 @@ public abstract class CraftRegionAccessor implements RegionAccessor {
@@ -375,10 +375,10 @@ public abstract class CraftRegionAccessor implements RegionAccessor {
((ChorusFlowerBlock) Blocks.CHORUS_FLOWER).generatePlant(access, pos, random, 8);
return true;
case CRIMSON_FUNGUS:

Datei anzeigen

@ -5,10 +5,10 @@ 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 fb6fd9357f665a001238384475a9b674715700ba..11d7c42d65b91bf57b7bba7812aa17e60e018c67 100644
index cf0c087528fc6113a59e38b99fcf11406d1aa87c..9e075de3542bda8ae086c9ca68bcd00b16d565d0 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -264,6 +264,7 @@ public abstract class LivingEntity extends Entity {
@@ -265,6 +265,7 @@ public abstract class LivingEntity extends Entity {
public boolean bukkitPickUpLoot;
public org.bukkit.craftbukkit.entity.CraftLivingEntity getBukkitLivingEntity() { return (org.bukkit.craftbukkit.entity.CraftLivingEntity) super.getBukkitEntity(); } // Paper
public boolean silentDeath = false; // Paper - mark entity as dying silently for cancellable death event
@ -16,7 +16,7 @@ index fb6fd9357f665a001238384475a9b674715700ba..11d7c42d65b91bf57b7bba7812aa17e6
@Override
public float getBukkitYaw() {
@@ -706,7 +707,7 @@ public abstract class LivingEntity extends Entity {
@@ -705,7 +706,7 @@ public abstract class LivingEntity extends Entity {
}
public boolean shouldDiscardFriction() {
@ -25,7 +25,7 @@ index fb6fd9357f665a001238384475a9b674715700ba..11d7c42d65b91bf57b7bba7812aa17e6
}
public void setDiscardFriction(boolean noDrag) {
@@ -751,6 +752,11 @@ public abstract class LivingEntity extends Entity {
@@ -750,6 +751,11 @@ public abstract class LivingEntity extends Entity {
@Override
public void addAdditionalSaveData(CompoundTag nbt) {
@ -37,7 +37,7 @@ index fb6fd9357f665a001238384475a9b674715700ba..11d7c42d65b91bf57b7bba7812aa17e6
nbt.putFloat("Health", this.getHealth());
nbt.putShort("HurtTime", (short) this.hurtTime);
nbt.putInt("HurtByTimestamp", this.lastHurtByMobTimestamp);
@@ -793,6 +799,15 @@ public abstract class LivingEntity extends Entity {
@@ -792,6 +798,15 @@ public abstract class LivingEntity extends Entity {
absorptionAmount = 0;
}
this.setAbsorptionAmount(absorptionAmount);
@ -54,10 +54,10 @@ index fb6fd9357f665a001238384475a9b674715700ba..11d7c42d65b91bf57b7bba7812aa17e6
if (nbt.contains("Attributes", 9) && this.level != null && !this.level.isClientSide) {
this.getAttributes().load(nbt.getList("Attributes", 10));
diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
index da877bfb87c34f83991dd0957f6042c7543edb3e..c8d8fdef7b8abc0f59b7d19462825ae30c8d4f48 100644
index b0976c20c0b7ff0637809ed2082771f5b6f10b7a..f0ccdfbd7d7be8c6e302609accf8fe9cac8885c4 100644
--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
+++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
@@ -55,6 +55,7 @@ public class ItemEntity extends Entity {
@@ -53,6 +53,7 @@ public class ItemEntity extends Entity {
private int lastTick = MinecraftServer.currentTick - 1; // CraftBukkit
public boolean canMobPickup = true; // Paper
private int despawnRate = -1; // Paper
@ -65,7 +65,7 @@ index da877bfb87c34f83991dd0957f6042c7543edb3e..c8d8fdef7b8abc0f59b7d19462825ae3
public ItemEntity(EntityType<? extends ItemEntity> type, Level world) {
super(type, world);
@@ -152,7 +153,11 @@ public class ItemEntity extends Entity {
@@ -150,7 +151,11 @@ public class ItemEntity extends Entity {
this.move(MoverType.SELF, this.getDeltaMovement());
float f1 = 0.98F;
@ -78,7 +78,7 @@ index da877bfb87c34f83991dd0957f6042c7543edb3e..c8d8fdef7b8abc0f59b7d19462825ae3
f1 = this.level.getBlockState(new BlockPos(this.getX(), this.getY() - 1.0D, this.getZ())).getBlock().getFriction() * 0.98F;
}
@@ -353,6 +358,11 @@ public class ItemEntity extends Entity {
@@ -351,6 +356,11 @@ public class ItemEntity extends Entity {
@Override
public void addAdditionalSaveData(CompoundTag nbt) {
@ -90,7 +90,7 @@ index da877bfb87c34f83991dd0957f6042c7543edb3e..c8d8fdef7b8abc0f59b7d19462825ae3
nbt.putShort("Health", (short) this.health);
nbt.putShort("Age", (short) this.age);
nbt.putShort("PickupDelay", (short) this.pickupDelay);
@@ -386,6 +396,17 @@ public class ItemEntity extends Entity {
@@ -384,6 +394,17 @@ public class ItemEntity extends Entity {
this.thrower = nbt.getUUID("Thrower");
}

Datei anzeigen

@ -29,7 +29,7 @@ index a00c3d96f2fc7131d1f4afa7af4e41ace3cfce89..72abebff2018cde2922e97ad6478f93d
private EntitySelector() {}
// Paper start
diff --git a/src/main/java/net/minecraft/world/level/levelgen/PhantomSpawner.java b/src/main/java/net/minecraft/world/level/levelgen/PhantomSpawner.java
index 2093d08bccbfbe096ea24cc4f70cbfdfa07d6a56..ee299451437822544f0c79cc878110c959ec5dc4 100644
index 24fa62da17ad6c84d45c6fb726305a87df85d2aa..1c3718d9244513d9fc795dceb564a81375734557 100644
--- a/src/main/java/net/minecraft/world/level/levelgen/PhantomSpawner.java
+++ b/src/main/java/net/minecraft/world/level/levelgen/PhantomSpawner.java
@@ -35,13 +35,22 @@ public class PhantomSpawner implements CustomSpawner {

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 3b122f521c166253f20d233c0fcebdede6660be5..9c9b4d7e0637348a94befce9377fdb69c1239694 100644
index 2be3a70bfde48b17f7a3680a8df966f9aa92d05b..cb4a4f097c4c471e9e649827fd3c1e98a1cb911b 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -287,6 +287,13 @@ public class ServerPlayer extends Player {
@@ -292,6 +292,13 @@ public class ServerPlayer extends Player {
}
@ -26,10 +26,10 @@ index 3b122f521c166253f20d233c0fcebdede6660be5..9c9b4d7e0637348a94befce9377fdb69
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 1ad44a49c1da9ede750984306960282f0df5844c..ec6c56c0564eae390de25f967d5d3d6443564ff2 100644
index 4e471b19f1053bf6fd0979d4446a1361edf25aa2..95ba37458e8154dbce6a8590508840d694fcbed1 100644
--- a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java
+++ b/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java
@@ -199,6 +199,7 @@ public abstract class AbstractContainerMenu {
@@ -200,6 +200,7 @@ public abstract class AbstractContainerMenu {
if (this.synchronizer != null) {
this.synchronizer.sendInitialData(this, this.remoteSlots, this.remoteCarried, this.remoteDataSlots.toIntArray());

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Player Entity Tracking Events
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 6fa47becd0f83ac4273ef3a10c314aa27b08184b..22cd5f0e40d7e3cd04793a9dda29d113428fa093 100644
index 407d954935a5213a31329c4008f262c450118422..7f94da8059147760cbdc2476d0e8beda4a105f40 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -3796,9 +3796,21 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -3840,9 +3840,21 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
EnchantmentHelper.doPostDamageEffects(attacker, target);
}

Datei anzeigen

@ -1,32 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: FriwiDev <friwidev@gmail.com>
Date: Mon, 3 Oct 2022 18:16:30 +0200
Subject: [PATCH] Fix nothing mlg
The issue here is that when jumping and sneaking right before
the end of a long fall, the client will send incorrect move
packets resulting in a teleport back. Due to this, the move
packet (impact) of the player will not be considered for fall
damage. The following move packet to the impact packet will
have a positive y-value again due to the player jumping,
resulting in a fall damage reset.
Solution: Apply fall damage also while moving wrongly, but
supply the real values the player sent to the damage calculation.
This will not have any real negative effect, as the
doCheckFallDamage method is meant to be called repeatedly anyway.
Mojira-ID: MC-255653
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index fddd60ab705f548e54fc741ad9c5b13fde8c852d..d31a345edfffe39f127073fc3aec8b3489bae79c 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1564,6 +1564,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
}
if (!this.player.noPhysics && !this.player.isSleeping() && teleportBack) { // Paper end - optimise out extra getCubes
this.internalTeleport(d3, d4, d5, f, f1, Collections.emptySet(), false); // 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.getY() - prevY, packet.isOnGround()); // Paper - fix nothing mlg (sneaking and jumping before impact)
} else {
// CraftBukkit start - fire PlayerMoveEvent
// Rest to old location first