From 912e35ba5e47edde968bdee86f48624e20f80890 Mon Sep 17 00:00:00 2001 From: Noah van der Aa Date: Wed, 28 May 2025 15:32:29 +0200 Subject: [PATCH] work --- .../world/entity/monster/Creeper.java.patch | 34 +++++------ .../world/entity/monster/Slime.java.patch | 57 ++++++++----------- .../world/entity/monster/Vex.java.patch | 18 ++---- .../world/entity/monster/Zombie.java.patch | 54 ++++++++---------- .../chunk/status/ChunkStatusTasks.java.patch | 26 ++++----- 5 files changed, 77 insertions(+), 112 deletions(-) rename paper-server/patches/{rejected => sources}/net/minecraft/world/entity/monster/Creeper.java.patch (84%) rename paper-server/patches/{rejected => sources}/net/minecraft/world/entity/monster/Slime.java.patch (83%) rename paper-server/patches/{rejected => sources}/net/minecraft/world/entity/monster/Vex.java.patch (58%) rename paper-server/patches/{rejected => sources}/net/minecraft/world/entity/monster/Zombie.java.patch (87%) rename paper-server/patches/{rejected => sources}/net/minecraft/world/level/chunk/status/ChunkStatusTasks.java.patch (81%) diff --git a/paper-server/patches/rejected/net/minecraft/world/entity/monster/Creeper.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/monster/Creeper.java.patch similarity index 84% rename from paper-server/patches/rejected/net/minecraft/world/entity/monster/Creeper.java.patch rename to paper-server/patches/sources/net/minecraft/world/entity/monster/Creeper.java.patch index 41a073668b..a0754ed3e1 100644 --- a/paper-server/patches/rejected/net/minecraft/world/entity/monster/Creeper.java.patch +++ b/paper-server/patches/sources/net/minecraft/world/entity/monster/Creeper.java.patch @@ -1,14 +1,6 @@ -From 09671551669244ef4f259d8b27547e463d6795d4 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 15:37:42 +0200 -Subject: [PATCH] paper File Patches - - -diff --git a/net/minecraft/world/entity/monster/Creeper.java b/net/minecraft/world/entity/monster/Creeper.java -index 1b2783b71ccb6f632c32fc2ee898b1b14e8186dc..3f5e1e98802e5dd1cfc9075559e1102046605a04 100644 --- a/net/minecraft/world/entity/monster/Creeper.java +++ b/net/minecraft/world/entity/monster/Creeper.java -@@ -53,6 +53,7 @@ public class Creeper extends Monster { +@@ -54,6 +_,7 @@ public int maxSwell = 30; public int explosionRadius = 3; private int droppedSkulls; @@ -16,16 +8,16 @@ index 1b2783b71ccb6f632c32fc2ee898b1b14e8186dc..3f5e1e98802e5dd1cfc9075559e11020 public Creeper(EntityType entityType, Level level) { super(entityType, level); -@@ -116,7 +117,7 @@ public class Creeper extends Monster { - this.maxSwell = compound.getShortOr("Fuse", (short)30); - this.explosionRadius = compound.getByteOr("ExplosionRadius", (byte)3); - if (compound.getBooleanOr("ignited", false)) { +@@ -117,7 +_,7 @@ + this.maxSwell = input.getShortOr("Fuse", (short)30); + this.explosionRadius = input.getByteOr("ExplosionRadius", (byte)3); + if (input.getBooleanOr("ignited", false)) { - this.ignite(); + this.entityData.set(DATA_IS_IGNITED, true); // Paper - set directly to avoid firing event } } -@@ -149,10 +150,11 @@ public class Creeper extends Monster { +@@ -150,10 +_,11 @@ } @Override @@ -39,7 +31,7 @@ index 1b2783b71ccb6f632c32fc2ee898b1b14e8186dc..3f5e1e98802e5dd1cfc9075559e11020 } @Override -@@ -199,9 +201,20 @@ public class Creeper extends Monster { +@@ -200,9 +_,20 @@ @Override public void thunderHit(ServerLevel level, LightningBolt lightning) { super.thunderHit(level, lightning); @@ -60,7 +52,7 @@ index 1b2783b71ccb6f632c32fc2ee898b1b14e8186dc..3f5e1e98802e5dd1cfc9075559e11020 @Override protected InteractionResult mobInteract(Player player, InteractionHand hand) { ItemStack itemInHand = player.getItemInHand(hand); -@@ -210,8 +223,9 @@ public class Creeper extends Monster { +@@ -211,8 +_,9 @@ this.level() .playSound(player, this.getX(), this.getY(), this.getZ(), soundEvent, this.getSoundSource(), 1.0F, this.random.nextFloat() * 0.4F + 0.8F); if (!this.level().isClientSide) { @@ -71,7 +63,7 @@ index 1b2783b71ccb6f632c32fc2ee898b1b14e8186dc..3f5e1e98802e5dd1cfc9075559e11020 itemInHand.shrink(1); } else { itemInHand.hurtAndBreak(1, player, getSlotForHand(hand)); -@@ -227,18 +241,29 @@ public class Creeper extends Monster { +@@ -228,18 +_,29 @@ public void explodeCreeper() { if (this.level() instanceof ServerLevel serverLevel) { float f = this.isPowered() ? 2.0F : 1.0F; @@ -104,11 +96,13 @@ index 1b2783b71ccb6f632c32fc2ee898b1b14e8186dc..3f5e1e98802e5dd1cfc9075559e11020 areaEffectCloud.setRadius(2.5F); areaEffectCloud.setRadiusOnUse(-0.5F); areaEffectCloud.setWaitTime(10); -@@ -250,16 +275,27 @@ public class Creeper extends Monster { +@@ -251,16 +_,27 @@ areaEffectCloud.addEffect(new MobEffectInstance(mobEffectInstance)); } - this.level().addFreshEntity(areaEffectCloud); +- } +- } + this.level().addFreshEntity(areaEffectCloud, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.EXPLOSION); // CraftBukkit + } + } @@ -120,8 +114,8 @@ index 1b2783b71ccb6f632c32fc2ee898b1b14e8186dc..3f5e1e98802e5dd1cfc9075559e11020 + if (event.callEvent()) { + this.entityData.set(DATA_IS_IGNITED, event.isIgnited()); + } - } - } ++ } ++ } + // Paper end - Call CreeperIgniteEvent public boolean isIgnited() { diff --git a/paper-server/patches/rejected/net/minecraft/world/entity/monster/Slime.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/monster/Slime.java.patch similarity index 83% rename from paper-server/patches/rejected/net/minecraft/world/entity/monster/Slime.java.patch rename to paper-server/patches/sources/net/minecraft/world/entity/monster/Slime.java.patch index 3beddc70f9..1aa9141d46 100644 --- a/paper-server/patches/rejected/net/minecraft/world/entity/monster/Slime.java.patch +++ b/paper-server/patches/sources/net/minecraft/world/entity/monster/Slime.java.patch @@ -1,14 +1,6 @@ -From 09671551669244ef4f259d8b27547e463d6795d4 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 15:37:42 +0200 -Subject: [PATCH] paper File Patches - - -diff --git a/net/minecraft/world/entity/monster/Slime.java b/net/minecraft/world/entity/monster/Slime.java -index 8e3ffc4ffd90ee12b96d0666c3363164d93c57c2..5a81172c88f5699f1440b69b331a8ea353c1950a 100644 --- a/net/minecraft/world/entity/monster/Slime.java +++ b/net/minecraft/world/entity/monster/Slime.java -@@ -57,6 +57,7 @@ public class Slime extends Mob implements Enemy { +@@ -58,6 +_,7 @@ public float squish; public float oSquish; private boolean wasOnGround = false; @@ -16,23 +8,23 @@ index 8e3ffc4ffd90ee12b96d0666c3363164d93c57c2..5a81172c88f5699f1440b69b331a8ea3 public Slime(EntityType entityType, Level level) { super(entityType, level); -@@ -111,6 +112,7 @@ public class Slime extends Mob implements Enemy { - super.addAdditionalSaveData(compound); - compound.putInt("Size", this.getSize() - 1); - compound.putBoolean("wasOnGround", this.wasOnGround); -+ compound.putBoolean("Paper.canWander", this.canWander); // Paper +@@ -112,6 +_,7 @@ + super.addAdditionalSaveData(output); + output.putInt("Size", this.getSize() - 1); + output.putBoolean("wasOnGround", this.wasOnGround); ++ output.putBoolean("Paper.canWander", this.canWander); // Paper } @Override -@@ -118,6 +120,7 @@ public class Slime extends Mob implements Enemy { - this.setSize(compound.getIntOr("Size", 0) + 1, false); - super.readAdditionalSaveData(compound); - this.wasOnGround = compound.getBooleanOr("wasOnGround", false); -+ this.canWander = compound.getBooleanOr("Paper.canWander", true); // Paper +@@ -119,6 +_,7 @@ + this.setSize(input.getIntOr("Size", 0) + 1, false); + super.readAdditionalSaveData(input); + this.wasOnGround = input.getBooleanOr("wasOnGround", false); ++ this.canWander = input.getBooleanOr("Paper.canWander", true); // Paper } public boolean isTiny() { -@@ -197,7 +200,7 @@ public class Slime extends Mob implements Enemy { +@@ -198,7 +_,7 @@ } @Override @@ -41,7 +33,7 @@ index 8e3ffc4ffd90ee12b96d0666c3363164d93c57c2..5a81172c88f5699f1440b69b331a8ea3 int size = this.getSize(); if (!this.level().isClientSide && size > 1 && this.isDeadOrDying()) { float width = this.getDimensions(this.getPose()).width(); -@@ -205,18 +208,43 @@ public class Slime extends Mob implements Enemy { +@@ -206,18 +_,43 @@ int i = size / 2; int i1 = 2 + this.random.nextInt(3); PlayerTeam team = this.getTeam(); @@ -65,6 +57,7 @@ index 8e3ffc4ffd90ee12b96d0666c3363164d93c57c2..5a81172c88f5699f1440b69b331a8ea3 mob.setSize(i, true); mob.snapTo(this.getX() + f1, this.getY() + 0.5, this.getZ() + f2, this.random.nextFloat() * 360.0F, 0.0F); - }); +- } + // CraftBukkit start + }, null, null); + if (converted != null) { @@ -79,7 +72,7 @@ index 8e3ffc4ffd90ee12b96d0666c3363164d93c57c2..5a81172c88f5699f1440b69b331a8ea3 + } + for (LivingEntity living : slimes) { + this.level().addFreshEntity(living, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.SLIME_SPLIT); - } ++ } + // CraftBukkit end } @@ -88,7 +81,7 @@ index 8e3ffc4ffd90ee12b96d0666c3363164d93c57c2..5a81172c88f5699f1440b69b331a8ea3 } @Override -@@ -282,9 +310,13 @@ public class Slime extends Mob implements Enemy { +@@ -283,9 +_,13 @@ return checkMobSpawnRules(entityType, level, spawnReason, pos, random); } @@ -104,7 +97,7 @@ index 8e3ffc4ffd90ee12b96d0666c3363164d93c57c2..5a81172c88f5699f1440b69b331a8ea3 && random.nextFloat() < 0.5F && random.nextFloat() < level.getMoonBrightness() && level.getMaxLocalRawBrightness(pos) <= random.nextInt(8)) { -@@ -296,8 +328,11 @@ public class Slime extends Mob implements Enemy { +@@ -297,8 +_,11 @@ } ChunkPos chunkPos = new ChunkPos(pos); @@ -118,7 +111,7 @@ index 8e3ffc4ffd90ee12b96d0666c3363164d93c57c2..5a81172c88f5699f1440b69b331a8ea3 return checkMobSpawnRules(entityType, level, spawnReason, pos, random); } } -@@ -356,6 +391,16 @@ public class Slime extends Mob implements Enemy { +@@ -357,6 +_,16 @@ return super.getDefaultDimensions(pose).scale(this.getSize()); } @@ -135,7 +128,7 @@ index 8e3ffc4ffd90ee12b96d0666c3363164d93c57c2..5a81172c88f5699f1440b69b331a8ea3 static class SlimeAttackGoal extends Goal { private final Slime slime; private int growTiredTimer; -@@ -368,7 +413,16 @@ public class Slime extends Mob implements Enemy { +@@ -369,7 +_,16 @@ @Override public boolean canUse() { LivingEntity target = this.slime.getTarget(); @@ -153,7 +146,7 @@ index 8e3ffc4ffd90ee12b96d0666c3363164d93c57c2..5a81172c88f5699f1440b69b331a8ea3 } @Override -@@ -380,7 +434,16 @@ public class Slime extends Mob implements Enemy { +@@ -381,7 +_,16 @@ @Override public boolean canContinueToUse() { LivingEntity target = this.slime.getTarget(); @@ -171,7 +164,7 @@ index 8e3ffc4ffd90ee12b96d0666c3363164d93c57c2..5a81172c88f5699f1440b69b331a8ea3 } @Override -@@ -399,6 +462,13 @@ public class Slime extends Mob implements Enemy { +@@ -400,6 +_,13 @@ slimeMoveControl.setDirection(this.slime.getYRot(), this.slime.isDealsDamage()); } } @@ -185,7 +178,7 @@ index 8e3ffc4ffd90ee12b96d0666c3363164d93c57c2..5a81172c88f5699f1440b69b331a8ea3 } static class SlimeFloatGoal extends Goal { -@@ -412,7 +482,7 @@ public class Slime extends Mob implements Enemy { +@@ -413,7 +_,7 @@ @Override public boolean canUse() { @@ -194,7 +187,7 @@ index 8e3ffc4ffd90ee12b96d0666c3363164d93c57c2..5a81172c88f5699f1440b69b331a8ea3 } @Override -@@ -442,7 +512,7 @@ public class Slime extends Mob implements Enemy { +@@ -443,7 +_,7 @@ @Override public boolean canUse() { @@ -203,7 +196,7 @@ index 8e3ffc4ffd90ee12b96d0666c3363164d93c57c2..5a81172c88f5699f1440b69b331a8ea3 } @Override -@@ -520,7 +590,7 @@ public class Slime extends Mob implements Enemy { +@@ -521,7 +_,7 @@ @Override public boolean canUse() { @@ -212,7 +205,7 @@ index 8e3ffc4ffd90ee12b96d0666c3363164d93c57c2..5a81172c88f5699f1440b69b331a8ea3 && (this.slime.onGround() || this.slime.isInWater() || this.slime.isInLava() || this.slime.hasEffect(MobEffects.LEVITATION)) && this.slime.getMoveControl() instanceof Slime.SlimeMoveControl; } -@@ -530,6 +600,11 @@ public class Slime extends Mob implements Enemy { +@@ -531,6 +_,11 @@ if (--this.nextRandomizeTime <= 0) { this.nextRandomizeTime = this.adjustedTickDelay(40 + this.slime.getRandom().nextInt(60)); this.chosenDegrees = this.slime.getRandom().nextInt(360); diff --git a/paper-server/patches/rejected/net/minecraft/world/entity/monster/Vex.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/monster/Vex.java.patch similarity index 58% rename from paper-server/patches/rejected/net/minecraft/world/entity/monster/Vex.java.patch rename to paper-server/patches/sources/net/minecraft/world/entity/monster/Vex.java.patch index a77567f336..0b1c9a9bdd 100644 --- a/paper-server/patches/rejected/net/minecraft/world/entity/monster/Vex.java.patch +++ b/paper-server/patches/sources/net/minecraft/world/entity/monster/Vex.java.patch @@ -1,23 +1,15 @@ -From 09671551669244ef4f259d8b27547e463d6795d4 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 15:37:42 +0200 -Subject: [PATCH] paper File Patches - - -diff --git a/net/minecraft/world/entity/monster/Vex.java b/net/minecraft/world/entity/monster/Vex.java -index 19452f4117d5e11d8a1ec32f379b78a27ef049a6..bc74bdc3e13f1d51ed6d31470f3ac6f9855778c9 100644 --- a/net/minecraft/world/entity/monster/Vex.java +++ b/net/minecraft/world/entity/monster/Vex.java -@@ -286,7 +286,7 @@ public class Vex extends Monster implements TraceableEntity { - +@@ -293,7 +_,7 @@ @Override public void start() { -- Vex.this.setTarget(Vex.this.owner.getTarget()); -+ Vex.this.setTarget(Vex.this.owner.getTarget(), org.bukkit.event.entity.EntityTargetEvent.TargetReason.OWNER_ATTACKED_TARGET); // CraftBukkit + Mob owner = Vex.this.getOwner(); +- Vex.this.setTarget(owner != null ? owner.getTarget() : null); ++ Vex.this.setTarget(owner != null ? owner.getTarget() : null, org.bukkit.event.entity.EntityTargetEvent.TargetReason.OWNER_ATTACKED_TARGET); // CraftBukkit super.start(); } } -@@ -345,7 +345,10 @@ public class Vex extends Monster implements TraceableEntity { +@@ -352,7 +_,10 @@ for (int i = 0; i < 3; i++) { BlockPos blockPos = boundOrigin.offset(Vex.this.random.nextInt(15) - 7, Vex.this.random.nextInt(11) - 5, Vex.this.random.nextInt(15) - 7); diff --git a/paper-server/patches/rejected/net/minecraft/world/entity/monster/Zombie.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/monster/Zombie.java.patch similarity index 87% rename from paper-server/patches/rejected/net/minecraft/world/entity/monster/Zombie.java.patch rename to paper-server/patches/sources/net/minecraft/world/entity/monster/Zombie.java.patch index 6a3e7aa75f..b5c0e44801 100644 --- a/paper-server/patches/rejected/net/minecraft/world/entity/monster/Zombie.java.patch +++ b/paper-server/patches/sources/net/minecraft/world/entity/monster/Zombie.java.patch @@ -1,14 +1,6 @@ -From 09671551669244ef4f259d8b27547e463d6795d4 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 15:37:42 +0200 -Subject: [PATCH] paper File Patches - - -diff --git a/net/minecraft/world/entity/monster/Zombie.java b/net/minecraft/world/entity/monster/Zombie.java -index ef6807c5c14a4426791447b936f1c646c4ca149e..39b65970a48568c95ff482b9636e7391f300ffa8 100644 --- a/net/minecraft/world/entity/monster/Zombie.java +++ b/net/minecraft/world/entity/monster/Zombie.java -@@ -68,9 +68,7 @@ import net.minecraft.world.level.block.state.BlockState; +@@ -67,9 +_,7 @@ public class Zombie extends Monster { private static final ResourceLocation SPEED_MODIFIER_BABY_ID = ResourceLocation.withDefaultNamespace("baby"); @@ -19,7 +11,7 @@ index ef6807c5c14a4426791447b936f1c646c4ca149e..39b65970a48568c95ff482b9636e7391 private static final ResourceLocation REINFORCEMENT_CALLER_CHARGE_ID = ResourceLocation.withDefaultNamespace("reinforcement_caller_charge"); private static final AttributeModifier ZOMBIE_REINFORCEMENT_CALLEE_CHARGE = new AttributeModifier( ResourceLocation.withDefaultNamespace("reinforcement_callee_charge"), -0.05F, AttributeModifier.Operation.ADD_VALUE -@@ -91,13 +89,15 @@ public class Zombie extends Monster { +@@ -90,13 +_,15 @@ private static final boolean DEFAULT_BABY = false; private static final boolean DEFAULT_CAN_BREAK_DOORS = false; private static final int DEFAULT_IN_WATER_TIME = 0; @@ -36,7 +28,7 @@ index ef6807c5c14a4426791447b936f1c646c4ca149e..39b65970a48568c95ff482b9636e7391 } public Zombie(Level level) { -@@ -106,7 +106,7 @@ public class Zombie extends Monster { +@@ -105,7 +_,7 @@ @Override protected void registerGoals() { @@ -45,7 +37,7 @@ index ef6807c5c14a4426791447b936f1c646c4ca149e..39b65970a48568c95ff482b9636e7391 this.goalSelector.addGoal(8, new LookAtPlayerGoal(this, Player.class, 8.0F)); this.goalSelector.addGoal(8, new RandomLookAroundGoal(this)); this.addBehaviourGoals(); -@@ -118,7 +118,7 @@ public class Zombie extends Monster { +@@ -117,7 +_,7 @@ this.goalSelector.addGoal(7, new WaterAvoidingRandomStrollGoal(this, 1.0)); this.targetSelector.addGoal(1, new HurtByTargetGoal(this).setAlertOthers(ZombifiedPiglin.class)); this.targetSelector.addGoal(2, new NearestAttackableTargetGoal<>(this, Player.class, true)); @@ -54,7 +46,7 @@ index ef6807c5c14a4426791447b936f1c646c4ca149e..39b65970a48568c95ff482b9636e7391 this.targetSelector.addGoal(3, new NearestAttackableTargetGoal<>(this, IronGolem.class, true)); this.targetSelector.addGoal(5, new NearestAttackableTargetGoal<>(this, Turtle.class, 10, true, false, Turtle.BABY_ON_LAND_SELECTOR)); } -@@ -172,11 +172,16 @@ public class Zombie extends Monster { +@@ -171,11 +_,16 @@ @Override protected int getBaseExperienceReward(ServerLevel level) { @@ -72,7 +64,7 @@ index ef6807c5c14a4426791447b936f1c646c4ca149e..39b65970a48568c95ff482b9636e7391 } @Override -@@ -184,9 +189,9 @@ public class Zombie extends Monster { +@@ -183,9 +_,9 @@ this.getEntityData().set(DATA_BABY_ID, childZombie); if (this.level() != null && !this.level().isClientSide) { AttributeInstance attribute = this.getAttribute(Attributes.MOVEMENT_SPEED); @@ -84,7 +76,7 @@ index ef6807c5c14a4426791447b936f1c646c4ca149e..39b65970a48568c95ff482b9636e7391 } } } -@@ -255,6 +260,13 @@ public class Zombie extends Monster { +@@ -254,6 +_,13 @@ super.aiStep(); } @@ -98,7 +90,7 @@ index ef6807c5c14a4426791447b936f1c646c4ca149e..39b65970a48568c95ff482b9636e7391 public void startUnderWaterConversion(int conversionTime) { this.conversionTime = conversionTime; this.getEntityData().set(DATA_DROWNED_CONVERSION_ID, true); -@@ -268,32 +280,51 @@ public class Zombie extends Monster { +@@ -267,31 +_,50 @@ } protected void convertToZombieType(EntityType entityType) { @@ -146,19 +138,19 @@ index ef6807c5c14a4426791447b936f1c646c4ca149e..39b65970a48568c95ff482b9636e7391 public boolean isSunSensitive() { - return true; +- } + return this.shouldBurnInDay; // Paper - Add more Zombie API - } - ++ } ++ + // Paper start - Add more Zombie API + public void setShouldBurnInDay(boolean shouldBurnInDay) { + this.shouldBurnInDay = shouldBurnInDay; + } + // Paper end - Add more Zombie API -+ + @Override public boolean hurtServer(ServerLevel level, DamageSource damageSource, float amount) { - if (!super.hurtServer(level, damageSource, amount)) { -@@ -325,13 +356,13 @@ public class Zombie extends Monster { +@@ -324,13 +_,13 @@ if (SpawnPlacements.isSpawnPositionOk(type, level, blockPos) && SpawnPlacements.checkSpawnRules(type, level, EntitySpawnReason.REINFORCEMENT, blockPos, level.random)) { zombie.setPos(i1, i2, i3); @@ -175,7 +167,7 @@ index ef6807c5c14a4426791447b936f1c646c4ca149e..39b65970a48568c95ff482b9636e7391 AttributeInstance attribute = this.getAttribute(Attributes.SPAWN_REINFORCEMENTS_CHANCE); AttributeModifier modifier = attribute.getModifier(REINFORCEMENT_CALLER_CHARGE_ID); double d = modifier != null ? modifier.amount() : 0.0; -@@ -356,7 +387,12 @@ public class Zombie extends Monster { +@@ -355,7 +_,12 @@ if (flag) { float effectiveDifficulty = this.level().getCurrentDifficultyAt(this.blockPosition()).getEffectiveDifficulty(); if (this.getMainHandItem().isEmpty() && this.isOnFire() && this.random.nextFloat() < effectiveDifficulty * 0.3F) { @@ -189,19 +181,19 @@ index ef6807c5c14a4426791447b936f1c646c4ca149e..39b65970a48568c95ff482b9636e7391 } } -@@ -416,6 +452,7 @@ public class Zombie extends Monster { - compound.putBoolean("CanBreakDoors", this.canBreakDoors()); - compound.putInt("InWaterTime", this.isInWater() ? this.inWaterTime : -1); - compound.putInt("DrownedConversionTime", this.isUnderWaterConverting() ? this.conversionTime : -1); -+ compound.putBoolean("Paper.ShouldBurnInDay", this.shouldBurnInDay); // Paper - Add more Zombie API +@@ -415,6 +_,7 @@ + output.putBoolean("CanBreakDoors", this.canBreakDoors()); + output.putInt("InWaterTime", this.isInWater() ? this.inWaterTime : -1); + output.putInt("DrownedConversionTime", this.isUnderWaterConverting() ? this.conversionTime : -1); ++ output.putBoolean("Paper.ShouldBurnInDay", this.shouldBurnInDay); // Paper - Add more Zombie API } @Override -@@ -430,13 +467,15 @@ public class Zombie extends Monster { +@@ -429,13 +_,15 @@ } else { this.getEntityData().set(DATA_DROWNED_CONVERSION_ID, false); } -+ this.shouldBurnInDay = compound.getBooleanOr("Paper.ShouldBurnInDay", true); // Paper - Add more Zombie API ++ this.shouldBurnInDay = input.getBooleanOr("Paper.ShouldBurnInDay", true); // Paper - Add more Zombie API } @Override @@ -215,7 +207,7 @@ index ef6807c5c14a4426791447b936f1c646c4ca149e..39b65970a48568c95ff482b9636e7391 return flag; } -@@ -472,7 +511,7 @@ public class Zombie extends Monster { +@@ -471,7 +_,7 @@ spawnGroupData = super.finalizeSpawn(level, difficulty, spawnReason, spawnGroupData); float specialMultiplier = difficulty.getSpecialMultiplier(); if (spawnReason != EntitySpawnReason.CONVERSION) { @@ -224,7 +216,7 @@ index ef6807c5c14a4426791447b936f1c646c4ca149e..39b65970a48568c95ff482b9636e7391 } if (spawnGroupData == null) { -@@ -499,7 +538,7 @@ public class Zombie extends Monster { +@@ -498,7 +_,7 @@ chicken1.finalizeSpawn(level, difficulty, EntitySpawnReason.JOCKEY, null); chicken1.setChickenJockey(true); this.startRiding(chicken1); diff --git a/paper-server/patches/rejected/net/minecraft/world/level/chunk/status/ChunkStatusTasks.java.patch b/paper-server/patches/sources/net/minecraft/world/level/chunk/status/ChunkStatusTasks.java.patch similarity index 81% rename from paper-server/patches/rejected/net/minecraft/world/level/chunk/status/ChunkStatusTasks.java.patch rename to paper-server/patches/sources/net/minecraft/world/level/chunk/status/ChunkStatusTasks.java.patch index f92c72cc67..6783a13227 100644 --- a/paper-server/patches/rejected/net/minecraft/world/level/chunk/status/ChunkStatusTasks.java.patch +++ b/paper-server/patches/sources/net/minecraft/world/level/chunk/status/ChunkStatusTasks.java.patch @@ -1,14 +1,6 @@ -From 09671551669244ef4f259d8b27547e463d6795d4 Mon Sep 17 00:00:00 2001 -From: File -Date: Sun, 20 Apr 1997 15:37:42 +0200 -Subject: [PATCH] paper File Patches - - -diff --git a/net/minecraft/world/level/chunk/status/ChunkStatusTasks.java b/net/minecraft/world/level/chunk/status/ChunkStatusTasks.java -index 78dca709b9cbae5fd8360ae2cf40eaa4d6b90c48..dc9c612b245275900ae43f7a45e7be755853207c 100644 --- a/net/minecraft/world/level/chunk/status/ChunkStatusTasks.java +++ b/net/minecraft/world/level/chunk/status/ChunkStatusTasks.java -@@ -35,7 +35,7 @@ public class ChunkStatusTasks { +@@ -40,7 +_,7 @@ WorldGenContext worldGenContext, ChunkStep step, StaticCache2D cache, ChunkAccess chunk ) { ServerLevel serverLevel = worldGenContext.level(); @@ -17,13 +9,15 @@ index 78dca709b9cbae5fd8360ae2cf40eaa4d6b90c48..dc9c612b245275900ae43f7a45e7be75 worldGenContext.generator() .createStructures( serverLevel.registryAccess(), -@@ -198,7 +198,58 @@ public class ChunkStatusTasks { +@@ -207,7 +_,58 @@ - public static void postLoadProtoChunk(ServerLevel level, List entityTags) { - if (!entityTags.isEmpty()) { -- level.addWorldGenChunkEntities(EntityType.loadEntitiesRecursive(entityTags, level, EntitySpawnReason.LOAD)); + private static void postLoadProtoChunk(ServerLevel level, ValueInput.ValueInputList input) { + if (!input.isEmpty()) { +- level.addWorldGenChunkEntities(EntityType.loadEntitiesRecursive(input, level, EntitySpawnReason.LOAD)); +- } +- } + // CraftBukkit start - these are spawned serialized (DefinedStructure) and we don't call an add event below at the moment due to ordering complexities -+ level.addWorldGenChunkEntities(EntityType.loadEntitiesRecursive(entityTags, level, EntitySpawnReason.LOAD).filter((entity) -> { ++ level.addWorldGenChunkEntities(EntityType.loadEntitiesRecursive(input, level, EntitySpawnReason.LOAD).filter((entity) -> { + boolean needsRemoval = false; + net.minecraft.server.dedicated.DedicatedServer server = level.getCraftServer().getServer(); + if (!level.getChunkSource().spawnFriendlies && (entity instanceof net.minecraft.world.entity.animal.Animal || entity instanceof net.minecraft.world.entity.animal.WaterAnimal)) { @@ -72,8 +66,8 @@ index 78dca709b9cbae5fd8360ae2cf40eaa4d6b90c48..dc9c612b245275900ae43f7a45e7be75 + default: + break; + } - } ++ } + return false; - } ++ } + // Paper end - duplicate uuid resolving }