From eb41348d3970959a55ca28a9704a6f8e3f9d296a Mon Sep 17 00:00:00 2001 From: Jason Penilla <11360596+jpenilla@users.noreply.github.com> Date: Tue, 23 Apr 2024 14:12:24 -0700 Subject: [PATCH] 33 --- .../server/0026-Add-TickThread.patch | 0 ...027-Further-improve-server-tick-loop.patch | 20 +++++++++---------- ...-option-to-load-extra-plugin-jars-no.patch | 4 ++-- .../0029-Support-components-in-ItemMeta.patch | 16 +++++++-------- ...cactus-bamboo-and-reed-growth-height.patch | 6 +++--- ...figurable-baby-zombie-movement-speed.patch | 10 +++++----- ...032-Configurable-fishing-time-ranges.patch | 2 +- .../0033-Allow-nerfed-mobs-to-jump.patch | 12 +++++------ 8 files changed, 35 insertions(+), 35 deletions(-) rename patches/{unapplied => }/server/0026-Add-TickThread.patch (100%) rename patches/{unapplied => }/server/0027-Further-improve-server-tick-loop.patch (94%) rename patches/{unapplied => }/server/0028-Add-command-line-option-to-load-extra-plugin-jars-no.patch (94%) rename patches/{unapplied => }/server/0029-Support-components-in-ItemMeta.patch (82%) rename patches/{unapplied => }/server/0030-Configurable-cactus-bamboo-and-reed-growth-height.patch (95%) rename patches/{unapplied => }/server/0031-Configurable-baby-zombie-movement-speed.patch (87%) rename patches/{unapplied => }/server/0032-Configurable-fishing-time-ranges.patch (94%) rename patches/{unapplied => }/server/0033-Allow-nerfed-mobs-to-jump.patch (82%) diff --git a/patches/unapplied/server/0026-Add-TickThread.patch b/patches/server/0026-Add-TickThread.patch similarity index 100% rename from patches/unapplied/server/0026-Add-TickThread.patch rename to patches/server/0026-Add-TickThread.patch diff --git a/patches/unapplied/server/0027-Further-improve-server-tick-loop.patch b/patches/server/0027-Further-improve-server-tick-loop.patch similarity index 94% rename from patches/unapplied/server/0027-Further-improve-server-tick-loop.patch rename to patches/server/0027-Further-improve-server-tick-loop.patch index d4aa75ee92..ad69ab2c48 100644 --- a/patches/unapplied/server/0027-Further-improve-server-tick-loop.patch +++ b/patches/server/0027-Further-improve-server-tick-loop.patch @@ -12,19 +12,19 @@ Previous implementation did not calculate TPS correctly. Switch to a realistic rolling average and factor in std deviation as an extra reporting variable diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 2be50609ccf90d3db6e572377ba63bcbad156382..c1f9acad1e97915dfad5fbc0ba2547853e3b37f1 100644 +index 7ae4d4feb5c9281fa62a3f35c39eefdff1b684d8..cf9ce8a8e7d576d91e9d745e9c45f698100808bd 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -283,7 +283,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop processQueue = new java.util.concurrent.ConcurrentLinkedQueue(); public int autosavePeriod; public Commands vanillaCommandDispatcher; -@@ -292,7 +292,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop(Lists.transform(this.lore, CraftChatMessage::fromJSONComponent)); +@@ -1026,6 +1038,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { + return this.lore == null ? null : new ArrayList(Lists.transform(this.lore, CraftChatMessage::fromComponent)); } + // Paper start @@ -47,7 +47,7 @@ index 893da5266fc09e583a660bc23ac84008b95ea2a1..2157034e735c3921d4ef128688c30917 @Override public void setLore(List lore) { if (lore == null || lore.isEmpty()) { -@@ -934,6 +954,21 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1040,6 +1060,21 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { } } @@ -69,7 +69,7 @@ index 893da5266fc09e583a660bc23ac84008b95ea2a1..2157034e735c3921d4ef128688c30917 @Override public boolean hasCustomModelData() { return this.customModelData != null; -@@ -1369,6 +1404,11 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1654,6 +1689,11 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { } for (Object object : addFrom) { diff --git a/patches/unapplied/server/0030-Configurable-cactus-bamboo-and-reed-growth-height.patch b/patches/server/0030-Configurable-cactus-bamboo-and-reed-growth-height.patch similarity index 95% rename from patches/unapplied/server/0030-Configurable-cactus-bamboo-and-reed-growth-height.patch rename to patches/server/0030-Configurable-cactus-bamboo-and-reed-growth-height.patch index 6f7a9c6719..d25f48a93d 100644 --- a/patches/unapplied/server/0030-Configurable-cactus-bamboo-and-reed-growth-height.patch +++ b/patches/server/0030-Configurable-cactus-bamboo-and-reed-growth-height.patch @@ -7,7 +7,7 @@ Bamboo - Both the minimum fully-grown height and the maximum are configurable - Machine_Maker diff --git a/src/main/java/net/minecraft/world/level/block/BambooStalkBlock.java b/src/main/java/net/minecraft/world/level/block/BambooStalkBlock.java -index bd72deadb59289ae90afc379ee61e8198ddaf4ed..e8dc4ea90d74036dacb0785fcb9125df192a4c22 100644 +index eda75b316acd09120539c92ff8adb97d92e9523f..e2951dd077441fe9cda461a2d3ef0c0671308316 100644 --- a/src/main/java/net/minecraft/world/level/block/BambooStalkBlock.java +++ b/src/main/java/net/minecraft/world/level/block/BambooStalkBlock.java @@ -137,7 +137,7 @@ public class BambooStalkBlock extends Block implements BonemealableBlock { @@ -65,7 +65,7 @@ index bd72deadb59289ae90afc379ee61e8198ddaf4ed..e8dc4ea90d74036dacb0785fcb9125df } diff --git a/src/main/java/net/minecraft/world/level/block/CactusBlock.java b/src/main/java/net/minecraft/world/level/block/CactusBlock.java -index 2f343eaf0c2216702fd614dbec98ac3d46ef5b2e..0e8c337dde0cfa2ac289c79904ecd2affc86d70a 100644 +index c7e462a187196da906aec3b528f7945afec9f6b0..fd344c5cf0d6d523abe34d5e3f8d939106942cbb 100644 --- a/src/main/java/net/minecraft/world/level/block/CactusBlock.java +++ b/src/main/java/net/minecraft/world/level/block/CactusBlock.java @@ -61,7 +61,7 @@ public class CactusBlock extends Block { @@ -78,7 +78,7 @@ index 2f343eaf0c2216702fd614dbec98ac3d46ef5b2e..0e8c337dde0cfa2ac289c79904ecd2af int modifier = world.spigotConfig.cactusModifier; // Spigot - SPIGOT-7159: Better modifier resolution diff --git a/src/main/java/net/minecraft/world/level/block/SugarCaneBlock.java b/src/main/java/net/minecraft/world/level/block/SugarCaneBlock.java -index 47d4fc5bcf2657078abc7a2637b6337fc0ea0977..04957d461d0e968d443737068aaeec1d0bce78b2 100644 +index f034a7dbc0124353f8cb9b2c841226e73d83423a..c48c622e92cedeaa46b929c7adfedec98dd5a3fb 100644 --- a/src/main/java/net/minecraft/world/level/block/SugarCaneBlock.java +++ b/src/main/java/net/minecraft/world/level/block/SugarCaneBlock.java @@ -59,7 +59,7 @@ public class SugarCaneBlock extends Block { diff --git a/patches/unapplied/server/0031-Configurable-baby-zombie-movement-speed.patch b/patches/server/0031-Configurable-baby-zombie-movement-speed.patch similarity index 87% rename from patches/unapplied/server/0031-Configurable-baby-zombie-movement-speed.patch rename to patches/server/0031-Configurable-baby-zombie-movement-speed.patch index 5037cff218..f3ab05d2e5 100644 --- a/patches/unapplied/server/0031-Configurable-baby-zombie-movement-speed.patch +++ b/patches/server/0031-Configurable-baby-zombie-movement-speed.patch @@ -5,22 +5,22 @@ Subject: [PATCH] Configurable baby zombie movement speed diff --git a/src/main/java/net/minecraft/world/entity/monster/Zombie.java b/src/main/java/net/minecraft/world/entity/monster/Zombie.java -index 190a02bce0026b2c6df796a5f14e639b5a84ccf1..a779d32f87b59f347408974e402fad22fdc47f09 100644 +index bf573c3ca0b34e58525b547ae0228f8af7a4d333..767b8f4db39db9a3732282536b52ae1cb077b503 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java +++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java -@@ -78,6 +78,7 @@ public class Zombie extends Monster { +@@ -75,6 +75,7 @@ public class Zombie extends Monster { private static final UUID SPEED_MODIFIER_BABY_UUID = UUID.fromString("B9766B59-9566-4402-BC1F-2EE2A276D836"); - private static final AttributeModifier SPEED_MODIFIER_BABY = new AttributeModifier(Zombie.SPEED_MODIFIER_BABY_UUID, "Baby speed boost", 0.5D, AttributeModifier.Operation.MULTIPLY_BASE); + private static final AttributeModifier SPEED_MODIFIER_BABY = new AttributeModifier(Zombie.SPEED_MODIFIER_BABY_UUID, "Baby speed boost", 0.5D, AttributeModifier.Operation.ADD_MULTIPLIED_BASE); + private final AttributeModifier babyModifier = new net.minecraft.world.entity.ai.attributes.AttributeModifier(SPEED_MODIFIER_BABY.getId(), SPEED_MODIFIER_BABY.name, this.level().paperConfig().entities.behavior.babyZombieMovementModifier, SPEED_MODIFIER_BABY.getOperation()); // Paper - Make baby speed configurable private static final EntityDataAccessor DATA_BABY_ID = SynchedEntityData.defineId(Zombie.class, EntityDataSerializers.BOOLEAN); private static final EntityDataAccessor DATA_SPECIAL_TYPE_ID = SynchedEntityData.defineId(Zombie.class, EntityDataSerializers.INT); public static final EntityDataAccessor DATA_DROWNED_CONVERSION_ID = SynchedEntityData.defineId(Zombie.class, EntityDataSerializers.BOOLEAN); -@@ -186,9 +187,9 @@ public class Zombie extends Monster { +@@ -183,9 +184,9 @@ public class Zombie extends Monster { if (this.level() != null && !this.level().isClientSide) { AttributeInstance attributemodifiable = this.getAttribute(Attributes.MOVEMENT_SPEED); -- attributemodifiable.removeModifier(Zombie.SPEED_MODIFIER_BABY.getId()); +- attributemodifiable.removeModifier(Zombie.SPEED_MODIFIER_BABY.id()); + attributemodifiable.removeModifier(this.babyModifier.getId()); // Paper - Make baby speed configurable if (baby) { - attributemodifiable.addTransientModifier(Zombie.SPEED_MODIFIER_BABY); diff --git a/patches/unapplied/server/0032-Configurable-fishing-time-ranges.patch b/patches/server/0032-Configurable-fishing-time-ranges.patch similarity index 94% rename from patches/unapplied/server/0032-Configurable-fishing-time-ranges.patch rename to patches/server/0032-Configurable-fishing-time-ranges.patch index 117f93cdbf..ea609b871d 100644 --- a/patches/unapplied/server/0032-Configurable-fishing-time-ranges.patch +++ b/patches/server/0032-Configurable-fishing-time-ranges.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Configurable fishing time ranges diff --git a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java -index 6d81bc003647ba593cd895a57d6651080efdf4a3..9bf5b67922f3368e1ee4d76f6297ebe425f3ceab 100644 +index c9d619c61ed3ee3adb688d0f7d0878d25607a9a2..6b3cf71d7ced6405308b41ac316040bcc03f654d 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java +++ b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java @@ -93,6 +93,10 @@ public class FishingHook extends Projectile { diff --git a/patches/unapplied/server/0033-Allow-nerfed-mobs-to-jump.patch b/patches/server/0033-Allow-nerfed-mobs-to-jump.patch similarity index 82% rename from patches/unapplied/server/0033-Allow-nerfed-mobs-to-jump.patch rename to patches/server/0033-Allow-nerfed-mobs-to-jump.patch index 598cc77be4..bb726be828 100644 --- a/patches/unapplied/server/0033-Allow-nerfed-mobs-to-jump.patch +++ b/patches/server/0033-Allow-nerfed-mobs-to-jump.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Allow nerfed mobs to jump diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java -index 8892a6344b3a96a3d412528b80ce7bcf1ab30003..8395130fcc148ed1500342ead78b20a1387f23e9 100644 +index 7d04a18f62411f00dc7be59564ac6c292834c08a..af1d4cab8ffa3b20dc7aa3af5d1cf8039ef9736f 100644 --- a/src/main/java/net/minecraft/world/entity/Mob.java +++ b/src/main/java/net/minecraft/world/entity/Mob.java -@@ -113,6 +113,7 @@ public abstract class Mob extends LivingEntity implements Targeting { +@@ -126,6 +126,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Targeti private final BodyRotationControl bodyRotationControl; protected PathNavigation navigation; public GoalSelector goalSelector; @@ -16,7 +16,7 @@ index 8892a6344b3a96a3d412528b80ce7bcf1ab30003..8395130fcc148ed1500342ead78b20a1 public GoalSelector targetSelector; @Nullable private LivingEntity target; -@@ -878,7 +879,15 @@ public abstract class Mob extends LivingEntity implements Targeting { +@@ -932,7 +933,15 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Targeti @Override protected final void serverAiStep() { ++this.noActionTime; @@ -30,9 +30,9 @@ index 8892a6344b3a96a3d412528b80ce7bcf1ab30003..8395130fcc148ed1500342ead78b20a1 + return; + } + // Paper end - Allow nerfed mobs to jump and float - this.level().getProfiler().push("sensing"); - this.sensing.tick(); - this.level().getProfiler().pop(); + ProfilerFiller gameprofilerfiller = this.level().getProfiler(); + + gameprofilerfiller.push("sensing"); diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/FloatGoal.java b/src/main/java/net/minecraft/world/entity/ai/goal/FloatGoal.java index 5fbb5d2bf8945a361babfe50f5f92fa46b9e8b5f..7eb0e0486203d9ad6ce89d17a4da96a7563088a4 100644 --- a/src/main/java/net/minecraft/world/entity/ai/goal/FloatGoal.java