diff --git a/README.md b/README.md index 48695bef3..dacabafda 100644 --- a/README.md +++ b/README.md @@ -67,6 +67,8 @@ Thanks to these projects below. Leaf just mix some of their patches together. If - [Parchment](https://github.com/ProjectEdenGG/Parchment) - [Leaves](https://github.com/LeavesMC/Leaves) - [Kaiiju](https://github.com/KaiijuMC/Kaiiju) +- [LinearPurpur](https://github.com/StupidCraft/LinearPurpur) +- [Polpot](https://github.com/HaHaWTH/Polpot) ## Special Thanks To: diff --git a/patches/server/0045-AddLinearSupport.patch b/patches/server/0045-AddLinearSupport.patch index 897ebb262..54586b672 100644 --- a/patches/server/0045-AddLinearSupport.patch +++ b/patches/server/0045-AddLinearSupport.patch @@ -5,7 +5,7 @@ Subject: [PATCH] AddLinearSupport diff --git a/build.gradle.kts b/build.gradle.kts -index a6ac60d7d57e4b0662b0c30f7bc43ba84179d697..a4ed90ae8b704bac060409c0218543fcc9a3e15c 100644 +index 0baaa2bcd05ea65c5fbb9ae646b3a9eeb12bac14..2f374fd4cb05d2c597d0dbd1a554cd6624f84863 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -22,6 +22,8 @@ dependencies { @@ -121,10 +121,10 @@ index c13df3a375f416273c6a26f5f77624c1f34a918c..e2c780e7d914e2cfd322fe07951aa54a long expectedChunks = (long)regionFiles.length * (32L * 32L); // Gale start - instantly continue on world upgrade finish diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index fb3bbe36c7bf67be65f0978ead2d4c778c32ba82..76022824dc9de7e64009383378f8ba75f70b09f3 100644 +index 1b4e0c7f23186afd88c7a71e296a5ca958f1c1d8..d6bdcb21ec79a81c31eaab24a73b55d08351e19b 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -870,7 +870,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop +Date: Tue, 16 Jan 2024 19:21:21 +0800 +Subject: [PATCH] Fix MC 110386 and 31819 + + +diff --git a/src/main/java/net/minecraft/world/entity/animal/Animal.java b/src/main/java/net/minecraft/world/entity/animal/Animal.java +index 8df8a48bd1dbbb4a6835f68bd700eac2b5acf91b..5c146f89b997b2541b37d9bd6b56a6deaa3d6b9b 100644 +--- a/src/main/java/net/minecraft/world/entity/animal/Animal.java ++++ b/src/main/java/net/minecraft/world/entity/animal/Animal.java +@@ -42,6 +42,8 @@ public abstract class Animal extends AgeableMob { + @Nullable + public UUID loveCause; + public ItemStack breedItem; // CraftBukkit - Add breedItem variable ++ private Object level; ++ + public abstract int getPurpurBreedTime(); // Purpur + + protected Animal(EntityType type, Level world) { +@@ -73,7 +75,11 @@ public abstract class Animal extends AgeableMob { + double d1 = this.random.nextGaussian() * 0.02D; + double d2 = this.random.nextGaussian() * 0.02D; + +- this.level().addParticle(ParticleTypes.HEART, this.getRandomX(1.0D), this.getRandomY() + 0.5D, this.getRandomZ(1.0D), d0, d1, d2); ++ // DivineMC start - Fix MC-93826 ++ if (this.level instanceof ServerLevel serverLevel) { ++ serverLevel.sendParticles(ParticleTypes.HEART, this.getRandomX(1.0D), this.getRandomY() + 0.5D, this.getRandomZ(1.0D), 1, d0, d1, d2, 0); ++ } ++ // DivineMC end + } + } + +diff --git a/src/main/java/net/minecraft/world/entity/vehicle/Boat.java b/src/main/java/net/minecraft/world/entity/vehicle/Boat.java +index 7e9c88efd2a1edea673d1ef81635c2891a04d30e..26475c2d69537053a041ec9c2f8147842848a8fc 100644 +--- a/src/main/java/net/minecraft/world/entity/vehicle/Boat.java ++++ b/src/main/java/net/minecraft/world/entity/vehicle/Boat.java +@@ -862,7 +862,7 @@ public class Boat extends VehicleEntity implements VariantHolder { + if (!this.isPassenger()) { + if (onGround) { + if (this.fallDistance > 3.0F) { +- if (this.status != Boat.Status.ON_LAND) { ++ if (this.status != Boat.Status.ON_LAND && this.status != Status.IN_AIR) { // DivineMC - Fix MC-98160 and MC-105103 + this.resetFallDistance(); + return; + } diff --git a/patches/server/0049-Fix-MC-Bug.patch b/patches/server/0049-Fix-MC-Bug.patch new file mode 100644 index 000000000..fe3f12ca2 --- /dev/null +++ b/patches/server/0049-Fix-MC-Bug.patch @@ -0,0 +1,33 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: lilingfengdev +Date: Tue, 16 Jan 2024 19:37:01 +0800 +Subject: [PATCH] Fix MC Bug + + +diff --git a/src/main/java/net/minecraft/world/entity/animal/Wolf.java b/src/main/java/net/minecraft/world/entity/animal/Wolf.java +index 5d49ed7ddf44a3d549b178ae548664194967776b..8ff325a6f8e70be3df989296044d00931814a10a 100644 +--- a/src/main/java/net/minecraft/world/entity/animal/Wolf.java ++++ b/src/main/java/net/minecraft/world/entity/animal/Wolf.java +@@ -655,14 +655,17 @@ public class Wolf extends TamableAnimal implements NeutralMob { + public boolean canMate(Animal other) { + if (other == this) { + return false; +- } else if (!this.isTame()) { +- return false; + } else if (!(other instanceof Wolf)) { + return false; + } else { +- Wolf entitywolf = (Wolf) other; +- +- return !entitywolf.isTame() ? false : (entitywolf.isInSittingPose() ? false : this.isInLove() && entitywolf.isInLove()); ++ // DivineMC start - Fix MC-93018 ++ Wolf wolf = (Wolf) other; ++ if (wolf.isInSittingPose()) { ++ return false; ++ } else { ++ return this.isInLove() && wolf.isInLove(); ++ } ++ // DivineMC end + } + } + diff --git a/patches/server/0050-Polpot-Add-Missing-Purpur-Config.patch b/patches/server/0050-Polpot-Add-Missing-Purpur-Config.patch new file mode 100644 index 000000000..ac2d77714 --- /dev/null +++ b/patches/server/0050-Polpot-Add-Missing-Purpur-Config.patch @@ -0,0 +1,316 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: lilingfengdev +Date: Tue, 16 Jan 2024 20:02:03 +0800 +Subject: [PATCH] Polpot Add Missing Purpur Config + + +diff --git a/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java b/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java +index eb60d2d99155aae4a761051175fbbddf9ed5dad9..4c54985fd024a6b3ad2f5bd66f52c63f02fda4c6 100644 +--- a/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java ++++ b/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java +@@ -152,6 +152,23 @@ public class Allay extends PathfinderMob implements InventoryCarrier, VibrationS + } + // Purpur end + ++ // DivineMC start - Add missing purpur config options ++ @Override ++ public boolean isSensitiveToWater() { ++ return level().purpurConfig.allayTakeDamageFromWater; ++ } ++ ++ @Override ++ public boolean isAlwaysExperienceDropper() { ++ return level().purpurConfig.allayAlwaysDropExp; ++ } ++ ++ @Override ++ public void initAttributes() { ++ this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(level().purpurConfig.allayMaxHealth); ++ } ++ // DivineMC end ++ + @Override + protected Brain.Provider brainProvider() { + return Brain.provider(Allay.MEMORY_TYPES, Allay.SENSOR_TYPES); +diff --git a/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java b/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java +index 11181c0429b720381e7752f8a0d5e89615bcce4b..33a80ff5daac61e50489289abeec3ce5193a1dd6 100644 +--- a/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java ++++ b/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java +@@ -97,6 +97,18 @@ public class Camel extends AbstractHorse implements PlayerRideableJumping, Saddl + } + // Purpur end + ++ // DivineMC start - Add missing purpur config options ++ @Override ++ public boolean isSensitiveToWater() { ++ return level().purpurConfig.camelTakeDamageFromWater; ++ } ++ ++ @Override ++ public boolean isAlwaysExperienceDropper() { ++ return level().purpurConfig.camelAlwaysDropExp; ++ } ++ // DivineMC end ++ + @Override + public void addAdditionalSaveData(CompoundTag nbt) { + super.addAdditionalSaveData(nbt); +diff --git a/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java b/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java +index 80a7197835531fa8cd276d9d31860f2b5ad3089f..5ded577622312a1295655eeb1ae6ad17d39d8578 100644 +--- a/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java ++++ b/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java +@@ -144,6 +144,23 @@ public class Frog extends Animal implements VariantHolder { + return this.level().purpurConfig.frogBreedingTicks; + } + ++ // DivineMC start - Add missing purpur config options ++ @Override ++ public boolean isSensitiveToWater() { ++ return level().purpurConfig.frogTakeDamageFromWater; ++ } ++ ++ @Override ++ public boolean isAlwaysExperienceDropper() { ++ return level().purpurConfig.frogAlwaysDropExp; ++ } ++ ++ @Override ++ public void initAttributes() { ++ this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(level().purpurConfig.frogMaxHealth); ++ } ++ // DivineMC end ++ + @Override + protected Brain.Provider brainProvider() { + return Brain.provider(MEMORY_TYPES, SENSOR_TYPES); +diff --git a/src/main/java/net/minecraft/world/entity/animal/frog/Tadpole.java b/src/main/java/net/minecraft/world/entity/animal/frog/Tadpole.java +index 1fbd034002fd5761011976510b9f9263ca0f5cac..6cdfb7a136180267d01432fb8f9c17a4badf94e7 100644 +--- a/src/main/java/net/minecraft/world/entity/animal/frog/Tadpole.java ++++ b/src/main/java/net/minecraft/world/entity/animal/frog/Tadpole.java +@@ -89,6 +89,23 @@ public class Tadpole extends AbstractFish { + } + // Purpur end + ++ // DivineMC start - Add missing purpur config options ++ @Override ++ public boolean isSensitiveToWater() { ++ return level().purpurConfig.tadpoleTakeDamageFromWater; ++ } ++ ++ @Override ++ public boolean isAlwaysExperienceDropper() { ++ return level().purpurConfig.tadpoleAlwaysDropExp; ++ } ++ ++ @Override ++ public void initAttributes() { ++ this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(level().purpurConfig.tadpoleMaxHealth); ++ } ++ // DivineMC end ++ + @Override + protected PathNavigation createNavigation(Level world) { + return new WaterBoundPathNavigation(this, world); +diff --git a/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java b/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java +index b8a055f938ade211c07ca5a74bade19707568eb1..883702ad3d9a020235d12f9f1600540c240a1196 100644 +--- a/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java ++++ b/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java +@@ -118,6 +118,18 @@ public class Sniffer extends Animal { + return this.level().purpurConfig.snifferBreedingTicks; + } + ++ // DivineMC start - Add missing purpur config options ++ @Override ++ public boolean isSensitiveToWater() { ++ return level().purpurConfig.snifferTakeDamageFromWater; ++ } ++ ++ @Override ++ public boolean isAlwaysExperienceDropper() { ++ return level().purpurConfig.snifferAlwaysDropExp; ++ } ++ // DivineMC end ++ + // CraftBukkit start - SPIGOT-7295: moved from constructor to appropriate location + @Override + protected void defineSynchedData() { +diff --git a/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java b/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java +index c23d192baf78890093b0e88d03735eef4569e75f..e1ceb3cea0741ff396eb031f0c6a0c644c8f0bfd 100644 +--- a/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java ++++ b/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java +@@ -149,6 +149,23 @@ public class Warden extends Monster implements VibrationSystem { + } + // Purpur end + ++ // DivineMC start - Add missing purpur config options ++ @Override ++ public boolean isSensitiveToWater() { ++ return level().purpurConfig.wardenTakeDamageFromWater; ++ } ++ ++ @Override ++ public boolean isAlwaysExperienceDropper() { ++ return level().purpurConfig.wardenAlwaysDropExp; ++ } ++ ++ @Override ++ public void initAttributes() { ++ this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(level().purpurConfig.wardenMaxHealth); ++ } ++ // DivineMC end ++ + @Override + public Packet getAddEntityPacket() { + return new ClientboundAddEntityPacket(this, this.hasPose(Pose.EMERGING) ? 1 : 0); +diff --git a/src/main/java/net/minecraft/world/entity/vehicle/ChestBoat.java b/src/main/java/net/minecraft/world/entity/vehicle/ChestBoat.java +index bc3fe45d12ffc2069a03d1587b7623d31130565a..968af79c48aac4c704e0d8b76144133da311826f 100644 +--- a/src/main/java/net/minecraft/world/entity/vehicle/ChestBoat.java ++++ b/src/main/java/net/minecraft/world/entity/vehicle/ChestBoat.java +@@ -30,6 +30,10 @@ import org.bukkit.craftbukkit.entity.CraftHumanEntity; + import org.bukkit.entity.HumanEntity; + import org.bukkit.inventory.InventoryHolder; + // CraftBukkit end ++// DivineMC start ++import org.purpurmc.purpur.PurpurConfig; ++// DivineMC end ++ + + public class ChestBoat extends Boat implements HasCustomInventoryScreen, ContainerEntity { + +@@ -41,7 +45,7 @@ public class ChestBoat extends Boat implements HasCustomInventoryScreen, Contain + + public ChestBoat(EntityType type, Level world) { + super(type, world); +- this.itemStacks = NonNullList.withSize(27, ItemStack.EMPTY); ++ this.itemStacks = NonNullList.withSize(PurpurConfig.chestBoatRows * 9, ItemStack.EMPTY); // DivineMC start - Add missing purpur config options + } + + public ChestBoat(Level world, double d0, double d1, double d2) { +diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java +index c3f095236093c436d37c4730f5537d4fbc0ea6c0..521dea797e35586558b5788f8aa73ab418b5c524 100644 +--- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java ++++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java +@@ -336,6 +336,7 @@ public class PurpurConfig { + } + + public static int barrelRows = 3; ++ public static int chestBoatRows = 3; // DivineMC - Add missing purpur config options + public static boolean enderChestSixRows = false; + public static boolean enderChestPermissionRows = false; + public static boolean cryingObsidianValidForPortalFrame = false; +@@ -376,6 +377,7 @@ public class PurpurConfig { + case 1 -> 9; + default -> 27; + }); ++ chestBoatRows = getInt("settings.blocks.chest_boat.rows", chestBoatRows); // DivineMC - Add missing purpur config options + enderChestSixRows = getBoolean("settings.blocks.ender_chest.six-rows", enderChestSixRows); + org.bukkit.event.inventory.InventoryType.ENDER_CHEST.setDefaultSize(enderChestSixRows ? 54 : 27); + enderChestPermissionRows = getBoolean("settings.blocks.ender_chest.use-permissions-for-rows", enderChestPermissionRows); +diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +index 2b4408d398962fa4feab9eb248540c6d11037a94..2a5ffe18753283519a623e77f5f0db349bdf288e 100644 +--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java ++++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +@@ -1195,7 +1195,17 @@ public class PurpurWorldConfig { + public boolean allayRidableInWater = true; + public boolean allayControllable = true; + public List allayRespectNBT = new ArrayList<>(); ++ // DivineMC start - Add missing purpur config options ++ public double allayMaxHealth = 20.0D; ++ public boolean allayTakeDamageFromWater = false; ++ public boolean allayAlwaysDropExp = false; ++ // DivineMC end + private void allaySettings() { ++ // DivineMC start - Add missing purpur config options ++ allayMaxHealth = getDouble("mobs.allay.max-health", allayMaxHealth); ++ allayTakeDamageFromWater = getBoolean("mobs.allay.take-damage-from-water", allayTakeDamageFromWater); ++ allayAlwaysDropExp = getBoolean("mobs.allay.always-drop-exp", allayAlwaysDropExp); ++ // DivineMC end + allayRidable = getBoolean("mobs.allay.ridable", allayRidable); + allayRidableInWater = getBoolean("mobs.allay.ridable-in-water", allayRidableInWater); + allayControllable = getBoolean("mobs.allay.controllable", allayControllable); +@@ -1314,7 +1324,15 @@ public class PurpurWorldConfig { + public double camelMovementSpeedMin = 0.09D; + public double camelMovementSpeedMax = 0.09D; + public int camelBreedingTicks = 6000; ++ // DivineMC start - Add missing purpur config options ++ public boolean camelTakeDamageFromWater = false; ++ public boolean camelAlwaysDropExp = false; ++ // DivineMC end + private void camelSettings() { ++ // DivineMC start - Add missing purpur config options ++ camelTakeDamageFromWater = getBoolean("mobs.camel.takes-damage-from-water", camelTakeDamageFromWater); ++ camelAlwaysDropExp = getBoolean("mobs.camel.always-drop-exp", camelAlwaysDropExp); ++ // DivineMC end + camelRidableInWater = getBoolean("mobs.camel.ridable-in-water", camelRidableInWater); + camelMaxHealthMin = getDouble("mobs.camel.attributes.max_health.min", camelMaxHealthMin); + camelMaxHealthMax = getDouble("mobs.camel.attributes.max_health.max", camelMaxHealthMax); +@@ -1744,7 +1762,17 @@ public class PurpurWorldConfig { + public boolean frogControllable = true; + public float frogRidableJumpHeight = 0.65F; + public int frogBreedingTicks = 6000; ++ // DivineMC start - Add missing purpur config options ++ public double frogMaxHealth = 10.0D; ++ public boolean frogTakeDamageFromWater = false; ++ public boolean frogAlwaysDropExp = false; ++ // DivineMC end + private void frogSettings() { ++ // DivineMC start - Add missing purpur config options ++ frogMaxHealth = getDouble("mobs.frog.attributes.max_health", frogMaxHealth); ++ frogTakeDamageFromWater = getBoolean("mobs.frog.takes-damage-from-water", frogTakeDamageFromWater); ++ frogAlwaysDropExp = getBoolean("mobs.frog.always-drop-exp", frogAlwaysDropExp); ++ // DivineMC end + frogRidable = getBoolean("mobs.frog.ridable", frogRidable); + frogRidableInWater = getBoolean("mobs.frog.ridable-in-water", frogRidableInWater); + frogControllable = getBoolean("mobs.frog.controllable", frogControllable); +@@ -2690,7 +2718,15 @@ public class PurpurWorldConfig { + public boolean snifferControllable = true; + public double snifferMaxHealth = 14.0D; + public int snifferBreedingTicks = 6000; ++ // DivineMC start - Add missing purpur config options ++ public boolean snifferTakeDamageFromWater = false; ++ public boolean snifferAlwaysDropExp = false; ++ // DivineMC end + private void snifferSettings() { ++ // DivineMC start - Add missing purpur config options ++ snifferTakeDamageFromWater = getBoolean("mobs.sniffer.takes-damage-from-water", snifferTakeDamageFromWater); ++ snifferAlwaysDropExp = getBoolean("mobs.sniffer.always-drop-exp", snifferAlwaysDropExp); ++ // DivineMC end + snifferRidable = getBoolean("mobs.sniffer.ridable", snifferRidable); + snifferRidableInWater = getBoolean("mobs.sniffer.ridable-in-water", snifferRidableInWater); + snifferControllable = getBoolean("mobs.sniffer.controllable", snifferControllable); +@@ -2789,7 +2825,17 @@ public class PurpurWorldConfig { + public boolean tadpoleRidable = false; + public boolean tadpoleRidableInWater = true; + public boolean tadpoleControllable = true; ++ // DivineMC start - Add missing purpur config options ++ public double tadpoleMaxHealth = 10.0D; ++ public boolean tadpoleTakeDamageFromWater = false; ++ public boolean tadpoleAlwaysDropExp = false; ++ // DivineMC end + private void tadpoleSettings() { ++ // DivineMC start - Add missing purpur config options ++ tadpoleMaxHealth = getDouble("mobs.tadpole.attributes.max_health", tadpoleMaxHealth); ++ tadpoleTakeDamageFromWater = getBoolean("mobs.tadpole.takes-damage-from-water", tadpoleTakeDamageFromWater); ++ tadpoleAlwaysDropExp = getBoolean("mobs.tadpole.always-drop-exp", tadpoleAlwaysDropExp); ++ // DivineMC end + tadpoleRidable = getBoolean("mobs.tadpole.ridable", tadpoleRidable); + tadpoleRidableInWater = getBoolean("mobs.tadpole.ridable-in-water", tadpoleRidableInWater); + tadpoleControllable = getBoolean("mobs.tadpole.controllable", tadpoleControllable); +@@ -2999,7 +3045,17 @@ public class PurpurWorldConfig { + public boolean wardenRidable = false; + public boolean wardenRidableInWater = true; + public boolean wardenControllable = true; ++ // DivineMC start - Add missing purpur config options ++ public double wardenMaxHealth = 500.0D; ++ public boolean wardenTakeDamageFromWater = false; ++ public boolean wardenAlwaysDropExp = false; ++ // DivineMC end + private void wardenSettings() { ++ // DivineMC start - Add missing purpur config options ++ wardenMaxHealth = getDouble("mobs.warden.attributes.max_health", wardenMaxHealth); ++ wardenTakeDamageFromWater = getBoolean("mobs.warden.takes-damage-from-water", wardenTakeDamageFromWater); ++ wardenAlwaysDropExp = getBoolean("mobs.warden.always-drop-exp", wardenAlwaysDropExp); ++ // DivineMC end + wardenRidable = getBoolean("mobs.warden.ridable", wardenRidable); + wardenRidableInWater = getBoolean("mobs.warden.ridable-in-water", wardenRidableInWater); + wardenControllable = getBoolean("mobs.warden.controllable", wardenControllable); diff --git a/patches/server/0051-Fix-MC-266334.patch b/patches/server/0051-Fix-MC-266334.patch new file mode 100644 index 000000000..714a96497 --- /dev/null +++ b/patches/server/0051-Fix-MC-266334.patch @@ -0,0 +1,46 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: lilingfengdev +Date: Tue, 16 Jan 2024 20:15:11 +0800 +Subject: [PATCH] Fix MC-266334 + + +diff --git a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java +index 1ea348b6007d8aebf1e0f29018a03eb10c445369..9fff19c3daf8112499246dd489a5f03842e8da5c 100644 +--- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java ++++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java +@@ -48,7 +48,9 @@ import org.bukkit.craftbukkit.inventory.CraftItemStack; + import org.bukkit.entity.Player; + import org.bukkit.event.player.PlayerArmorStandManipulateEvent; + // CraftBukkit end +- ++// Leaf start ++import org.dreeam.leaf.LeafConfig; ++// Leaf end + public class ArmorStand extends LivingEntity { + + public static final int WOBBLE_TIME = 5; +@@ -514,7 +516,9 @@ public class ArmorStand extends LivingEntity { + } else { + boolean flag = source.is(DamageTypeTags.CAN_BREAK_ARMOR_STAND); + boolean flag1 = source.is(DamageTypeTags.ALWAYS_KILLS_ARMOR_STANDS); +- ++ if (DivineConfig.fixMc266334 && !flag && source.getDirectEntity() instanceof net.minecraft.world.entity.projectile.ShulkerBullet){ ++ return false; ++ } + if (!flag && !flag1) { + return false; + } else { +diff --git a/src/main/java/org/dreeam/leaf/LeafConfig.java b/src/main/java/org/dreeam/leaf/LeafConfig.java +index c51b54bcb96d06197d6265055e2e9e44858cd224..e4bfb584635fa497279fd6c14211a420b1ae1914 100644 +--- a/src/main/java/org/dreeam/leaf/LeafConfig.java ++++ b/src/main/java/org/dreeam/leaf/LeafConfig.java +@@ -313,4 +313,9 @@ public class LeafConfig { + extraHorizontal = getDouble("playerKnockback.extraHorizontal", extraHorizontal); + extraVertical = getDouble("playerKnockback.extraVertical", extraVertical); + } ++ ++ public static boolean fixMc266334 = false; ++ private static void fixMc266334() { ++ fixMc266334 = getBoolean("bugfix.mc-266334", fixMc266334,"Fix for MC-266334"); ++ } + } diff --git a/patches/server/0052-amend.patch b/patches/server/0052-amend.patch new file mode 100644 index 000000000..28cfcb034 --- /dev/null +++ b/patches/server/0052-amend.patch @@ -0,0 +1,19 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: lilingfengdev +Date: Tue, 16 Jan 2024 20:22:55 +0800 +Subject: [PATCH] --amend + + +diff --git a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java +index 9fff19c3daf8112499246dd489a5f03842e8da5c..54bb5e19938f1f11f0b0729ff6435215ae7d609b 100644 +--- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java ++++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java +@@ -516,7 +516,7 @@ public class ArmorStand extends LivingEntity { + } else { + boolean flag = source.is(DamageTypeTags.CAN_BREAK_ARMOR_STAND); + boolean flag1 = source.is(DamageTypeTags.ALWAYS_KILLS_ARMOR_STANDS); +- if (DivineConfig.fixMc266334 && !flag && source.getDirectEntity() instanceof net.minecraft.world.entity.projectile.ShulkerBullet){ ++ if (LeafConfig.fixMc266334 && !flag && source.getDirectEntity() instanceof net.minecraft.world.entity.projectile.ShulkerBullet){ + return false; + } + if (!flag && !flag1) {