250 patches...

This commit is contained in:
granny
2024-10-26 01:00:13 -07:00
parent bc370d5521
commit b7daf30869
50 changed files with 637 additions and 637 deletions

View File

@@ -243,10 +243,10 @@ index 94ca0407303c4493ab4928b12ec6ecc75aaca549..a138e1b6b66d99f2035de054137a607a
+ // Purpur end - OfflinePlayer API + // Purpur end - OfflinePlayer API
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 9df9b518f6188a758d9a712def36dadb9dd94f21..b6db9d9326f30deb02d5530e014bd3abbaf9c54e 100644 index 32f0aa352a4809573784451bccd70ae8c02590f4..0d7e460cc73d7e236883e71ab77d51c7ef5e72ce 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2763,6 +2763,28 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -2793,6 +2793,28 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
return this.getHandle().getAbilities().walkingSpeed * 2f; return this.getHandle().getAbilities().walkingSpeed * 2f;
} }

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Added the ability to add combustible items
diff --git a/src/main/java/net/minecraft/world/inventory/AbstractFurnaceMenu.java b/src/main/java/net/minecraft/world/inventory/AbstractFurnaceMenu.java diff --git a/src/main/java/net/minecraft/world/inventory/AbstractFurnaceMenu.java b/src/main/java/net/minecraft/world/inventory/AbstractFurnaceMenu.java
index 58a5338e73aedaa3744dced128ac3eb6f5f6f87e..f032a3e76e2af3ebd67d202066f3bcac8e52d29e 100644 index 1240df9368855f836412b06cf564926a18bfe90d..e559eabed82d2f402908e5b80d1505076ccc53a2 100644
--- a/src/main/java/net/minecraft/world/inventory/AbstractFurnaceMenu.java --- a/src/main/java/net/minecraft/world/inventory/AbstractFurnaceMenu.java
+++ b/src/main/java/net/minecraft/world/inventory/AbstractFurnaceMenu.java +++ b/src/main/java/net/minecraft/world/inventory/AbstractFurnaceMenu.java
@@ -147,7 +147,13 @@ public abstract class AbstractFurnaceMenu extends RecipeBookMenu<SingleRecipeInp @@ -114,7 +114,13 @@ public abstract class AbstractFurnaceMenu extends RecipeBookMenu {
} else if (slot != 1 && slot != 0) { } else if (slot != 1 && slot != 0) {
if (this.canSmelt(itemstack1)) { if (this.canSmelt(itemstack1)) {
if (!this.moveItemStackTo(itemstack1, 0, 1, false)) { if (!this.moveItemStackTo(itemstack1, 0, 1, false)) {
@@ -24,11 +24,11 @@ index 58a5338e73aedaa3744dced128ac3eb6f5f6f87e..f032a3e76e2af3ebd67d202066f3bcac
} else if (this.isFuel(itemstack1)) { } else if (this.isFuel(itemstack1)) {
if (!this.moveItemStackTo(itemstack1, 1, 2, false)) { if (!this.moveItemStackTo(itemstack1, 1, 2, false)) {
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 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 699bdc1f01a95ecdfe899493c8d81ec31cc9fa4b..d12469a1bbd37026012bfd6bce30d7a2593779da 100644 index 91a158ed90b7ce3eac7277fd962682a0226c08ed..658893b06a994c7b927ae40db2c1284d606c35c2 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java --- a/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
@@ -213,6 +213,22 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit @@ -131,6 +131,22 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit
} this.recipeType = recipeType; // Paper - cook speed multiplier API
} }
+ // Purpur start + // Purpur start
@@ -51,10 +51,10 @@ index 699bdc1f01a95ecdfe899493c8d81ec31cc9fa4b..d12469a1bbd37026012bfd6bce30d7a2
private int maxStack = MAX_STACK; private int maxStack = MAX_STACK;
public List<HumanEntity> transaction = new java.util.ArrayList<HumanEntity>(); public List<HumanEntity> transaction = new java.util.ArrayList<HumanEntity>();
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index eb764777e7bb1c8f6300ae74726891d9df95107b..8fc42922d2f5ab3de6050fe9e5f1d7a0b4ed19de 100644 index ac0dd26ecaa3d6a4ef0ebd271ec5c328f5320399..4eb332ed95fd0ca196f3712037deb7637bfa4d8b 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1613,6 +1613,19 @@ public final class CraftServer implements Server { @@ -1590,6 +1590,19 @@ public final class CraftServer implements Server {
return true; return true;
} }

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Option for if rain and thunder should stop on sleep
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index c31fd59a311e3e131c8a5fee9f66619f1761ab06..4cae0fbd061b76b7bf9e42fa8c6560721fd4b19c 100644 index c70a1ca4ed978df1b54363e966a8344a2fe6f277..de24307e48e7bc6cc39234fae55ddb404df243b3 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java --- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -1230,6 +1230,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf. @@ -1278,6 +1278,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
@VisibleForTesting @VisibleForTesting
public void resetWeatherCycle() { public void resetWeatherCycle() {
// CraftBukkit start // CraftBukkit start
@@ -16,7 +16,7 @@ index c31fd59a311e3e131c8a5fee9f66619f1761ab06..4cae0fbd061b76b7bf9e42fa8c656072
this.serverLevelData.setRaining(false, org.bukkit.event.weather.WeatherChangeEvent.Cause.SLEEP); // Paper - Add cause to Weather/ThunderChangeEvents this.serverLevelData.setRaining(false, org.bukkit.event.weather.WeatherChangeEvent.Cause.SLEEP); // Paper - Add cause to Weather/ThunderChangeEvents
// If we stop due to everyone sleeping we should reset the weather duration to some other random value. // If we stop due to everyone sleeping we should reset the weather duration to some other random value.
// Not that everyone ever manages to get the whole server to sleep at the same time.... // Not that everyone ever manages to get the whole server to sleep at the same time....
@@ -1237,6 +1238,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf. @@ -1285,6 +1286,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
this.serverLevelData.setRainTime(0); this.serverLevelData.setRainTime(0);
} }
// CraftBukkit end // CraftBukkit end
@@ -25,21 +25,21 @@ index c31fd59a311e3e131c8a5fee9f66619f1761ab06..4cae0fbd061b76b7bf9e42fa8c656072
// CraftBukkit start // CraftBukkit start
// If we stop due to everyone sleeping we should reset the weather duration to some other random value. // If we stop due to everyone sleeping we should reset the weather duration to some other random value.
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index 369ea95c71d1313a49e75f06bff7aa095eb50e8b..226d2a772b35156df75648743978e7d97cd3b1ba 100644 index cce5813f0624fabf8a9e38d2eb9d1d1d63f15b70..91debf506c8f1ece992586a1d0328304e358d88a 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -140,6 +140,8 @@ public class PurpurWorldConfig { @@ -139,6 +139,8 @@ public class PurpurWorldConfig {
public int raidCooldownSeconds = 0; public boolean tickFluids = true;
public int animalBreedingCooldownSeconds = 0; public double mobsBlindnessMultiplier = 1;
public boolean mobsIgnoreRails = false; public boolean mobsIgnoreRails = false;
+ public boolean rainStopsAfterSleep = true; + public boolean rainStopsAfterSleep = true;
+ public boolean thunderStopsAfterSleep = true; + public boolean thunderStopsAfterSleep = true;
private void miscGameplayMechanicsSettings() { private void miscGameplayMechanicsSettings() {
useBetterMending = getBoolean("gameplay-mechanics.use-better-mending", useBetterMending); useBetterMending = getBoolean("gameplay-mechanics.use-better-mending", useBetterMending);
alwaysTameInCreative = getBoolean("gameplay-mechanics.always-tame-in-creative", alwaysTameInCreative); alwaysTameInCreative = getBoolean("gameplay-mechanics.always-tame-in-creative", alwaysTameInCreative);
@@ -162,6 +164,8 @@ public class PurpurWorldConfig { @@ -160,6 +162,8 @@ public class PurpurWorldConfig {
raidCooldownSeconds = getInt("gameplay-mechanics.raid-cooldown-seconds", raidCooldownSeconds); tickFluids = getBoolean("gameplay-mechanics.tick-fluids", tickFluids);
animalBreedingCooldownSeconds = getInt("gameplay-mechanics.animal-breeding-cooldown-seconds", animalBreedingCooldownSeconds); mobsBlindnessMultiplier = getDouble("gameplay-mechanics.entity-blindness-multiplier", mobsBlindnessMultiplier);
mobsIgnoreRails = getBoolean("gameplay-mechanics.mobs-ignore-rails", mobsIgnoreRails); mobsIgnoreRails = getBoolean("gameplay-mechanics.mobs-ignore-rails", mobsIgnoreRails);
+ rainStopsAfterSleep = getBoolean("gameplay-mechanics.rain-stops-after-sleep", rainStopsAfterSleep); + rainStopsAfterSleep = getBoolean("gameplay-mechanics.rain-stops-after-sleep", rainStopsAfterSleep);
+ thunderStopsAfterSleep = getBoolean("gameplay-mechanics.thunder-stops-after-sleep", thunderStopsAfterSleep); + thunderStopsAfterSleep = getBoolean("gameplay-mechanics.thunder-stops-after-sleep", thunderStopsAfterSleep);

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Chance for azalea blocks to grow into trees naturally
diff --git a/src/main/java/net/minecraft/world/level/block/AzaleaBlock.java b/src/main/java/net/minecraft/world/level/block/AzaleaBlock.java diff --git a/src/main/java/net/minecraft/world/level/block/AzaleaBlock.java b/src/main/java/net/minecraft/world/level/block/AzaleaBlock.java
index fad69dfc20574ab23634b14252b50929cca75b21..7082486f6b760bed2a61938f493d5124722b58e2 100644 index affbbf6abc6bc09ecb652c1dee92aa297458bc39..febc05dc39741807127cba4a2a55aaad62b0800c 100644
--- a/src/main/java/net/minecraft/world/level/block/AzaleaBlock.java --- a/src/main/java/net/minecraft/world/level/block/AzaleaBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/AzaleaBlock.java +++ b/src/main/java/net/minecraft/world/level/block/AzaleaBlock.java
@@ -49,6 +49,20 @@ public class AzaleaBlock extends BushBlock implements BonemealableBlock { @@ -50,6 +50,20 @@ public class AzaleaBlock extends BushBlock implements BonemealableBlock {
@Override @Override
public void performBonemeal(ServerLevel world, RandomSource random, BlockPos pos, BlockState state) { public void performBonemeal(ServerLevel world, RandomSource random, BlockPos pos, BlockState state) {
@@ -30,30 +30,30 @@ index fad69dfc20574ab23634b14252b50929cca75b21..7082486f6b760bed2a61938f493d5124
} }
diff --git a/src/main/java/net/minecraft/world/level/block/Blocks.java b/src/main/java/net/minecraft/world/level/block/Blocks.java diff --git a/src/main/java/net/minecraft/world/level/block/Blocks.java b/src/main/java/net/minecraft/world/level/block/Blocks.java
index 223259e7a09ada681b6181c898f6857888594f85..7d58a95f7ae8983b466b275f4f82597d38762af0 100644 index 66a07f7cbf1c1d6ecbe055cbf4f63eb07d93e90c..63d67d46d30ed8ed57cdc0e59b6cb6b75ab22c1f 100644
--- a/src/main/java/net/minecraft/world/level/block/Blocks.java --- a/src/main/java/net/minecraft/world/level/block/Blocks.java
+++ b/src/main/java/net/minecraft/world/level/block/Blocks.java +++ b/src/main/java/net/minecraft/world/level/block/Blocks.java
@@ -7361,6 +7361,7 @@ public class Blocks { @@ -6465,6 +6465,7 @@ public class Blocks {
BlockBehaviour.Properties.of() BlockBehaviour.Properties.of()
.mapColor(MapColor.PLANT) .mapColor(MapColor.PLANT)
.forceSolidOff() .forceSolidOff()
+ .randomTicks() // Purpur + .randomTicks() // Purpur
.instabreak() .instabreak()
.sound(SoundType.AZALEA) .sound(SoundType.AZALEA)
.noOcclusion() .noOcclusion()
@@ -7373,6 +7374,7 @@ public class Blocks { @@ -6476,6 +6477,7 @@ public class Blocks {
BlockBehaviour.Properties.of() BlockBehaviour.Properties.of()
.mapColor(MapColor.PLANT) .mapColor(MapColor.PLANT)
.forceSolidOff() .forceSolidOff()
+ .randomTicks() // Purpur + .randomTicks() // Purpur
.instabreak() .instabreak()
.sound(SoundType.FLOWERING_AZALEA) .sound(SoundType.FLOWERING_AZALEA)
.noOcclusion() .noOcclusion()
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index 226d2a772b35156df75648743978e7d97cd3b1ba..73283dd57a67ff0d7fa65ab279b4d21c2030d4f8 100644 index 91debf506c8f1ece992586a1d0328304e358d88a..0a4626ea59c854d072972e78f06df3808797503f 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -765,6 +765,11 @@ public class PurpurWorldConfig { @@ -763,6 +763,11 @@ public class PurpurWorldConfig {
anvilColorsUseMiniMessage = getBoolean("blocks.anvil.use-mini-message", anvilColorsUseMiniMessage); anvilColorsUseMiniMessage = getBoolean("blocks.anvil.use-mini-message", anvilColorsUseMiniMessage);
} }
@@ -65,7 +65,7 @@ index 226d2a772b35156df75648743978e7d97cd3b1ba..73283dd57a67ff0d7fa65ab279b4d21c
public int beaconLevelOne = 20; public int beaconLevelOne = 20;
public int beaconLevelTwo = 30; public int beaconLevelTwo = 30;
public int beaconLevelThree = 40; public int beaconLevelThree = 40;
@@ -902,6 +907,11 @@ public class PurpurWorldConfig { @@ -900,6 +905,11 @@ public class PurpurWorldConfig {
farmlandTramplingFeatherFalling = getBoolean("blocks.farmland.feather-fall-distance-affects-trampling", farmlandTramplingFeatherFalling); farmlandTramplingFeatherFalling = getBoolean("blocks.farmland.feather-fall-distance-affects-trampling", farmlandTramplingFeatherFalling);
} }

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Shift right click to use exp for mending
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
index d3c49951c0bd7db4352326d3113f0ca9da393fab..28731f0c5b0ba63fa8d5ce3ee580bf314a844f92 100644 index 8ad07b6939831f57469bb6ad7c78b2c7e3b17fea..0f3dbe848ad923733e356c344a00667c6da0ab83 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java --- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
@@ -518,6 +518,7 @@ public class ServerPlayerGameMode { @@ -524,6 +524,7 @@ public class ServerPlayerGameMode {
public InteractionHand interactHand; public InteractionHand interactHand;
public ItemStack interactItemStack; public ItemStack interactItemStack;
public InteractionResult useItemOn(ServerPlayer player, Level world, ItemStack stack, InteractionHand hand, BlockHitResult hitResult) { public InteractionResult useItemOn(ServerPlayer player, Level world, ItemStack stack, InteractionHand hand, BlockHitResult hitResult) {
@@ -16,7 +16,7 @@ index d3c49951c0bd7db4352326d3113f0ca9da393fab..28731f0c5b0ba63fa8d5ce3ee580bf31
BlockPos blockposition = hitResult.getBlockPos(); BlockPos blockposition = hitResult.getBlockPos();
BlockState iblockdata = world.getBlockState(blockposition); BlockState iblockdata = world.getBlockState(blockposition);
boolean cancelledBlock = false; boolean cancelledBlock = false;
@@ -626,4 +627,18 @@ public class ServerPlayerGameMode { @@ -632,4 +633,18 @@ public class ServerPlayerGameMode {
public void setLevel(ServerLevel world) { public void setLevel(ServerLevel world) {
this.level = world; this.level = world;
} }
@@ -36,10 +36,10 @@ index d3c49951c0bd7db4352326d3113f0ca9da393fab..28731f0c5b0ba63fa8d5ce3ee580bf31
+ // Purpur end + // Purpur end
} }
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index b7f8499cabbd28c0679d0c775b009c9cdf53b5f8..cdb5062d4d6325ada90dec3d4de6c0fd7546e8ab 100644 index c3fd22396eaf85ac4d7a0aeba67b5c26a748be4c..8da850ab34e576caf89681171124f617f57d00a7 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2075,6 +2075,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @@ -2020,6 +2020,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
boolean cancelled; boolean cancelled;
if (movingobjectposition == null || movingobjectposition.getType() != HitResult.Type.BLOCK) { if (movingobjectposition == null || movingobjectposition.getType() != HitResult.Type.BLOCK) {
@@ -48,10 +48,10 @@ index b7f8499cabbd28c0679d0c775b009c9cdf53b5f8..cdb5062d4d6325ada90dec3d4de6c0fd
cancelled = event.useItemInHand() == Event.Result.DENY; cancelled = event.useItemInHand() == Event.Result.DENY;
} else { } else {
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index 73283dd57a67ff0d7fa65ab279b4d21c2030d4f8..58ffc28078756435e6ddfdea4109d61375eecc54 100644 index 0a4626ea59c854d072972e78f06df3808797503f..025982aac35116320ff41203645e606504640940 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -404,6 +404,7 @@ public class PurpurWorldConfig { @@ -402,6 +402,7 @@ public class PurpurWorldConfig {
public boolean playerBurpWhenFull = false; public boolean playerBurpWhenFull = false;
public boolean playerRidableInWater = false; public boolean playerRidableInWater = false;
public boolean playerRemoveBindingWithWeakness = false; public boolean playerRemoveBindingWithWeakness = false;
@@ -59,7 +59,7 @@ index 73283dd57a67ff0d7fa65ab279b4d21c2030d4f8..58ffc28078756435e6ddfdea4109d613
private void playerSettings() { private void playerSettings() {
if (PurpurConfig.version < 19) { if (PurpurConfig.version < 19) {
boolean oldVal = getBoolean("gameplay-mechanics.player.idle-timeout.mods-target", idleTimeoutTargetPlayer); boolean oldVal = getBoolean("gameplay-mechanics.player.idle-timeout.mods-target", idleTimeoutTargetPlayer);
@@ -428,6 +429,7 @@ public class PurpurWorldConfig { @@ -426,6 +427,7 @@ public class PurpurWorldConfig {
playerBurpWhenFull = getBoolean("gameplay-mechanics.player.burp-when-full", playerBurpWhenFull); playerBurpWhenFull = getBoolean("gameplay-mechanics.player.burp-when-full", playerBurpWhenFull);
playerRidableInWater = getBoolean("gameplay-mechanics.player.ridable-in-water", playerRidableInWater); playerRidableInWater = getBoolean("gameplay-mechanics.player.ridable-in-water", playerRidableInWater);
playerRemoveBindingWithWeakness = getBoolean("gameplay-mechanics.player.curse-of-binding.remove-with-weakness", playerRemoveBindingWithWeakness); playerRemoveBindingWithWeakness = getBoolean("gameplay-mechanics.player.curse-of-binding.remove-with-weakness", playerRemoveBindingWithWeakness);

View File

@@ -5,26 +5,26 @@ Subject: [PATCH] Dolphins naturally aggressive to players chance
diff --git a/src/main/java/net/minecraft/world/entity/animal/Dolphin.java b/src/main/java/net/minecraft/world/entity/animal/Dolphin.java diff --git a/src/main/java/net/minecraft/world/entity/animal/Dolphin.java b/src/main/java/net/minecraft/world/entity/animal/Dolphin.java
index c7bc9e0152419aa44fd2a4dcf2ce1f0b972e432e..ffc29ab9105b20aba15a0ce12d5ec7fa18f521f3 100644 index bcc6435c177189aa59a3fbe67795ae5092685133..515fa6120554d9b2aad32257c48577e6458cd2ff 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Dolphin.java --- a/src/main/java/net/minecraft/world/entity/animal/Dolphin.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Dolphin.java +++ b/src/main/java/net/minecraft/world/entity/animal/Dolphin.java
@@ -81,6 +81,7 @@ public class Dolphin extends WaterAnimal { @@ -85,6 +85,7 @@ public class Dolphin extends AgeableWaterCreature {
public static final Predicate<ItemEntity> ALLOWED_ITEMS = (entityitem) -> {
return !entityitem.hasPickUpDelay() && entityitem.isAlive() && entityitem.isInWater(); return !entityitem.hasPickUpDelay() && entityitem.isAlive() && entityitem.isInWater();
}; };
public static final float BABY_SCALE = 0.65F;
+ private boolean isNaturallyAggressiveToPlayers; // Purpur + private boolean isNaturallyAggressiveToPlayers; // Purpur
private int spitCooldown; // Purpur private int spitCooldown; // Purpur
public Dolphin(EntityType<? extends Dolphin> type, Level world) { public Dolphin(EntityType<? extends Dolphin> type, Level world) {
@@ -173,6 +174,7 @@ public class Dolphin extends WaterAnimal { @@ -180,6 +181,7 @@ public class Dolphin extends AgeableWaterCreature {
public SpawnGroupData finalizeSpawn(ServerLevelAccessor world, DifficultyInstance difficulty, MobSpawnType spawnReason, @Nullable SpawnGroupData entityData) { SpawnGroupData groupdataentity1 = (SpawnGroupData) Objects.requireNonNullElseGet(entityData, () -> {
this.setAirSupply(this.getMaxAirSupply()); return new AgeableMob.AgeableMobGroupData(0.1F);
this.setXRot(0.0F); });
+ this.isNaturallyAggressiveToPlayers = world.getLevel().purpurConfig.dolphinNaturallyAggressiveToPlayersChance > 0.0D && random.nextDouble() <= world.getLevel().purpurConfig.dolphinNaturallyAggressiveToPlayersChance; // Purpur + this.isNaturallyAggressiveToPlayers = world.getLevel().purpurConfig.dolphinNaturallyAggressiveToPlayersChance > 0.0D && random.nextDouble() <= world.getLevel().purpurConfig.dolphinNaturallyAggressiveToPlayersChance; // Purpur
return super.finalizeSpawn(world, difficulty, spawnReason, entityData);
}
@@ -237,6 +239,7 @@ public class Dolphin extends WaterAnimal { return super.finalizeSpawn(world, difficulty, spawnReason, groupdataentity1);
}
@@ -256,6 +258,7 @@ public class Dolphin extends AgeableWaterCreature {
protected void registerGoals() { protected void registerGoals() {
this.goalSelector.addGoal(0, new BreathAirGoal(this)); this.goalSelector.addGoal(0, new BreathAirGoal(this));
this.goalSelector.addGoal(0, new TryFindWaterGoal(this)); this.goalSelector.addGoal(0, new TryFindWaterGoal(this));
@@ -32,7 +32,7 @@ index c7bc9e0152419aa44fd2a4dcf2ce1f0b972e432e..ffc29ab9105b20aba15a0ce12d5ec7fa
this.goalSelector.addGoal(0, new org.purpurmc.purpur.entity.ai.HasRider(this)); // Purpur this.goalSelector.addGoal(0, new org.purpurmc.purpur.entity.ai.HasRider(this)); // Purpur
this.goalSelector.addGoal(1, new Dolphin.DolphinSwimToTreasureGoal(this)); this.goalSelector.addGoal(1, new Dolphin.DolphinSwimToTreasureGoal(this));
this.goalSelector.addGoal(2, new Dolphin.DolphinSwimWithPlayerGoal(this, 4.0D)); this.goalSelector.addGoal(2, new Dolphin.DolphinSwimWithPlayerGoal(this, 4.0D));
@@ -244,12 +247,13 @@ public class Dolphin extends WaterAnimal { @@ -263,12 +266,13 @@ public class Dolphin extends AgeableWaterCreature {
this.goalSelector.addGoal(4, new RandomLookAroundGoal(this)); this.goalSelector.addGoal(4, new RandomLookAroundGoal(this));
this.goalSelector.addGoal(5, new LookAtPlayerGoal(this, Player.class, 6.0F)); this.goalSelector.addGoal(5, new LookAtPlayerGoal(this, Player.class, 6.0F));
this.goalSelector.addGoal(5, new DolphinJumpGoal(this, 10)); this.goalSelector.addGoal(5, new DolphinJumpGoal(this, 10));
@@ -48,10 +48,10 @@ index c7bc9e0152419aa44fd2a4dcf2ce1f0b972e432e..ffc29ab9105b20aba15a0ce12d5ec7fa
public static AttributeSupplier.Builder createAttributes() { public static AttributeSupplier.Builder createAttributes() {
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index 58ffc28078756435e6ddfdea4109d61375eecc54..8f1aca2fc119fd1324198adb92507c34ad4bc6c2 100644 index 025982aac35116320ff41203645e606504640940..3f10fe595960a69ed372f80c1b28acd9e956516b 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -1345,6 +1345,7 @@ public class PurpurWorldConfig { @@ -1343,6 +1343,7 @@ public class PurpurWorldConfig {
public double dolphinScale = 1.0D; public double dolphinScale = 1.0D;
public boolean dolphinDisableTreasureSearching = false; public boolean dolphinDisableTreasureSearching = false;
public boolean dolphinTakeDamageFromWater = false; public boolean dolphinTakeDamageFromWater = false;
@@ -59,7 +59,7 @@ index 58ffc28078756435e6ddfdea4109d61375eecc54..8f1aca2fc119fd1324198adb92507c34
private void dolphinSettings() { private void dolphinSettings() {
dolphinRidable = getBoolean("mobs.dolphin.ridable", dolphinRidable); dolphinRidable = getBoolean("mobs.dolphin.ridable", dolphinRidable);
dolphinControllable = getBoolean("mobs.dolphin.controllable", dolphinControllable); dolphinControllable = getBoolean("mobs.dolphin.controllable", dolphinControllable);
@@ -1360,6 +1361,7 @@ public class PurpurWorldConfig { @@ -1358,6 +1359,7 @@ public class PurpurWorldConfig {
dolphinScale = Mth.clamp(getDouble("mobs.dolphin.attributes.scale", dolphinScale), 0.0625D, 16.0D); dolphinScale = Mth.clamp(getDouble("mobs.dolphin.attributes.scale", dolphinScale), 0.0625D, 16.0D);
dolphinDisableTreasureSearching = getBoolean("mobs.dolphin.disable-treasure-searching", dolphinDisableTreasureSearching); dolphinDisableTreasureSearching = getBoolean("mobs.dolphin.disable-treasure-searching", dolphinDisableTreasureSearching);
dolphinTakeDamageFromWater = getBoolean("mobs.dolphin.takes-damage-from-water", dolphinTakeDamageFromWater); dolphinTakeDamageFromWater = getBoolean("mobs.dolphin.takes-damage-from-water", dolphinTakeDamageFromWater);

View File

@@ -5,7 +5,7 @@ Subject: [PATCH] Cows naturally aggressive to players chance
diff --git a/src/main/java/net/minecraft/world/entity/animal/Cow.java b/src/main/java/net/minecraft/world/entity/animal/Cow.java diff --git a/src/main/java/net/minecraft/world/entity/animal/Cow.java b/src/main/java/net/minecraft/world/entity/animal/Cow.java
index 2b1b1243fa1e60985ab6fcd0dda9f71db7e3352c..a9820dda0ddf1863080f4169d70eff9c81546bcd 100644 index 9c3bdf70c70328df4bfc13cb09aeef4b190cd77e..234785a387f445b3e40978978a647140b3490072 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Cow.java --- a/src/main/java/net/minecraft/world/entity/animal/Cow.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Cow.java +++ b/src/main/java/net/minecraft/world/entity/animal/Cow.java
@@ -37,6 +37,7 @@ import org.bukkit.event.player.PlayerBucketFillEvent; @@ -37,6 +37,7 @@ import org.bukkit.event.player.PlayerBucketFillEvent;
@@ -55,16 +55,16 @@ index 2b1b1243fa1e60985ab6fcd0dda9f71db7e3352c..a9820dda0ddf1863080f4169d70eff9c
} }
public static AttributeSupplier.Builder createAttributes() { public static AttributeSupplier.Builder createAttributes() {
- return Mob.createMobAttributes().add(Attributes.MAX_HEALTH, 10.0D).add(Attributes.MOVEMENT_SPEED, 0.20000000298023224D); - return Animal.createAnimalAttributes().add(Attributes.MAX_HEALTH, 10.0D).add(Attributes.MOVEMENT_SPEED, 0.20000000298023224D);
+ return Mob.createMobAttributes().add(Attributes.MAX_HEALTH, 10.0D).add(Attributes.MOVEMENT_SPEED, 0.20000000298023224D).add(Attributes.ATTACK_DAMAGE, 0.0D); // Purpur + return Animal.createAnimalAttributes().add(Attributes.MAX_HEALTH, 10.0D).add(Attributes.MOVEMENT_SPEED, 0.20000000298023224D).add(Attributes.ATTACK_DAMAGE, 0.0D); // Purpur
} }
@Override @Override
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index 8f1aca2fc119fd1324198adb92507c34ad4bc6c2..bc7afc07964aa56f1913ffb0888eb1b37a13999d 100644 index 3f10fe595960a69ed372f80c1b28acd9e956516b..09465c479f1074d76be88713f727c648be61bf06 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -1290,7 +1290,14 @@ public class PurpurWorldConfig { @@ -1288,7 +1288,14 @@ public class PurpurWorldConfig {
public int cowFeedMushrooms = 0; public int cowFeedMushrooms = 0;
public int cowBreedingTicks = 6000; public int cowBreedingTicks = 6000;
public boolean cowTakeDamageFromWater = false; public boolean cowTakeDamageFromWater = false;
@@ -79,7 +79,7 @@ index 8f1aca2fc119fd1324198adb92507c34ad4bc6c2..bc7afc07964aa56f1913ffb0888eb1b3
cowRidable = getBoolean("mobs.cow.ridable", cowRidable); cowRidable = getBoolean("mobs.cow.ridable", cowRidable);
cowRidableInWater = getBoolean("mobs.cow.ridable-in-water", cowRidableInWater); cowRidableInWater = getBoolean("mobs.cow.ridable-in-water", cowRidableInWater);
cowControllable = getBoolean("mobs.cow.controllable", cowControllable); cowControllable = getBoolean("mobs.cow.controllable", cowControllable);
@@ -1304,6 +1311,8 @@ public class PurpurWorldConfig { @@ -1302,6 +1309,8 @@ public class PurpurWorldConfig {
cowFeedMushrooms = getInt("mobs.cow.feed-mushrooms-for-mooshroom", cowFeedMushrooms); cowFeedMushrooms = getInt("mobs.cow.feed-mushrooms-for-mooshroom", cowFeedMushrooms);
cowBreedingTicks = getInt("mobs.cow.breeding-delay-ticks", cowBreedingTicks); cowBreedingTicks = getInt("mobs.cow.breeding-delay-ticks", cowBreedingTicks);
cowTakeDamageFromWater = getBoolean("mobs.cow.takes-damage-from-water", cowTakeDamageFromWater); cowTakeDamageFromWater = getBoolean("mobs.cow.takes-damage-from-water", cowTakeDamageFromWater);

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Option for beds to explode on villager sleep
diff --git a/src/main/java/net/minecraft/world/entity/npc/Villager.java b/src/main/java/net/minecraft/world/entity/npc/Villager.java 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 671d1dafbfe2f8ba24096f78e2661014d00a5e09..cef163bc12629d538582d7735ed47bd31448d5cc 100644 index 3b17133289f95e5420f1c0a73b34b953470df533..cd57f70a20f3b6b1eb1fd5d336be6297268c9605 100644
--- a/src/main/java/net/minecraft/world/entity/npc/Villager.java --- a/src/main/java/net/minecraft/world/entity/npc/Villager.java
+++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java +++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java
@@ -1107,6 +1107,12 @@ public class Villager extends AbstractVillager implements ReputationEventHandler @@ -1072,6 +1072,12 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
@Override @Override
public void startSleeping(BlockPos pos) { public void startSleeping(BlockPos pos) {
@@ -22,10 +22,10 @@ index 671d1dafbfe2f8ba24096f78e2661014d00a5e09..cef163bc12629d538582d7735ed47bd3
this.brain.setMemory(MemoryModuleType.LAST_SLEPT, this.level().getGameTime()); // CraftBukkit - decompile error this.brain.setMemory(MemoryModuleType.LAST_SLEPT, this.level().getGameTime()); // CraftBukkit - decompile error
this.brain.eraseMemory(MemoryModuleType.WALK_TARGET); this.brain.eraseMemory(MemoryModuleType.WALK_TARGET);
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index bc7afc07964aa56f1913ffb0888eb1b37a13999d..873ce7b8b73260e4c1c00298ee9a9e273731f5ab 100644 index 09465c479f1074d76be88713f727c648be61bf06..e869e2d3511991f8a88349c4db4328d68b4c234d 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -784,6 +784,7 @@ public class PurpurWorldConfig { @@ -782,6 +782,7 @@ public class PurpurWorldConfig {
} }
public boolean bedExplode = true; public boolean bedExplode = true;
@@ -33,7 +33,7 @@ index bc7afc07964aa56f1913ffb0888eb1b37a13999d..873ce7b8b73260e4c1c00298ee9a9e27
public double bedExplosionPower = 5.0D; public double bedExplosionPower = 5.0D;
public boolean bedExplosionFire = true; public boolean bedExplosionFire = true;
public net.minecraft.world.level.Level.ExplosionInteraction bedExplosionEffect = net.minecraft.world.level.Level.ExplosionInteraction.BLOCK; public net.minecraft.world.level.Level.ExplosionInteraction bedExplosionEffect = net.minecraft.world.level.Level.ExplosionInteraction.BLOCK;
@@ -794,6 +795,7 @@ public class PurpurWorldConfig { @@ -792,6 +793,7 @@ public class PurpurWorldConfig {
} }
} }
bedExplode = getBoolean("blocks.bed.explode", bedExplode); bedExplode = getBoolean("blocks.bed.explode", bedExplode);

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Halloween options and optimizations
diff --git a/src/main/java/net/minecraft/world/entity/ambient/Bat.java b/src/main/java/net/minecraft/world/entity/ambient/Bat.java diff --git a/src/main/java/net/minecraft/world/entity/ambient/Bat.java b/src/main/java/net/minecraft/world/entity/ambient/Bat.java
index 3d556fb56977f3a75702c43e933340155e3e1cf3..54a3cb6b0a30b3a5dadda88afed28e9679d74ccc 100644 index a65286044be79e351bd5c80114a2f9fc5dacc11b..25c877481f3006afcdeb3634739e8f37accd27cd 100644
--- a/src/main/java/net/minecraft/world/entity/ambient/Bat.java --- a/src/main/java/net/minecraft/world/entity/ambient/Bat.java
+++ b/src/main/java/net/minecraft/world/entity/ambient/Bat.java +++ b/src/main/java/net/minecraft/world/entity/ambient/Bat.java
@@ -302,7 +302,7 @@ public class Bat extends AmbientCreature { @@ -305,7 +305,7 @@ public class Bat extends AmbientCreature {
int i = world.getMaxLocalRawBrightness(pos); int i = world.getMaxLocalRawBrightness(pos);
byte b0 = 4; byte b0 = 4;
@@ -17,19 +17,23 @@ index 3d556fb56977f3a75702c43e933340155e3e1cf3..54a3cb6b0a30b3a5dadda88afed28e96
b0 = 7; b0 = 7;
} else if (random.nextBoolean()) { } else if (random.nextBoolean()) {
return false; return false;
@@ -316,6 +316,7 @@ public class Bat extends AmbientCreature { @@ -315,6 +315,11 @@ public class Bat extends AmbientCreature {
private static boolean isSpookySeason = false; }
private static final int ONE_HOUR = 20 * 60 * 60; }
private static int lastSpookyCheck = -ONE_HOUR;
+ // Pufferfish start - only check for spooky season once an hour
+ private static boolean isSpookySeason = false;
+ private static final int ONE_HOUR = 20 * 60 * 60;
+ private static int lastSpookyCheck = -ONE_HOUR;
+ public static boolean isHalloweenSeason(Level level) { return level.purpurConfig.forceHalloweenSeason || isHalloween(); } // Purpur + public static boolean isHalloweenSeason(Level level) { return level.purpurConfig.forceHalloweenSeason || isHalloween(); } // Purpur
private static boolean isHalloween() { private static boolean isHalloween() {
if (net.minecraft.server.MinecraftServer.currentTick - lastSpookyCheck > ONE_HOUR) {
LocalDate localdate = LocalDate.now(); LocalDate localdate = LocalDate.now();
int i = localdate.get(ChronoField.DAY_OF_MONTH);
diff --git a/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java b/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java diff --git a/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java b/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java
index 1d06c612eaba8b595fa3d094577f700989d1e224..4aeb23de31e826d5cf27f8c91bd60c911f769a17 100644 index bbe4c1cb4244ab813ef7d56c46c3ae62701c4824..2cadbc0d56908ca978e1735eff07f5e634548606 100644
--- a/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java --- a/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java
+++ b/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java +++ b/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java
@@ -136,11 +136,7 @@ public abstract class AbstractSkeleton extends Monster implements RangedAttackMo @@ -138,11 +138,7 @@ public abstract class AbstractSkeleton extends Monster implements RangedAttackMo
this.reassessWeaponGoal(); this.reassessWeaponGoal();
this.setCanPickUpLoot(this.level().paperConfig().entities.behavior.mobsCanAlwaysPickUpLoot.skeletons || randomsource.nextFloat() < 0.55F * difficulty.getSpecialMultiplier()); // Paper - Add world settings for mobs picking up loot this.setCanPickUpLoot(this.level().paperConfig().entities.behavior.mobsCanAlwaysPickUpLoot.skeletons || randomsource.nextFloat() < 0.55F * difficulty.getSpecialMultiplier()); // Paper - Add world settings for mobs picking up loot
if (this.getItemBySlot(EquipmentSlot.HEAD).isEmpty()) { if (this.getItemBySlot(EquipmentSlot.HEAD).isEmpty()) {
@@ -43,10 +47,10 @@ index 1d06c612eaba8b595fa3d094577f700989d1e224..4aeb23de31e826d5cf27f8c91bd60c91
this.armorDropChances[EquipmentSlot.HEAD.getIndex()] = 0.0F; this.armorDropChances[EquipmentSlot.HEAD.getIndex()] = 0.0F;
} }
diff --git a/src/main/java/net/minecraft/world/entity/monster/Zombie.java b/src/main/java/net/minecraft/world/entity/monster/Zombie.java 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 4e7b67e5d6b26d1d0523dfed7f0d029b363fb0ef..b9439e7f261cd130648d6397a57156e9ed7677d3 100644 index b34dec421adc3ce56c0720a839a43ce42faeefaf..98e7b57a45ae3cae704c65ec6db5f715f9af99a4 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java --- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java +++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
@@ -582,11 +582,7 @@ public class Zombie extends Monster { @@ -595,11 +595,7 @@ public class Zombie extends Monster {
} }
if (this.getItemBySlot(EquipmentSlot.HEAD).isEmpty()) { if (this.getItemBySlot(EquipmentSlot.HEAD).isEmpty()) {
@@ -60,10 +64,10 @@ index 4e7b67e5d6b26d1d0523dfed7f0d029b363fb0ef..b9439e7f261cd130648d6397a57156e9
this.armorDropChances[EquipmentSlot.HEAD.getIndex()] = 0.0F; this.armorDropChances[EquipmentSlot.HEAD.getIndex()] = 0.0F;
} }
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index 873ce7b8b73260e4c1c00298ee9a9e273731f5ab..e5885f953b75d8269e933e8d1f72d680a0ce5cf5 100644 index e869e2d3511991f8a88349c4db4328d68b4c234d..8f2ec3a415ef8dd5e9c9f45e5135702ed5e34a96 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -1710,6 +1710,13 @@ public class PurpurWorldConfig { @@ -1706,6 +1706,13 @@ public class PurpurWorldConfig {
guardianTakeDamageFromWater = getBoolean("mobs.guardian.takes-damage-from-water", guardianTakeDamageFromWater); guardianTakeDamageFromWater = getBoolean("mobs.guardian.takes-damage-from-water", guardianTakeDamageFromWater);
} }

View File

@@ -5,7 +5,7 @@ Subject: [PATCH] Config for grindstones
diff --git a/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java b/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java diff --git a/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java b/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java
index 138f77d13dda574def523d74fa55bc71b5bfa01b..57c9e636a10e5845f197cae39d4f885a1817d1f7 100644 index 5687f492fc76f699e2a388790ca5380d9b8c8d0a..cc229f3e1e9527cbedf929e326731943bb513dae 100644
--- a/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java --- a/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java
+++ b/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java +++ b/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java
@@ -135,7 +135,7 @@ public class GrindstoneMenu extends AbstractContainerMenu { @@ -135,7 +135,7 @@ public class GrindstoneMenu extends AbstractContainerMenu {
@@ -17,7 +17,7 @@ index 138f77d13dda574def523d74fa55bc71b5bfa01b..57c9e636a10e5845f197cae39d4f885a
j += ((Enchantment) holder.value()).getMinCost(k); j += ((Enchantment) holder.value()).getMinCost(k);
} }
} }
@@ -234,7 +234,7 @@ public class GrindstoneMenu extends AbstractContainerMenu { @@ -222,7 +222,7 @@ public class GrindstoneMenu extends AbstractContainerMenu {
Entry<Holder<Enchantment>> entry = (Entry) iterator.next(); Entry<Holder<Enchantment>> entry = (Entry) iterator.next();
Holder<Enchantment> holder = (Holder) entry.getKey(); Holder<Enchantment> holder = (Holder) entry.getKey();
@@ -26,7 +26,7 @@ index 138f77d13dda574def523d74fa55bc71b5bfa01b..57c9e636a10e5845f197cae39d4f885a
itemenchantments_a.upgrade(holder, entry.getIntValue()); itemenchantments_a.upgrade(holder, entry.getIntValue());
} }
} }
@@ -242,10 +242,70 @@ public class GrindstoneMenu extends AbstractContainerMenu { @@ -230,10 +230,70 @@ public class GrindstoneMenu extends AbstractContainerMenu {
}); });
} }
@@ -98,7 +98,7 @@ index 138f77d13dda574def523d74fa55bc71b5bfa01b..57c9e636a10e5845f197cae39d4f885a
}); });
}); });
@@ -260,6 +320,23 @@ public class GrindstoneMenu extends AbstractContainerMenu { @@ -248,6 +308,23 @@ public class GrindstoneMenu extends AbstractContainerMenu {
} }
item.set(DataComponents.REPAIR_COST, i); item.set(DataComponents.REPAIR_COST, i);

View File

@@ -5,21 +5,21 @@ Subject: [PATCH] UPnP Port Forwarding
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 7e7f66ab202e5ac3bd8f91ed0ab1db51c2679101..027bc1f3ad7c6cab51b57122eae553b010082f1c 100644 index 76f31bf31f77c8347b9436779c3701f8a87045e6..781eb66ada5fd2bf821453be3b14c59026217999 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -320,6 +320,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -331,6 +331,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
public final io.papermc.paper.configuration.PaperConfigurations paperConfigurations; // Paper - add paper configuration files public final io.papermc.paper.configuration.PaperConfigurations paperConfigurations; // Paper - add paper configuration files
public boolean isIteratingOverLevels = false; // Paper - Throw exception on world create while being ticked public boolean isIteratingOverLevels = false; // Paper - Throw exception on world create while being ticked
public boolean lagging = false; // Purpur public boolean lagging = false; // Purpur
+ protected boolean upnp = false; // Purpur + protected boolean upnp = false; // Purpur
public volatile Thread shutdownThread; // Paper public static <S extends MinecraftServer> S spin(Function<Thread, S> serverFactory) {
public volatile boolean abnormalExit = false; // Paper AtomicReference<S> atomicreference = new AtomicReference();
@@ -1043,6 +1044,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -1045,6 +1046,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
MinecraftServer.LOGGER.info("Stopping server");
Commands.COMMAND_SENDING_POOL.shutdownNow(); // Paper - Perf: Async command map building; Shutdown and don't bother finishing Commands.COMMAND_SENDING_POOL.shutdownNow(); // Paper - Perf: Async command map building; Shutdown and don't bother finishing
MinecraftTimings.stopServer(); // Paper MinecraftTimings.stopServer(); // Paper
this.server.spark.disable(); // Paper - spark
+ // Purpur start + // Purpur start
+ if (upnp) { + if (upnp) {
+ if (dev.omega24.upnp4j.UPnP4J.close(this.getPort(), dev.omega24.upnp4j.util.Protocol.TCP)) { + if (dev.omega24.upnp4j.UPnP4J.close(this.getPort(), dev.omega24.upnp4j.util.Protocol.TCP)) {
@@ -33,10 +33,10 @@ index 7e7f66ab202e5ac3bd8f91ed0ab1db51c2679101..027bc1f3ad7c6cab51b57122eae553b0
if (this.server != null) { if (this.server != null) {
this.server.disablePlugins(); this.server.disablePlugins();
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
index e093ef5b2712776767db6b9b78e46bbee5b91ee5..7288850095495472ef35c8eb03fb519dd0f704ee 100644 index 86c25c52e4c42074866975884ec15dc099a77591..dfb502be415eb0e8750b0307d908bc42f11a2988 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java --- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
@@ -297,6 +297,30 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface @@ -292,6 +292,30 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
if (true) throw new IllegalStateException("Failed to bind to port", ioexception); // Paper - Propagate failed to bind to port error if (true) throw new IllegalStateException("Failed to bind to port", ioexception); // Paper - Propagate failed to bind to port error
return false; return false;
} }
@@ -68,7 +68,7 @@ index e093ef5b2712776767db6b9b78e46bbee5b91ee5..7288850095495472ef35c8eb03fb519d
// CraftBukkit start // CraftBukkit start
// this.setPlayerList(new DedicatedPlayerList(this, this.registries(), this.playerDataStorage)); // Spigot - moved up // this.setPlayerList(new DedicatedPlayerList(this, this.registries(), this.playerDataStorage)); // Spigot - moved up
diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
index f4c8dd204943f77760f0a7f73838776bf2f85b63..3351f1aad470e27501dd60436756fada434b9e25 100644 index 9c5348fd18c2943ce39346dd19fa194d9c31d7ea..ce8181b0527406a54569779d453b227f6b693f0d 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java --- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
@@ -421,4 +421,9 @@ public class PurpurConfig { @@ -421,4 +421,9 @@ public class PurpurConfig {

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Campfire option for lit when placed
diff --git a/src/main/java/net/minecraft/world/level/block/CampfireBlock.java b/src/main/java/net/minecraft/world/level/block/CampfireBlock.java diff --git a/src/main/java/net/minecraft/world/level/block/CampfireBlock.java b/src/main/java/net/minecraft/world/level/block/CampfireBlock.java
index 7f6058f4def83867971121751acd51c398583651..5a49daf7b6bf9e0ec3d50494287a620d41f8d85d 100644 index 18d4020017d76303d3179fad8974574777ea6305..2ee2b1485f848ac5270bc3f7e1e5b1bc3029b0bb 100644
--- a/src/main/java/net/minecraft/world/level/block/CampfireBlock.java --- a/src/main/java/net/minecraft/world/level/block/CampfireBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/CampfireBlock.java +++ b/src/main/java/net/minecraft/world/level/block/CampfireBlock.java
@@ -132,7 +132,7 @@ public class CampfireBlock extends BaseEntityBlock implements SimpleWaterloggedB @@ -140,7 +140,7 @@ public class CampfireBlock extends BaseEntityBlock implements SimpleWaterloggedB
BlockPos blockposition = ctx.getClickedPos(); BlockPos blockposition = ctx.getClickedPos();
boolean flag = world.getFluidState(blockposition).getType() == Fluids.WATER; boolean flag = world.getFluidState(blockposition).getType() == Fluids.WATER;
@@ -18,10 +18,10 @@ index 7f6058f4def83867971121751acd51c398583651..5a49daf7b6bf9e0ec3d50494287a620d
@Override @Override
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index e5885f953b75d8269e933e8d1f72d680a0ce5cf5..6bf2fdb2f276c57e1a2334bcc4d69ebcccfbc462 100644 index 8f2ec3a415ef8dd5e9c9f45e5135702ed5e34a96..8bfaf9f1cfaea1366f1a726e74f325569889d612 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -827,6 +827,11 @@ public class PurpurWorldConfig { @@ -825,6 +825,11 @@ public class PurpurWorldConfig {
cactusBreaksFromSolidNeighbors = getBoolean("blocks.cactus.breaks-from-solid-neighbors", cactusBreaksFromSolidNeighbors); cactusBreaksFromSolidNeighbors = getBoolean("blocks.cactus.breaks-from-solid-neighbors", cactusBreaksFromSolidNeighbors);
} }

View File

@@ -5,7 +5,7 @@ Subject: [PATCH] options to extinguish fire blocks with snowballs
diff --git a/src/main/java/net/minecraft/world/entity/projectile/Snowball.java b/src/main/java/net/minecraft/world/entity/projectile/Snowball.java diff --git a/src/main/java/net/minecraft/world/entity/projectile/Snowball.java b/src/main/java/net/minecraft/world/entity/projectile/Snowball.java
index f59a2903bfb8ae591a638ea5bb387caaa93ce664..1b9d0e28e518c501b4b93ae385ddd64aeade97d5 100644 index 8c853b6fbbc966ee6ba9ad3770d4e2e2a50ef388..0db58e7d63a5c1b43a2224c247979f23a1d3f899 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/Snowball.java --- a/src/main/java/net/minecraft/world/entity/projectile/Snowball.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/Snowball.java +++ b/src/main/java/net/minecraft/world/entity/projectile/Snowball.java
@@ -63,6 +63,36 @@ public class Snowball extends ThrowableItemProjectile { @@ -63,6 +63,36 @@ public class Snowball extends ThrowableItemProjectile {
@@ -46,10 +46,10 @@ index f59a2903bfb8ae591a638ea5bb387caaa93ce664..1b9d0e28e518c501b4b93ae385ddd64a
protected void onHit(HitResult hitResult) { protected void onHit(HitResult hitResult) {
super.onHit(hitResult); super.onHit(hitResult);
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index 6bf2fdb2f276c57e1a2334bcc4d69ebcccfbc462..d86ac34aceb7855a59c3d1f1758362d2eb1ff939 100644 index 8bfaf9f1cfaea1366f1a726e74f325569889d612..ce6cbfc763cc617952c9e64dc50847254a310a7f 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -224,6 +224,9 @@ public class PurpurWorldConfig { @@ -222,6 +222,9 @@ public class PurpurWorldConfig {
public int glowBerriesEatGlowDuration = 0; public int glowBerriesEatGlowDuration = 0;
public boolean shulkerBoxItemDropContentsWhenDestroyed = true; public boolean shulkerBoxItemDropContentsWhenDestroyed = true;
public boolean compassItemShowsBossBar = false; public boolean compassItemShowsBossBar = false;
@@ -59,7 +59,7 @@ index 6bf2fdb2f276c57e1a2334bcc4d69ebcccfbc462..d86ac34aceb7855a59c3d1f1758362d2
private void itemSettings() { private void itemSettings() {
itemImmuneToCactus.clear(); itemImmuneToCactus.clear();
getList("gameplay-mechanics.item.immune.cactus", new ArrayList<>()).forEach(key -> { getList("gameplay-mechanics.item.immune.cactus", new ArrayList<>()).forEach(key -> {
@@ -272,6 +275,9 @@ public class PurpurWorldConfig { @@ -270,6 +273,9 @@ public class PurpurWorldConfig {
glowBerriesEatGlowDuration = getInt("gameplay-mechanics.item.glow_berries.eat-glow-duration", glowBerriesEatGlowDuration); glowBerriesEatGlowDuration = getInt("gameplay-mechanics.item.glow_berries.eat-glow-duration", glowBerriesEatGlowDuration);
shulkerBoxItemDropContentsWhenDestroyed = getBoolean("gameplay-mechanics.item.shulker_box.drop-contents-when-destroyed", shulkerBoxItemDropContentsWhenDestroyed); shulkerBoxItemDropContentsWhenDestroyed = getBoolean("gameplay-mechanics.item.shulker_box.drop-contents-when-destroyed", shulkerBoxItemDropContentsWhenDestroyed);
compassItemShowsBossBar = getBoolean("gameplay-mechanics.item.compass.holding-shows-bossbar", compassItemShowsBossBar); compassItemShowsBossBar = getBoolean("gameplay-mechanics.item.compass.holding-shows-bossbar", compassItemShowsBossBar);

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Add option to disable zombie villagers cure
diff --git a/src/main/java/net/minecraft/world/entity/monster/ZombieVillager.java b/src/main/java/net/minecraft/world/entity/monster/ZombieVillager.java 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 9bb75b49ea2d0bd8aafbe537b65f86eb04f6cfe2..612907fe87e46b5b13ed80635f203fa99948bf74 100644 index 623e8ef53d6336b3e3c83fd37eda13244a3b4ab6..3759f28c7f516a94ca8fe1b8f82230b9e8cfb9cb 100644
--- a/src/main/java/net/minecraft/world/entity/monster/ZombieVillager.java --- a/src/main/java/net/minecraft/world/entity/monster/ZombieVillager.java
+++ b/src/main/java/net/minecraft/world/entity/monster/ZombieVillager.java +++ b/src/main/java/net/minecraft/world/entity/monster/ZombieVillager.java
@@ -222,7 +222,7 @@ public class ZombieVillager extends Zombie implements VillagerDataHolder { @@ -224,7 +224,7 @@ public class ZombieVillager extends Zombie implements VillagerDataHolder {
ItemStack itemstack = player.getItemInHand(hand); ItemStack itemstack = player.getItemInHand(hand);
if (itemstack.is(Items.GOLDEN_APPLE)) { if (itemstack.is(Items.GOLDEN_APPLE)) {
@@ -18,10 +18,10 @@ index 9bb75b49ea2d0bd8aafbe537b65f86eb04f6cfe2..612907fe87e46b5b13ed80635f203fa9
if (!this.level().isClientSide) { if (!this.level().isClientSide) {
this.startConverting(player.getUUID(), this.random.nextInt(level().purpurConfig.zombieVillagerCuringTimeMax - level().purpurConfig.zombieVillagerCuringTimeMin + 1) + level().purpurConfig.zombieVillagerCuringTimeMin); // Purpur this.startConverting(player.getUUID(), this.random.nextInt(level().purpurConfig.zombieVillagerCuringTimeMax - level().purpurConfig.zombieVillagerCuringTimeMin + 1) + level().purpurConfig.zombieVillagerCuringTimeMin); // Purpur
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index d86ac34aceb7855a59c3d1f1758362d2eb1ff939..2e5c32320bfccf3aa1511aa14250ff8fc667566c 100644 index ce6cbfc763cc617952c9e64dc50847254a310a7f..4bd07e6ef30f6ff3e026492f36b0b3e8de363088 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -3012,6 +3012,7 @@ public class PurpurWorldConfig { @@ -3008,6 +3008,7 @@ public class PurpurWorldConfig {
public boolean zombieVillagerTakeDamageFromWater = false; public boolean zombieVillagerTakeDamageFromWater = false;
public int zombieVillagerCuringTimeMin = 3600; public int zombieVillagerCuringTimeMin = 3600;
public int zombieVillagerCuringTimeMax = 6000; public int zombieVillagerCuringTimeMax = 6000;
@@ -29,7 +29,7 @@ index d86ac34aceb7855a59c3d1f1758362d2eb1ff939..2e5c32320bfccf3aa1511aa14250ff8f
private void zombieVillagerSettings() { private void zombieVillagerSettings() {
zombieVillagerRidable = getBoolean("mobs.zombie_villager.ridable", zombieVillagerRidable); zombieVillagerRidable = getBoolean("mobs.zombie_villager.ridable", zombieVillagerRidable);
zombieVillagerRidableInWater = getBoolean("mobs.zombie_villager.ridable-in-water", zombieVillagerRidableInWater); zombieVillagerRidableInWater = getBoolean("mobs.zombie_villager.ridable-in-water", zombieVillagerRidableInWater);
@@ -3030,6 +3031,7 @@ public class PurpurWorldConfig { @@ -3026,6 +3027,7 @@ public class PurpurWorldConfig {
zombieVillagerTakeDamageFromWater = getBoolean("mobs.zombie_villager.takes-damage-from-water", zombieVillagerTakeDamageFromWater); zombieVillagerTakeDamageFromWater = getBoolean("mobs.zombie_villager.takes-damage-from-water", zombieVillagerTakeDamageFromWater);
zombieVillagerCuringTimeMin = getInt("mobs.zombie_villager.curing_time.min", zombieVillagerCuringTimeMin); zombieVillagerCuringTimeMin = getInt("mobs.zombie_villager.curing_time.min", zombieVillagerCuringTimeMin);
zombieVillagerCuringTimeMax = getInt("mobs.zombie_villager.curing_time.max", zombieVillagerCuringTimeMax); zombieVillagerCuringTimeMax = getInt("mobs.zombie_villager.curing_time.max", zombieVillagerCuringTimeMax);

View File

@@ -7,10 +7,10 @@ Makes it so that when a BlockEntity is placed in the world and then broken,
the dropped ItemStack retains any original custom display name/lore. the dropped ItemStack retains any original custom display name/lore.
diff --git a/src/main/java/net/minecraft/world/item/BlockItem.java b/src/main/java/net/minecraft/world/item/BlockItem.java diff --git a/src/main/java/net/minecraft/world/item/BlockItem.java b/src/main/java/net/minecraft/world/item/BlockItem.java
index a255b76cc1e6cb926585110e5f09ded37da7be20..26c8846c9255eacdf134e494aa7084b57b240b3c 100644 index 33d9b5fb6897fefb0f7b9009df7339341cb42317..d58619d1d63a03598b8740dd789d4b6f2c93f8d0 100644
--- a/src/main/java/net/minecraft/world/item/BlockItem.java --- a/src/main/java/net/minecraft/world/item/BlockItem.java
+++ b/src/main/java/net/minecraft/world/item/BlockItem.java +++ b/src/main/java/net/minecraft/world/item/BlockItem.java
@@ -157,7 +157,16 @@ public class BlockItem extends Item { @@ -151,7 +151,16 @@ public class BlockItem extends Item {
} }
protected boolean updateCustomBlockEntityTag(BlockPos pos, Level world, @Nullable Player player, ItemStack stack, BlockState state) { protected boolean updateCustomBlockEntityTag(BlockPos pos, Level world, @Nullable Player player, ItemStack stack, BlockState state) {
@@ -29,10 +29,10 @@ index a255b76cc1e6cb926585110e5f09ded37da7be20..26c8846c9255eacdf134e494aa7084b5
@Nullable @Nullable
diff --git a/src/main/java/net/minecraft/world/level/block/Block.java b/src/main/java/net/minecraft/world/level/block/Block.java diff --git a/src/main/java/net/minecraft/world/level/block/Block.java b/src/main/java/net/minecraft/world/level/block/Block.java
index 5dd4ccde6c4c421f697f629adb1adfadce7b8a42..6673133b93677d9329bab814ee64e37de3578dde 100644 index 135e59e549cbcb3806574f964947b6ff3ea517d1..e8c649d1db3dd82bb544aa6e96b6a19e96559b09 100644
--- a/src/main/java/net/minecraft/world/level/block/Block.java --- a/src/main/java/net/minecraft/world/level/block/Block.java
+++ b/src/main/java/net/minecraft/world/level/block/Block.java +++ b/src/main/java/net/minecraft/world/level/block/Block.java
@@ -311,7 +311,7 @@ public class Block extends BlockBehaviour implements ItemLike { @@ -310,7 +310,7 @@ public class Block extends BlockBehaviour implements ItemLike {
public static void dropResources(BlockState state, LevelAccessor world, BlockPos pos, @Nullable BlockEntity blockEntity) { public static void dropResources(BlockState state, LevelAccessor world, BlockPos pos, @Nullable BlockEntity blockEntity) {
if (world instanceof ServerLevel) { if (world instanceof ServerLevel) {
Block.getDrops(state, (ServerLevel) world, pos, blockEntity).forEach((itemstack) -> { Block.getDrops(state, (ServerLevel) world, pos, blockEntity).forEach((itemstack) -> {
@@ -41,7 +41,7 @@ index 5dd4ccde6c4c421f697f629adb1adfadce7b8a42..6673133b93677d9329bab814ee64e37d
}); });
state.spawnAfterBreak((ServerLevel) world, pos, ItemStack.EMPTY, true); state.spawnAfterBreak((ServerLevel) world, pos, ItemStack.EMPTY, true);
} }
@@ -330,7 +330,7 @@ public class Block extends BlockBehaviour implements ItemLike { @@ -329,7 +329,7 @@ public class Block extends BlockBehaviour implements ItemLike {
event.setExpToDrop(block.getExpDrop(state, serverLevel, pos, net.minecraft.world.item.ItemStack.EMPTY, true)); // Paper - Properly handle xp dropping event.setExpToDrop(block.getExpDrop(state, serverLevel, pos, net.minecraft.world.item.ItemStack.EMPTY, true)); // Paper - Properly handle xp dropping
event.callEvent(); event.callEvent();
for (org.bukkit.inventory.ItemStack drop : event.getDrops()) { for (org.bukkit.inventory.ItemStack drop : event.getDrops()) {
@@ -50,7 +50,7 @@ index 5dd4ccde6c4c421f697f629adb1adfadce7b8a42..6673133b93677d9329bab814ee64e37d
} }
state.spawnAfterBreak(serverLevel, pos, ItemStack.EMPTY, false); // Paper - Properly handle xp dropping state.spawnAfterBreak(serverLevel, pos, ItemStack.EMPTY, false); // Paper - Properly handle xp dropping
block.popExperience(serverLevel, pos, event.getExpToDrop()); // Paper - Properly handle xp dropping block.popExperience(serverLevel, pos, event.getExpToDrop()); // Paper - Properly handle xp dropping
@@ -347,13 +347,32 @@ public class Block extends BlockBehaviour implements ItemLike { @@ -346,13 +346,32 @@ public class Block extends BlockBehaviour implements ItemLike {
// Paper end - Properly handle xp dropping // Paper end - Properly handle xp dropping
if (world instanceof ServerLevel) { if (world instanceof ServerLevel) {
Block.getDrops(state, (ServerLevel) world, pos, blockEntity, entity, tool).forEach((itemstack1) -> { Block.getDrops(state, (ServerLevel) world, pos, blockEntity, entity, tool).forEach((itemstack1) -> {
@@ -85,7 +85,7 @@ index 5dd4ccde6c4c421f697f629adb1adfadce7b8a42..6673133b93677d9329bab814ee64e37d
double d0 = (double) EntityType.ITEM.getHeight() / 2.0D; double d0 = (double) EntityType.ITEM.getHeight() / 2.0D;
double d1 = (double) pos.getX() + 0.5D + Mth.nextDouble(world.random, -0.25D, 0.25D); double d1 = (double) pos.getX() + 0.5D + Mth.nextDouble(world.random, -0.25D, 0.25D);
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java diff --git a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
index 7dfabb11d3c8112f6daef35d204a2e324f4ddb5e..a7b6c20afd9ec3fe61d2bdf42f96398c8d6751cc 100644 index fb00e5a02bb8c64e27d6d009068ba041098951d6..62b9e41cc35714428d7701d019b45c6ee429400c 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java --- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
@@ -100,6 +100,12 @@ public abstract class BlockEntity { @@ -100,6 +100,12 @@ public abstract class BlockEntity {
@@ -102,7 +102,7 @@ index 7dfabb11d3c8112f6daef35d204a2e324f4ddb5e..a7b6c20afd9ec3fe61d2bdf42f96398c
// CraftBukkit end // CraftBukkit end
@@ -116,6 +122,15 @@ public abstract class BlockEntity { @@ -116,6 +122,15 @@ public abstract class BlockEntity {
this.loadAdditional(nbt, registryLookup); this.loadAdditional(nbt, registries);
} }
+ // Purpur start + // Purpur start
@@ -114,10 +114,10 @@ index 7dfabb11d3c8112f6daef35d204a2e324f4ddb5e..a7b6c20afd9ec3fe61d2bdf42f96398c
+ } + }
+ // Purpur end + // Purpur end
+ +
protected void saveAdditional(CompoundTag nbt, HolderLookup.Provider registryLookup) {} protected void saveAdditional(CompoundTag nbt, HolderLookup.Provider registries) {}
public final CompoundTag saveWithFullMetadata(HolderLookup.Provider registryLookup) { public final CompoundTag saveWithFullMetadata(HolderLookup.Provider registries) {
@@ -423,4 +438,16 @@ public abstract class BlockEntity { @@ -424,4 +439,16 @@ public abstract class BlockEntity {
<T> T getOrDefault(DataComponentType<? extends T> type, T fallback); <T> T getOrDefault(DataComponentType<? extends T> type, T fallback);
} }
@@ -135,22 +135,22 @@ index 7dfabb11d3c8112f6daef35d204a2e324f4ddb5e..a7b6c20afd9ec3fe61d2bdf42f96398c
+ // Purpur end + // Purpur end
} }
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index 2e5c32320bfccf3aa1511aa14250ff8fc667566c..9d9602211bbe12c6ce68bc7968aeae1cdf0e5dfd 100644 index 4bd07e6ef30f6ff3e026492f36b0b3e8de363088..420b086c27f4c0d977f2fdaead4e45fc989bc9f8 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -133,6 +133,8 @@ public class PurpurWorldConfig { @@ -141,6 +141,8 @@ public class PurpurWorldConfig {
public boolean milkCuresBadOmen = true; public boolean mobsIgnoreRails = false;
public boolean noteBlockIgnoreAbove = false; public boolean rainStopsAfterSleep = true;
public boolean persistentDroppableEntityDisplayNames = true; public boolean thunderStopsAfterSleep = true;
+ public boolean persistentTileEntityLore = false; + public boolean persistentTileEntityLore = false;
+ public boolean persistentTileEntityDisplayName = true; + public boolean persistentTileEntityDisplayName = true;
public boolean projectilesBypassMobGriefing = false; private void miscGameplayMechanicsSettings() {
public boolean tickFluids = true; useBetterMending = getBoolean("gameplay-mechanics.use-better-mending", useBetterMending);
public double mobsBlindnessMultiplier = 1; alwaysTameInCreative = getBoolean("gameplay-mechanics.always-tame-in-creative", alwaysTameInCreative);
@@ -156,6 +158,14 @@ public class PurpurWorldConfig { @@ -164,6 +166,14 @@ public class PurpurWorldConfig {
imposeTeleportRestrictionsOnEndPortals = getBoolean("gameplay-mechanics.impose-teleport-restrictions-on-end-portals", imposeTeleportRestrictionsOnEndPortals); mobsIgnoreRails = getBoolean("gameplay-mechanics.mobs-ignore-rails", mobsIgnoreRails);
milkCuresBadOmen = getBoolean("gameplay-mechanics.milk-cures-bad-omen", milkCuresBadOmen); rainStopsAfterSleep = getBoolean("gameplay-mechanics.rain-stops-after-sleep", rainStopsAfterSleep);
noteBlockIgnoreAbove = getBoolean("gameplay-mechanics.note-block-ignore-above", noteBlockIgnoreAbove); thunderStopsAfterSleep = getBoolean("gameplay-mechanics.thunder-stops-after-sleep", thunderStopsAfterSleep);
+ if (PurpurConfig.version < 35) { + if (PurpurConfig.version < 35) {
+ boolean oldVal = getBoolean("gameplay-mechanics.persistent-tileentity-display-names-and-lore", persistentTileEntityLore); + boolean oldVal = getBoolean("gameplay-mechanics.persistent-tileentity-display-names-and-lore", persistentTileEntityLore);
+ set("gameplay-mechanics.persistent-tileentity-display-names-and-lore", null); + set("gameplay-mechanics.persistent-tileentity-display-names-and-lore", null);
@@ -159,6 +159,6 @@ index 2e5c32320bfccf3aa1511aa14250ff8fc667566c..9d9602211bbe12c6ce68bc7968aeae1c
+ } + }
+ persistentTileEntityLore = getBoolean("gameplay-mechanics.persistent-tileentity-lore", persistentTileEntityLore); + persistentTileEntityLore = getBoolean("gameplay-mechanics.persistent-tileentity-lore", persistentTileEntityLore);
+ persistentTileEntityDisplayName = getBoolean("gameplay-mechanics.persistent-tileentity-display-name", persistentTileEntityDisplayName); + persistentTileEntityDisplayName = getBoolean("gameplay-mechanics.persistent-tileentity-display-name", persistentTileEntityDisplayName);
persistentDroppableEntityDisplayNames = getBoolean("gameplay-mechanics.persistent-droppable-entity-display-names", persistentDroppableEntityDisplayNames); }
projectilesBypassMobGriefing = getBoolean("gameplay-mechanics.projectiles-bypass-mob-griefing", projectilesBypassMobGriefing);
tickFluids = getBoolean("gameplay-mechanics.tick-fluids", tickFluids); public int daytimeTicks = 12000;

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Signs allow color codes
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 996bfac666762096fe322e54c2134bab0c08c950..6f6b9dbfa8bf4d67a9157ec870a4f14a8002ac01 100644 index 101f2db7d6e7eec85b21c576768224d6c3bba7e7..3f804ddb25aa03bdd964d390a1a1aab4d09abfde 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -1707,6 +1707,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple @@ -1969,6 +1969,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple
@Override @Override
public void openTextEdit(SignBlockEntity sign, boolean front) { public void openTextEdit(SignBlockEntity sign, boolean front) {
@@ -17,10 +17,10 @@ index 996bfac666762096fe322e54c2134bab0c08c950..6f6b9dbfa8bf4d67a9157ec870a4f14a
this.connection.send(new ClientboundOpenSignEditorPacket(sign.getBlockPos(), front)); this.connection.send(new ClientboundOpenSignEditorPacket(sign.getBlockPos(), front));
} }
diff --git a/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java diff --git a/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java
index 3070cd2b588f5a69fd8c0d3551e16251680d8c27..c9a1c071780351b584ad8e071ddc26f9a27e5964 100644 index 8ac19e1e052e73ff3fd09089bb8e3fd687390ee4..6da1eec98c08e4909ecbd48fe90b3fd62011e284 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java --- a/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java
@@ -201,16 +201,31 @@ public class SignBlockEntity extends BlockEntity implements CommandSource { // C @@ -201,16 +201,31 @@ public class SignBlockEntity extends BlockEntity {
return this.setText((SignText) textChanger.apply(signtext), front); return this.setText((SignText) textChanger.apply(signtext), front);
} }
@@ -54,7 +54,7 @@ index 3070cd2b588f5a69fd8c0d3551e16251680d8c27..c9a1c071780351b584ad8e071ddc26f9
} }
} }
@@ -345,6 +360,28 @@ public class SignBlockEntity extends BlockEntity implements CommandSource { // C @@ -348,6 +363,28 @@ public class SignBlockEntity extends BlockEntity {
return new CommandSourceStack(commandSource, Vec3.atCenterOf(pos), Vec2.ZERO, (ServerLevel) world, 2, s, (Component) object, world.getServer(), player); // Paper - Fix commands from signs not firing command events return new CommandSourceStack(commandSource, Vec3.atCenterOf(pos), Vec2.ZERO, (ServerLevel) world, 2, s, (Component) object, world.getServer(), player); // Paper - Fix commands from signs not firing command events
} }
@@ -84,10 +84,10 @@ index 3070cd2b588f5a69fd8c0d3551e16251680d8c27..c9a1c071780351b584ad8e071ddc26f9
public ClientboundBlockEntityDataPacket getUpdatePacket() { public ClientboundBlockEntityDataPacket getUpdatePacket() {
return ClientboundBlockEntityDataPacket.create(this); return ClientboundBlockEntityDataPacket.create(this);
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index 9d9602211bbe12c6ce68bc7968aeae1cdf0e5dfd..46917b62be97e23603e8ddc69c7b5c746d337003 100644 index 420b086c27f4c0d977f2fdaead4e45fc989bc9f8..9cfee77da2b368c2be4a91902df8e9085d07974b 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -1000,6 +1000,11 @@ public class PurpurWorldConfig { @@ -998,6 +998,11 @@ public class PurpurWorldConfig {
} }
} }

View File

@@ -6,10 +6,10 @@ Subject: [PATCH] Kelp, cave, weeping, and twisting vines configurable max
diff --git a/src/main/java/net/minecraft/world/level/block/CaveVinesBlock.java b/src/main/java/net/minecraft/world/level/block/CaveVinesBlock.java diff --git a/src/main/java/net/minecraft/world/level/block/CaveVinesBlock.java b/src/main/java/net/minecraft/world/level/block/CaveVinesBlock.java
index 635fc086d832c641f840cf36d18cdc0fcc3beef3..e3ff7b8059da499cfde1106f6d51156931b292dc 100644 index c4473c2a778116d48bc3e4796afd901f455070e6..e62217c0bfa6cc426c7d41154f3ccc34d8f242ca 100644
--- a/src/main/java/net/minecraft/world/level/block/CaveVinesBlock.java --- a/src/main/java/net/minecraft/world/level/block/CaveVinesBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/CaveVinesBlock.java +++ b/src/main/java/net/minecraft/world/level/block/CaveVinesBlock.java
@@ -94,4 +94,11 @@ public class CaveVinesBlock extends GrowingPlantHeadBlock implements Bonemealabl @@ -94,4 +94,11 @@ public class CaveVinesBlock extends GrowingPlantHeadBlock implements CaveVines {
public void performBonemeal(ServerLevel world, RandomSource random, BlockPos pos, BlockState state) { public void performBonemeal(ServerLevel world, RandomSource random, BlockPos pos, BlockState state) {
world.setBlock(pos, state.setValue(BERRIES, Boolean.valueOf(true)), 2); world.setBlock(pos, state.setValue(BERRIES, Boolean.valueOf(true)), 2);
} }
@@ -22,15 +22,15 @@ index 635fc086d832c641f840cf36d18cdc0fcc3beef3..e3ff7b8059da499cfde1106f6d511569
+ // Purpur end + // Purpur end
} }
diff --git a/src/main/java/net/minecraft/world/level/block/GrowingPlantHeadBlock.java b/src/main/java/net/minecraft/world/level/block/GrowingPlantHeadBlock.java diff --git a/src/main/java/net/minecraft/world/level/block/GrowingPlantHeadBlock.java b/src/main/java/net/minecraft/world/level/block/GrowingPlantHeadBlock.java
index cf05da1c86e3018db11dc079bf50317b6639e5cc..8e9903899ac91e9431f00675c1f5ac4a18e61593 100644 index 9b424d7661fedf8ee1eb9f3167c62e563f04d4d1..2af311847a085a8073e9bcb26c762d1bbe1eae2c 100644
--- a/src/main/java/net/minecraft/world/level/block/GrowingPlantHeadBlock.java --- a/src/main/java/net/minecraft/world/level/block/GrowingPlantHeadBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/GrowingPlantHeadBlock.java +++ b/src/main/java/net/minecraft/world/level/block/GrowingPlantHeadBlock.java
@@ -34,12 +34,12 @@ public abstract class GrowingPlantHeadBlock extends GrowingPlantBlock implements @@ -34,12 +34,12 @@ public abstract class GrowingPlantHeadBlock extends GrowingPlantBlock implements
@Override @Override
public BlockState getStateForPlacement(LevelAccessor world) { public BlockState getStateForPlacement(RandomSource random) {
- return (BlockState) this.defaultBlockState().setValue(GrowingPlantHeadBlock.AGE, world.getRandom().nextInt(25)); - return (BlockState) this.defaultBlockState().setValue(GrowingPlantHeadBlock.AGE, random.nextInt(25));
+ return (BlockState) this.defaultBlockState().setValue(GrowingPlantHeadBlock.AGE, world.getRandom().nextInt(getMaxGrowthAge())); // Purpur + return (BlockState) this.defaultBlockState().setValue(GrowingPlantHeadBlock.AGE, random.nextInt(getMaxGrowthAge())); // Purpur
} }
@Override @Override

View File

@@ -5,7 +5,7 @@ Subject: [PATCH] Grindstone API
diff --git a/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java b/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java diff --git a/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java b/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java
index 57c9e636a10e5845f197cae39d4f885a1817d1f7..3ba9ff1b10f8d1a105eb821a9cc0603fe28b7387 100644 index cc229f3e1e9527cbedf929e326731943bb513dae..111da7435f0abb5a57bd2c5fecead2380ac4347a 100644
--- a/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java --- a/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java
+++ b/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java +++ b/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java
@@ -96,12 +96,14 @@ public class GrindstoneMenu extends AbstractContainerMenu { @@ -96,12 +96,14 @@ public class GrindstoneMenu extends AbstractContainerMenu {
@@ -24,7 +24,7 @@ index 57c9e636a10e5845f197cae39d4f885a1817d1f7..3ba9ff1b10f8d1a105eb821a9cc0603f
// Paper end - Fire BlockExpEvent on grindstone use // Paper end - Fire BlockExpEvent on grindstone use
} }
@@ -398,7 +400,9 @@ public class GrindstoneMenu extends AbstractContainerMenu { @@ -386,7 +388,9 @@ public class GrindstoneMenu extends AbstractContainerMenu {
return ItemStack.EMPTY; return ItemStack.EMPTY;
} }

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Ability for hoe to replant crops and nether warts
diff --git a/src/main/java/net/minecraft/world/level/block/BushBlock.java b/src/main/java/net/minecraft/world/level/block/BushBlock.java diff --git a/src/main/java/net/minecraft/world/level/block/BushBlock.java b/src/main/java/net/minecraft/world/level/block/BushBlock.java
index a7b4b5600e3c889c69ac22294899713d50b5fe5c..a27e298ffdfa6956be9cde429d2cd45483a51fed 100644 index eb324fda54ada3ed7941713a784ed2d686ec8c4b..09cc76f3fee4a767c9ec3fa592f2c3c6146344ec 100644
--- a/src/main/java/net/minecraft/world/level/block/BushBlock.java --- a/src/main/java/net/minecraft/world/level/block/BushBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/BushBlock.java +++ b/src/main/java/net/minecraft/world/level/block/BushBlock.java
@@ -52,4 +52,24 @@ public abstract class BushBlock extends Block { @@ -55,4 +55,24 @@ public abstract class BushBlock extends Block {
protected boolean isPathfindable(BlockState state, PathComputationType type) { protected boolean isPathfindable(BlockState state, PathComputationType type) {
return type == PathComputationType.AIR && !this.hasCollision ? true : super.isPathfindable(state, type); return type == PathComputationType.AIR && !this.hasCollision ? true : super.isPathfindable(state, type);
} }
@@ -34,10 +34,10 @@ index a7b4b5600e3c889c69ac22294899713d50b5fe5c..a27e298ffdfa6956be9cde429d2cd454
+ // Purpur end + // Purpur end
} }
diff --git a/src/main/java/net/minecraft/world/level/block/CropBlock.java b/src/main/java/net/minecraft/world/level/block/CropBlock.java diff --git a/src/main/java/net/minecraft/world/level/block/CropBlock.java b/src/main/java/net/minecraft/world/level/block/CropBlock.java
index a69e7e8da81bd13578d230cc1e3f0f900817cbfd..5a190834baef60c7b61074393f8856a933902d81 100644 index ab58c4dbe9deb8807478a8e66e01f81a30221532..4f64011262eef6a24a8e8595ace1e4d1d82923e5 100644
--- a/src/main/java/net/minecraft/world/level/block/CropBlock.java --- a/src/main/java/net/minecraft/world/level/block/CropBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/CropBlock.java +++ b/src/main/java/net/minecraft/world/level/block/CropBlock.java
@@ -214,4 +214,15 @@ public class CropBlock extends BushBlock implements BonemealableBlock { @@ -216,4 +216,15 @@ public class CropBlock extends BushBlock implements BonemealableBlock {
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) { protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
builder.add(CropBlock.AGE); builder.add(CropBlock.AGE);
} }
@@ -74,10 +74,10 @@ index acbd60a2f162fe0e254e36d0e8e7face3fc8a7b3..da1c7999ca64199387054de46489d3ff
+ // Purpur end + // Purpur end
} }
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index b2533323a671648517e6de7a062b151ef6c25165..83219182b008ebae7d9dda54c92d9a6c22d0dcb1 100644 index 27b6b2c8dfa709229f709c1a030e7c680a1813e4..e49ddabb865e88782990024253d646cb0e8b32b4 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -507,6 +507,8 @@ public class PurpurWorldConfig { @@ -505,6 +505,8 @@ public class PurpurWorldConfig {
public Map<Block, Weatherable> axeWeatherables = new HashMap<>(); public Map<Block, Weatherable> axeWeatherables = new HashMap<>();
public Map<Block, Tillable> hoeTillables = new HashMap<>(); public Map<Block, Tillable> hoeTillables = new HashMap<>();
public Map<Block, Flattenable> shovelFlattenables = new HashMap<>(); public Map<Block, Flattenable> shovelFlattenables = new HashMap<>();
@@ -86,7 +86,7 @@ index b2533323a671648517e6de7a062b151ef6c25165..83219182b008ebae7d9dda54c92d9a6c
private void toolSettings() { private void toolSettings() {
axeStrippables.clear(); axeStrippables.clear();
axeWaxables.clear(); axeWaxables.clear();
@@ -774,6 +776,8 @@ public class PurpurWorldConfig { @@ -772,6 +774,8 @@ public class PurpurWorldConfig {
}); });
shovelFlattenables.put(block, new Flattenable(into, drops)); shovelFlattenables.put(block, new Flattenable(into, drops));
}); });

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Turtle eggs random tick crack chance
diff --git a/src/main/java/net/minecraft/world/level/block/TurtleEggBlock.java b/src/main/java/net/minecraft/world/level/block/TurtleEggBlock.java diff --git a/src/main/java/net/minecraft/world/level/block/TurtleEggBlock.java b/src/main/java/net/minecraft/world/level/block/TurtleEggBlock.java
index 0c732cfbd9ce50198a3f85ae8ef2263d7ae0bc1a..2f0e8aeb9c45853fca12ddd78a7d51813a600e67 100644 index 4eb0f7a9cf6b12c02d0bd42980ae302dd56c1b8a..e1c984ec64565584c78fe0a6c7db3537108bac59 100644
--- a/src/main/java/net/minecraft/world/level/block/TurtleEggBlock.java --- a/src/main/java/net/minecraft/world/level/block/TurtleEggBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/TurtleEggBlock.java +++ b/src/main/java/net/minecraft/world/level/block/TurtleEggBlock.java
@@ -170,7 +170,7 @@ public class TurtleEggBlock extends Block { @@ -171,7 +171,7 @@ public class TurtleEggBlock extends Block {
private boolean shouldUpdateHatchLevel(Level world) { private boolean shouldUpdateHatchLevel(Level world) {
float f = world.getTimeOfDay(1.0F); float f = world.getTimeOfDay(1.0F);
@@ -18,10 +18,10 @@ index 0c732cfbd9ce50198a3f85ae8ef2263d7ae0bc1a..2f0e8aeb9c45853fca12ddd78a7d5181
@Override @Override
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index 83219182b008ebae7d9dda54c92d9a6c22d0dcb1..e37c036da425e1e7c26259787139adaab33e0f30 100644 index e49ddabb865e88782990024253d646cb0e8b32b4..16fecadf20523f2a2bf72082bd558e59805e02ca 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -1034,11 +1034,13 @@ public class PurpurWorldConfig { @@ -1032,11 +1032,13 @@ public class PurpurWorldConfig {
public boolean turtleEggsBreakFromItems = false; public boolean turtleEggsBreakFromItems = false;
public boolean turtleEggsBreakFromMinecarts = false; public boolean turtleEggsBreakFromMinecarts = false;
public boolean turtleEggsBypassMobGriefing = false; public boolean turtleEggsBypassMobGriefing = false;

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Mob head visibility percent
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 863bfe33d980f1988111669c6a6ae53bee9c4887..cb9ae94b4fff8406cdbc40a1d5d38f0272a4a212 100644 index fcb024cc70c750887e6d6ce19692385ab5ac9d01..090f259115573f0ed2fb7ed79d191b3f09ac27cd 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -1046,9 +1046,20 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -1071,9 +1071,20 @@ public abstract class LivingEntity extends Entity implements Attackable {
ItemStack itemstack = this.getItemBySlot(EquipmentSlot.HEAD); ItemStack itemstack = this.getItemBySlot(EquipmentSlot.HEAD);
EntityType<?> entitytypes = entity.getType(); EntityType<?> entitytypes = entity.getType();
@@ -32,10 +32,10 @@ index 863bfe33d980f1988111669c6a6ae53bee9c4887..cb9ae94b4fff8406cdbc40a1d5d38f02
// Purpur start // Purpur start
if (entity instanceof LivingEntity entityliving) { if (entity instanceof LivingEntity entityliving) {
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index e37c036da425e1e7c26259787139adaab33e0f30..8651608cb527a92ba15edbee08d6830cebd4eb77 100644 index 16fecadf20523f2a2bf72082bd558e59805e02ca..8e9c7d1d913e3ed5015f4016c96e56942ce07f5e 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -1379,6 +1379,7 @@ public class PurpurWorldConfig { @@ -1377,6 +1377,7 @@ public class PurpurWorldConfig {
public boolean creeperExplodeWhenKilled = false; public boolean creeperExplodeWhenKilled = false;
public boolean creeperHealthRadius = false; public boolean creeperHealthRadius = false;
public boolean creeperAlwaysDropExp = false; public boolean creeperAlwaysDropExp = false;
@@ -43,7 +43,7 @@ index e37c036da425e1e7c26259787139adaab33e0f30..8651608cb527a92ba15edbee08d6830c
private void creeperSettings() { private void creeperSettings() {
creeperRidable = getBoolean("mobs.creeper.ridable", creeperRidable); creeperRidable = getBoolean("mobs.creeper.ridable", creeperRidable);
creeperRidableInWater = getBoolean("mobs.creeper.ridable-in-water", creeperRidableInWater); creeperRidableInWater = getBoolean("mobs.creeper.ridable-in-water", creeperRidableInWater);
@@ -1397,6 +1398,7 @@ public class PurpurWorldConfig { @@ -1395,6 +1396,7 @@ public class PurpurWorldConfig {
creeperExplodeWhenKilled = getBoolean("mobs.creeper.explode-when-killed", creeperExplodeWhenKilled); creeperExplodeWhenKilled = getBoolean("mobs.creeper.explode-when-killed", creeperExplodeWhenKilled);
creeperHealthRadius = getBoolean("mobs.creeper.health-impacts-explosion", creeperHealthRadius); creeperHealthRadius = getBoolean("mobs.creeper.health-impacts-explosion", creeperHealthRadius);
creeperAlwaysDropExp = getBoolean("mobs.creeper.always-drop-exp", creeperAlwaysDropExp); creeperAlwaysDropExp = getBoolean("mobs.creeper.always-drop-exp", creeperAlwaysDropExp);
@@ -51,7 +51,7 @@ index e37c036da425e1e7c26259787139adaab33e0f30..8651608cb527a92ba15edbee08d6830c
} }
public boolean dolphinRidable = false; public boolean dolphinRidable = false;
@@ -2226,6 +2228,7 @@ public class PurpurWorldConfig { @@ -2222,6 +2224,7 @@ public class PurpurWorldConfig {
public boolean piglinTakeDamageFromWater = false; public boolean piglinTakeDamageFromWater = false;
public int piglinPortalSpawnModifier = 2000; public int piglinPortalSpawnModifier = 2000;
public boolean piglinAlwaysDropExp = false; public boolean piglinAlwaysDropExp = false;
@@ -59,7 +59,7 @@ index e37c036da425e1e7c26259787139adaab33e0f30..8651608cb527a92ba15edbee08d6830c
private void piglinSettings() { private void piglinSettings() {
piglinRidable = getBoolean("mobs.piglin.ridable", piglinRidable); piglinRidable = getBoolean("mobs.piglin.ridable", piglinRidable);
piglinRidableInWater = getBoolean("mobs.piglin.ridable-in-water", piglinRidableInWater); piglinRidableInWater = getBoolean("mobs.piglin.ridable-in-water", piglinRidableInWater);
@@ -2241,6 +2244,7 @@ public class PurpurWorldConfig { @@ -2237,6 +2240,7 @@ public class PurpurWorldConfig {
piglinTakeDamageFromWater = getBoolean("mobs.piglin.takes-damage-from-water", piglinTakeDamageFromWater); piglinTakeDamageFromWater = getBoolean("mobs.piglin.takes-damage-from-water", piglinTakeDamageFromWater);
piglinPortalSpawnModifier = getInt("mobs.piglin.portal-spawn-modifier", piglinPortalSpawnModifier); piglinPortalSpawnModifier = getInt("mobs.piglin.portal-spawn-modifier", piglinPortalSpawnModifier);
piglinAlwaysDropExp = getBoolean("mobs.piglin.always-drop-exp", piglinAlwaysDropExp); piglinAlwaysDropExp = getBoolean("mobs.piglin.always-drop-exp", piglinAlwaysDropExp);
@@ -67,7 +67,7 @@ index e37c036da425e1e7c26259787139adaab33e0f30..8651608cb527a92ba15edbee08d6830c
} }
public boolean piglinBruteRidable = false; public boolean piglinBruteRidable = false;
@@ -2525,6 +2529,7 @@ public class PurpurWorldConfig { @@ -2521,6 +2525,7 @@ public class PurpurWorldConfig {
public double skeletonScale = 1.0D; public double skeletonScale = 1.0D;
public boolean skeletonTakeDamageFromWater = false; public boolean skeletonTakeDamageFromWater = false;
public boolean skeletonAlwaysDropExp = false; public boolean skeletonAlwaysDropExp = false;
@@ -75,7 +75,7 @@ index e37c036da425e1e7c26259787139adaab33e0f30..8651608cb527a92ba15edbee08d6830c
private void skeletonSettings() { private void skeletonSettings() {
skeletonRidable = getBoolean("mobs.skeleton.ridable", skeletonRidable); skeletonRidable = getBoolean("mobs.skeleton.ridable", skeletonRidable);
skeletonRidableInWater = getBoolean("mobs.skeleton.ridable-in-water", skeletonRidableInWater); skeletonRidableInWater = getBoolean("mobs.skeleton.ridable-in-water", skeletonRidableInWater);
@@ -2538,6 +2543,7 @@ public class PurpurWorldConfig { @@ -2534,6 +2539,7 @@ public class PurpurWorldConfig {
skeletonScale = Mth.clamp(getDouble("mobs.skeleton.attributes.scale", skeletonScale), 0.0625D, 16.0D); skeletonScale = Mth.clamp(getDouble("mobs.skeleton.attributes.scale", skeletonScale), 0.0625D, 16.0D);
skeletonTakeDamageFromWater = getBoolean("mobs.skeleton.takes-damage-from-water", skeletonTakeDamageFromWater); skeletonTakeDamageFromWater = getBoolean("mobs.skeleton.takes-damage-from-water", skeletonTakeDamageFromWater);
skeletonAlwaysDropExp = getBoolean("mobs.skeleton.always-drop-exp", skeletonAlwaysDropExp); skeletonAlwaysDropExp = getBoolean("mobs.skeleton.always-drop-exp", skeletonAlwaysDropExp);
@@ -83,7 +83,7 @@ index e37c036da425e1e7c26259787139adaab33e0f30..8651608cb527a92ba15edbee08d6830c
} }
public boolean skeletonHorseRidable = false; public boolean skeletonHorseRidable = false;
@@ -3107,6 +3113,7 @@ public class PurpurWorldConfig { @@ -3103,6 +3109,7 @@ public class PurpurWorldConfig {
public boolean zombieBypassMobGriefing = false; public boolean zombieBypassMobGriefing = false;
public boolean zombieTakeDamageFromWater = false; public boolean zombieTakeDamageFromWater = false;
public boolean zombieAlwaysDropExp = false; public boolean zombieAlwaysDropExp = false;
@@ -91,7 +91,7 @@ index e37c036da425e1e7c26259787139adaab33e0f30..8651608cb527a92ba15edbee08d6830c
private void zombieSettings() { private void zombieSettings() {
zombieRidable = getBoolean("mobs.zombie.ridable", zombieRidable); zombieRidable = getBoolean("mobs.zombie.ridable", zombieRidable);
zombieRidableInWater = getBoolean("mobs.zombie.ridable-in-water", zombieRidableInWater); zombieRidableInWater = getBoolean("mobs.zombie.ridable-in-water", zombieRidableInWater);
@@ -3126,6 +3133,7 @@ public class PurpurWorldConfig { @@ -3122,6 +3129,7 @@ public class PurpurWorldConfig {
zombieBypassMobGriefing = getBoolean("mobs.zombie.bypass-mob-griefing", zombieBypassMobGriefing); zombieBypassMobGriefing = getBoolean("mobs.zombie.bypass-mob-griefing", zombieBypassMobGriefing);
zombieTakeDamageFromWater = getBoolean("mobs.zombie.takes-damage-from-water", zombieTakeDamageFromWater); zombieTakeDamageFromWater = getBoolean("mobs.zombie.takes-damage-from-water", zombieTakeDamageFromWater);
zombieAlwaysDropExp = getBoolean("mobs.zombie.always-drop-exp", zombieAlwaysDropExp); zombieAlwaysDropExp = getBoolean("mobs.zombie.always-drop-exp", zombieAlwaysDropExp);

View File

@@ -5,7 +5,7 @@ Subject: [PATCH] Configurable valid characters for usernames
diff --git a/src/main/java/net/minecraft/util/StringUtil.java b/src/main/java/net/minecraft/util/StringUtil.java diff --git a/src/main/java/net/minecraft/util/StringUtil.java b/src/main/java/net/minecraft/util/StringUtil.java
index 0bd191acb9596d3aa21c337230d26f09d26f6888..20211f40aeeade9217ece087688974bdf55afc56 100644 index 6c33002dc8bbb3759c3156302ab7d1f26ce5e8ee..c89fc375aff548a2b03eaf4da3b6a075012df012 100644
--- a/src/main/java/net/minecraft/util/StringUtil.java --- a/src/main/java/net/minecraft/util/StringUtil.java
+++ b/src/main/java/net/minecraft/util/StringUtil.java +++ b/src/main/java/net/minecraft/util/StringUtil.java
@@ -69,6 +69,7 @@ public class StringUtil { @@ -69,6 +69,7 @@ public class StringUtil {
@@ -17,7 +17,7 @@ index 0bd191acb9596d3aa21c337230d26f09d26f6888..20211f40aeeade9217ece087688974bd
return false; return false;
} }
diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
index 569b8e21c2afd88fff1820307d75350b405a88e5..ccf4d068b4cd11ad666b01bba9cbed1d428e6af3 100644 index 0d899125bd89b23d6b5f1fa6bdb25d3b76a62783..7ad309e81ec61a6f2553e9ffeb9a986f4d569b37 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java --- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
@@ -454,4 +454,11 @@ public class PurpurConfig { @@ -454,4 +454,11 @@ public class PurpurConfig {

View File

@@ -5,11 +5,11 @@ Subject: [PATCH] Stop bees from dying after stinging
diff --git a/src/main/java/net/minecraft/world/entity/animal/Bee.java b/src/main/java/net/minecraft/world/entity/animal/Bee.java diff --git a/src/main/java/net/minecraft/world/entity/animal/Bee.java b/src/main/java/net/minecraft/world/entity/animal/Bee.java
index 0a0f3d21234dbf567ce7439833c84293fac2dc0f..46d55f60cb91fc32b505582c8eecb393959b5d3f 100644 index db382cf32d215f1b98b960e0c1a8dfaf6e19422f..4b32a783cabf05f5bae0dba22eea8ac7ba2cd285 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Bee.java --- a/src/main/java/net/minecraft/world/entity/animal/Bee.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Bee.java +++ b/src/main/java/net/minecraft/world/entity/animal/Bee.java
@@ -446,6 +446,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { @@ -461,6 +461,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
this.hurt(this.damageSources().drown(), 1.0F); this.hurtServer(world, this.damageSources().drown(), 1.0F);
} }
+ if (flag && !this.level().purpurConfig.beeDiesAfterSting) setHasStung(false); else // Purpur + if (flag && !this.level().purpurConfig.beeDiesAfterSting) setHasStung(false); else // Purpur
@@ -17,10 +17,10 @@ index 0a0f3d21234dbf567ce7439833c84293fac2dc0f..46d55f60cb91fc32b505582c8eecb393
++this.timeSinceSting; ++this.timeSinceSting;
if (this.timeSinceSting % 5 == 0 && this.random.nextInt(Mth.clamp(1200 - this.timeSinceSting, 1, 1200)) == 0) { if (this.timeSinceSting % 5 == 0 && this.random.nextInt(Mth.clamp(1200 - this.timeSinceSting, 1, 1200)) == 0) {
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index 8651608cb527a92ba15edbee08d6830cebd4eb77..bc2c08ff93735ab928b018d193a504c35ba18913 100644 index 8e9c7d1d913e3ed5015f4016c96e56942ce07f5e..ad407f1b3b343244e5323d022702cc075b910b48 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -1153,6 +1153,7 @@ public class PurpurWorldConfig { @@ -1151,6 +1151,7 @@ public class PurpurWorldConfig {
public boolean beeCanWorkAtNight = false; public boolean beeCanWorkAtNight = false;
public boolean beeCanWorkInRain = false; public boolean beeCanWorkInRain = false;
public boolean beeAlwaysDropExp = false; public boolean beeAlwaysDropExp = false;
@@ -28,7 +28,7 @@ index 8651608cb527a92ba15edbee08d6830cebd4eb77..bc2c08ff93735ab928b018d193a504c3
private void beeSettings() { private void beeSettings() {
beeRidable = getBoolean("mobs.bee.ridable", beeRidable); beeRidable = getBoolean("mobs.bee.ridable", beeRidable);
beeRidableInWater = getBoolean("mobs.bee.ridable-in-water", beeRidableInWater); beeRidableInWater = getBoolean("mobs.bee.ridable-in-water", beeRidableInWater);
@@ -1170,6 +1171,7 @@ public class PurpurWorldConfig { @@ -1168,6 +1169,7 @@ public class PurpurWorldConfig {
beeCanWorkAtNight = getBoolean("mobs.bee.can-work-at-night", beeCanWorkAtNight); beeCanWorkAtNight = getBoolean("mobs.bee.can-work-at-night", beeCanWorkAtNight);
beeCanWorkInRain = getBoolean("mobs.bee.can-work-in-rain", beeCanWorkInRain); beeCanWorkInRain = getBoolean("mobs.bee.can-work-in-rain", beeCanWorkInRain);
beeAlwaysDropExp = getBoolean("mobs.bee.always-drop-exp", beeAlwaysDropExp); beeAlwaysDropExp = getBoolean("mobs.bee.always-drop-exp", beeAlwaysDropExp);

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Give bee counts in beehives to Purpur clients
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 027bc1f3ad7c6cab51b57122eae553b010082f1c..226fa1fa3b7949e23c3f6f283d728949694a8a5c 100644 index 781eb66ada5fd2bf821453be3b14c59026217999..c3c5d392f1295e7edc0e96881f90f96cace5486f 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1149,6 +1149,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -1148,6 +1148,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
} }
public void safeShutdown(boolean waitForShutdown, boolean isRestarting) { public void safeShutdown(boolean waitForShutdown, boolean isRestarting) {
org.purpurmc.purpur.task.BossBarTask.stopAll(); // Purpur org.purpurmc.purpur.task.BossBarTask.stopAll(); // Purpur
@@ -17,22 +17,22 @@ index 027bc1f3ad7c6cab51b57122eae553b010082f1c..226fa1fa3b7949e23c3f6f283d728949
this.hasLoggedStop = true; // Paper - Debugging this.hasLoggedStop = true; // Paper - Debugging
if (isDebugging()) io.papermc.paper.util.TraceUtil.dumpTraceForThread("Server stopped"); // Paper - Debugging if (isDebugging()) io.papermc.paper.util.TraceUtil.dumpTraceForThread("Server stopped"); // Paper - Debugging
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
index 7288850095495472ef35c8eb03fb519dd0f704ee..f679caa20e762f21704d8d5f1a69990195634000 100644 index dfb502be415eb0e8750b0307d908bc42f11a2988..136ac58eef2c243650ffb390459d6959b90d5202 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java --- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
@@ -396,6 +396,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface @@ -390,6 +390,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
}
if (gg.pufferfish.pufferfish.PufferfishConfig.enableAsyncMobSpawning) mobSpawnExecutor.start(); // Pufferfish
org.purpurmc.purpur.task.BossBarTask.startAll(); // Purpur org.purpurmc.purpur.task.BossBarTask.startAll(); // Purpur
+ if (org.purpurmc.purpur.PurpurConfig.beeCountPayload) org.purpurmc.purpur.task.BeehiveTask.instance().register(); // Purpur + if (org.purpurmc.purpur.PurpurConfig.beeCountPayload) org.purpurmc.purpur.task.BeehiveTask.instance().register(); // Purpur
return true; return true;
} }
} }
diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
index 29b07c04c23772da1b29499e4db9c678ebbd2180..5643fced7c9fd52552fe082142128a83fd76d2c0 100644 index 7ad309e81ec61a6f2553e9ffeb9a986f4d569b37..357b5080b6d3651c8f913081de283576a0a17cec 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java --- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
@@ -436,6 +436,11 @@ public class PurpurConfig { @@ -434,6 +434,11 @@ public class PurpurConfig {
allowWaterPlacementInTheEnd = getBoolean("settings.allow-water-placement-in-the-end", allowWaterPlacementInTheEnd); allowWaterPlacementInTheEnd = getBoolean("settings.allow-water-placement-in-the-end", allowWaterPlacementInTheEnd);
} }

View File

@@ -22,23 +22,23 @@ Value set -> Actual fall distance needed to trample
6.0 -> 6.75 6.0 -> 6.75
diff --git a/src/main/java/net/minecraft/world/level/block/FarmBlock.java b/src/main/java/net/minecraft/world/level/block/FarmBlock.java diff --git a/src/main/java/net/minecraft/world/level/block/FarmBlock.java b/src/main/java/net/minecraft/world/level/block/FarmBlock.java
index 12a0c69f8fec30fad64cbb00af2ca1bbf0ea5153..d0ec0722496ed931b48c4e7076fddbb1ed36e111 100644 index bc149eb17695ac727aa8db08db6209497f7d20bf..6db97982972bfc67c828f574fb86391e1cdcd4a5 100644
--- a/src/main/java/net/minecraft/world/level/block/FarmBlock.java --- a/src/main/java/net/minecraft/world/level/block/FarmBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/FarmBlock.java +++ b/src/main/java/net/minecraft/world/level/block/FarmBlock.java
@@ -111,7 +111,7 @@ public class FarmBlock extends Block { @@ -112,7 +112,7 @@ public class FarmBlock extends Block {
@Override
public void fallOn(Level world, BlockState state, BlockPos pos, Entity entity, float fallDistance) { public void fallOn(Level world, BlockState state, BlockPos pos, Entity entity, float fallDistance) {
super.fallOn(world, state, pos, entity, fallDistance); // CraftBukkit - moved here as game rules / events shouldn't affect fall damage. super.fallOn(world, state, pos, entity, fallDistance); // CraftBukkit - moved here as game rules / events shouldn't affect fall damage.
- if (!world.isClientSide && world.random.nextFloat() < fallDistance - 0.5F && entity instanceof LivingEntity && (entity instanceof Player || world.purpurConfig.farmlandBypassMobGriefing || world.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)) && entity.getBbWidth() * entity.getBbWidth() * entity.getBbHeight() > 0.512F) { // Purpur if (world instanceof ServerLevel worldserver) {
+ if (!world.isClientSide && (world.purpurConfig.farmlandTrampleHeight >= 0D ? fallDistance >= world.purpurConfig.farmlandTrampleHeight : world.random.nextFloat() < fallDistance - 0.5F) && entity instanceof LivingEntity && (entity instanceof Player || world.purpurConfig.farmlandBypassMobGriefing || world.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)) && entity.getBbWidth() * entity.getBbWidth() * entity.getBbHeight() > 0.512F) { // Purpur - if (world.random.nextFloat() < fallDistance - 0.5F && entity instanceof LivingEntity && (entity instanceof Player || worldserver.purpurConfig.farmlandBypassMobGriefing || worldserver.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)) && entity.getBbWidth() * entity.getBbWidth() * entity.getBbHeight() > 0.512F) { // Purpur
// CraftBukkit start - Interact soil + if ((worldserver.purpurConfig.farmlandTrampleHeight >= 0D ? fallDistance >= worldserver.purpurConfig.farmlandTrampleHeight : world.random.nextFloat() < fallDistance - 0.5F) && entity instanceof LivingEntity && (entity instanceof Player || worldserver.purpurConfig.farmlandBypassMobGriefing || worldserver.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)) && entity.getBbWidth() * entity.getBbWidth() * entity.getBbHeight() > 0.512F) { // Purpur
org.bukkit.event.Cancellable cancellable; // CraftBukkit start - Interact soil
if (entity instanceof Player) { org.bukkit.event.Cancellable cancellable;
if (entity instanceof Player) {
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index bc2c08ff93735ab928b018d193a504c35ba18913..086bd93953f62947de97d176798469e76bced8e7 100644 index ad407f1b3b343244e5323d022702cc075b910b48..b3382f2383f546ef53b4dd4c2187f39d8f027c01 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -927,6 +927,7 @@ public class PurpurWorldConfig { @@ -925,6 +925,7 @@ public class PurpurWorldConfig {
public boolean farmlandTramplingDisabled = false; public boolean farmlandTramplingDisabled = false;
public boolean farmlandTramplingOnlyPlayers = false; public boolean farmlandTramplingOnlyPlayers = false;
public boolean farmlandTramplingFeatherFalling = false; public boolean farmlandTramplingFeatherFalling = false;
@@ -46,7 +46,7 @@ index bc2c08ff93735ab928b018d193a504c35ba18913..086bd93953f62947de97d176798469e7
private void farmlandSettings() { private void farmlandSettings() {
farmlandBypassMobGriefing = getBoolean("blocks.farmland.bypass-mob-griefing", farmlandBypassMobGriefing); farmlandBypassMobGriefing = getBoolean("blocks.farmland.bypass-mob-griefing", farmlandBypassMobGriefing);
farmlandGetsMoistFromBelow = getBoolean("blocks.farmland.gets-moist-from-below", farmlandGetsMoistFromBelow); farmlandGetsMoistFromBelow = getBoolean("blocks.farmland.gets-moist-from-below", farmlandGetsMoistFromBelow);
@@ -934,6 +935,7 @@ public class PurpurWorldConfig { @@ -932,6 +933,7 @@ public class PurpurWorldConfig {
farmlandTramplingDisabled = getBoolean("blocks.farmland.disable-trampling", farmlandTramplingDisabled); farmlandTramplingDisabled = getBoolean("blocks.farmland.disable-trampling", farmlandTramplingDisabled);
farmlandTramplingOnlyPlayers = getBoolean("blocks.farmland.only-players-trample", farmlandTramplingOnlyPlayers); farmlandTramplingOnlyPlayers = getBoolean("blocks.farmland.only-players-trample", farmlandTramplingOnlyPlayers);
farmlandTramplingFeatherFalling = getBoolean("blocks.farmland.feather-fall-distance-affects-trampling", farmlandTramplingFeatherFalling); farmlandTramplingFeatherFalling = getBoolean("blocks.farmland.feather-fall-distance-affects-trampling", farmlandTramplingFeatherFalling);

View File

@@ -9,10 +9,10 @@ players still only pick up one orb every tick. However, setting this
to any negative number will pick up all orbs instantly. to any negative number will pick up all orbs instantly.
diff --git a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java diff --git a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
index caaeeb63b8bf0d3709fc38266a7e8c48211f5c0b..1cdf71a76c629bcc42da7fcc451b7031dbe644bd 100644 index 6db9a3ea4c0dc1f0629bc8bf6466aeab00c498f6..32a0db7e8f974712bd8a05f16f3bd48ac66142d5 100644
--- a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java --- a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
+++ b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java +++ b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
@@ -329,7 +329,7 @@ public class ExperienceOrb extends Entity { @@ -333,7 +333,7 @@ public class ExperienceOrb extends Entity {
public void playerTouch(Player player) { public void playerTouch(Player player) {
if (player instanceof ServerPlayer entityplayer) { if (player instanceof ServerPlayer entityplayer) {
if (player.takeXpDelay == 0 && new com.destroystokyo.paper.event.player.PlayerPickupExperienceEvent(entityplayer.getBukkitEntity(), (org.bukkit.entity.ExperienceOrb) this.getBukkitEntity()).callEvent()) { // Paper - PlayerPickupExperienceEvent if (player.takeXpDelay == 0 && new com.destroystokyo.paper.event.player.PlayerPickupExperienceEvent(entityplayer.getBukkitEntity(), (org.bukkit.entity.ExperienceOrb) this.getBukkitEntity()).callEvent()) { // Paper - PlayerPickupExperienceEvent
@@ -22,10 +22,10 @@ index caaeeb63b8bf0d3709fc38266a7e8c48211f5c0b..1cdf71a76c629bcc42da7fcc451b7031
int i = this.repairPlayerItems(entityplayer, this.value); int i = this.repairPlayerItems(entityplayer, this.value);
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java 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 05ed7bfd75a1e30d74b12a068303a786222a2649..330b21946564e6a7b463a258c02fee3f91e0f057 100644 index 90998ee1671dc115428102e67a3b07c377133e6e..05d30d2ba3ea7daebe40ddfaa9ce38d99f943038 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java --- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java +++ b/src/main/java/net/minecraft/world/entity/player/Player.java
@@ -637,7 +637,7 @@ public abstract class Player extends LivingEntity { @@ -661,7 +661,7 @@ public abstract class Player extends LivingEntity {
while (iterator.hasNext()) { while (iterator.hasNext()) {
Entity entity = (Entity) iterator.next(); Entity entity = (Entity) iterator.next();
@@ -35,10 +35,10 @@ index 05ed7bfd75a1e30d74b12a068303a786222a2649..330b21946564e6a7b463a258c02fee3f
} else if (!entity.isRemoved()) { } else if (!entity.isRemoved()) {
this.touch(entity); this.touch(entity);
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index 086bd93953f62947de97d176798469e76bced8e7..52a19689111b0682d02f2f0f4f5fea5d28373752 100644 index b3382f2383f546ef53b4dd4c2187f39d8f027c01..74b5d04cf6880f30f8f36ea0414e0ae5542c34b7 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -421,6 +421,7 @@ public class PurpurWorldConfig { @@ -419,6 +419,7 @@ public class PurpurWorldConfig {
public boolean playerRidableInWater = false; public boolean playerRidableInWater = false;
public boolean playerRemoveBindingWithWeakness = false; public boolean playerRemoveBindingWithWeakness = false;
public int shiftRightClickRepairsMendingPoints = 0; public int shiftRightClickRepairsMendingPoints = 0;
@@ -46,7 +46,7 @@ index 086bd93953f62947de97d176798469e76bced8e7..52a19689111b0682d02f2f0f4f5fea5d
private void playerSettings() { private void playerSettings() {
if (PurpurConfig.version < 19) { if (PurpurConfig.version < 19) {
boolean oldVal = getBoolean("gameplay-mechanics.player.idle-timeout.mods-target", idleTimeoutTargetPlayer); boolean oldVal = getBoolean("gameplay-mechanics.player.idle-timeout.mods-target", idleTimeoutTargetPlayer);
@@ -446,6 +447,7 @@ public class PurpurWorldConfig { @@ -444,6 +445,7 @@ public class PurpurWorldConfig {
playerRidableInWater = getBoolean("gameplay-mechanics.player.ridable-in-water", playerRidableInWater); playerRidableInWater = getBoolean("gameplay-mechanics.player.ridable-in-water", playerRidableInWater);
playerRemoveBindingWithWeakness = getBoolean("gameplay-mechanics.player.curse-of-binding.remove-with-weakness", playerRemoveBindingWithWeakness); playerRemoveBindingWithWeakness = getBoolean("gameplay-mechanics.player.curse-of-binding.remove-with-weakness", playerRemoveBindingWithWeakness);
shiftRightClickRepairsMendingPoints = getInt("gameplay-mechanics.player.shift-right-click-repairs-mending-points", shiftRightClickRepairsMendingPoints); shiftRightClickRepairsMendingPoints = getInt("gameplay-mechanics.player.shift-right-click-repairs-mending-points", shiftRightClickRepairsMendingPoints);

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Allow void trading
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 4cae0fbd061b76b7bf9e42fa8c6560721fd4b19c..bfc36c239dab4df5130cbde190d513655b9f12a1 100644 index de24307e48e7bc6cc39234fae55ddb404df243b3..f2bf1a9856fb1200f750b06b64e83b1b12e4068d 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java --- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -2681,7 +2681,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf. @@ -2770,7 +2770,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
// Spigot Start // Spigot Start
if (entity.getBukkitEntity() instanceof org.bukkit.inventory.InventoryHolder && (!(entity instanceof ServerPlayer) || entity.getRemovalReason() != Entity.RemovalReason.KILLED)) { // SPIGOT-6876: closeInventory clears death message if (entity.getBukkitEntity() instanceof org.bukkit.inventory.InventoryHolder && (!(entity instanceof ServerPlayer) || entity.getRemovalReason() != Entity.RemovalReason.KILLED)) { // SPIGOT-6876: closeInventory clears death message
// Paper start - Fix merchant inventory not closing on entity removal // Paper start - Fix merchant inventory not closing on entity removal
@@ -18,10 +18,10 @@ index 4cae0fbd061b76b7bf9e42fa8c6560721fd4b19c..bfc36c239dab4df5130cbde190d51365
} }
// Paper end - Fix merchant inventory not closing on entity removal // Paper end - Fix merchant inventory not closing on entity removal
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index 52a19689111b0682d02f2f0f4f5fea5d28373752..d046f5dae570c6c7987740ab0648ef1c2d9d92d5 100644 index 74b5d04cf6880f30f8f36ea0414e0ae5542c34b7..17f43806df5c8c14a7c90f02e8519e6786700859 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -422,6 +422,7 @@ public class PurpurWorldConfig { @@ -420,6 +420,7 @@ public class PurpurWorldConfig {
public boolean playerRemoveBindingWithWeakness = false; public boolean playerRemoveBindingWithWeakness = false;
public int shiftRightClickRepairsMendingPoints = 0; public int shiftRightClickRepairsMendingPoints = 0;
public int playerExpPickupDelay = 2; public int playerExpPickupDelay = 2;
@@ -29,7 +29,7 @@ index 52a19689111b0682d02f2f0f4f5fea5d28373752..d046f5dae570c6c7987740ab0648ef1c
private void playerSettings() { private void playerSettings() {
if (PurpurConfig.version < 19) { if (PurpurConfig.version < 19) {
boolean oldVal = getBoolean("gameplay-mechanics.player.idle-timeout.mods-target", idleTimeoutTargetPlayer); boolean oldVal = getBoolean("gameplay-mechanics.player.idle-timeout.mods-target", idleTimeoutTargetPlayer);
@@ -448,6 +449,7 @@ public class PurpurWorldConfig { @@ -446,6 +447,7 @@ public class PurpurWorldConfig {
playerRemoveBindingWithWeakness = getBoolean("gameplay-mechanics.player.curse-of-binding.remove-with-weakness", playerRemoveBindingWithWeakness); playerRemoveBindingWithWeakness = getBoolean("gameplay-mechanics.player.curse-of-binding.remove-with-weakness", playerRemoveBindingWithWeakness);
shiftRightClickRepairsMendingPoints = getInt("gameplay-mechanics.player.shift-right-click-repairs-mending-points", shiftRightClickRepairsMendingPoints); shiftRightClickRepairsMendingPoints = getInt("gameplay-mechanics.player.shift-right-click-repairs-mending-points", shiftRightClickRepairsMendingPoints);
playerExpPickupDelay = getInt("gameplay-mechanics.player.exp-pickup-delay-ticks", playerExpPickupDelay); playerExpPickupDelay = getInt("gameplay-mechanics.player.exp-pickup-delay-ticks", playerExpPickupDelay);

View File

@@ -5,12 +5,12 @@ Subject: [PATCH] Configurable phantom size
diff --git a/src/main/java/net/minecraft/world/entity/monster/Phantom.java b/src/main/java/net/minecraft/world/entity/monster/Phantom.java diff --git a/src/main/java/net/minecraft/world/entity/monster/Phantom.java b/src/main/java/net/minecraft/world/entity/monster/Phantom.java
index 718311ba402fbc5b05fd480395d29578d1f3fd71..493e9ee0585ae419caffaa163f4975ab6408fad8 100644 index bd5dedf875014b4d75e381f613e708addeb154cc..ead5d7d58bbd66f05fd2178ca9c350105aa4008c 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Phantom.java --- a/src/main/java/net/minecraft/world/entity/monster/Phantom.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Phantom.java +++ b/src/main/java/net/minecraft/world/entity/monster/Phantom.java
@@ -265,7 +265,11 @@ public class Phantom extends FlyingMob implements Enemy { @@ -261,7 +261,11 @@ public class Phantom extends FlyingMob implements Enemy {
@Override @Override
public SpawnGroupData finalizeSpawn(ServerLevelAccessor world, DifficultyInstance difficulty, MobSpawnType spawnReason, @Nullable SpawnGroupData entityData) { public SpawnGroupData finalizeSpawn(ServerLevelAccessor world, DifficultyInstance difficulty, EntitySpawnReason spawnReason, @Nullable SpawnGroupData entityData) {
this.anchorPoint = this.blockPosition().above(5); this.anchorPoint = this.blockPosition().above(5);
- this.setPhantomSize(0); - this.setPhantomSize(0);
+ // Purpur start + // Purpur start
@@ -22,10 +22,10 @@ index 718311ba402fbc5b05fd480395d29578d1f3fd71..493e9ee0585ae419caffaa163f4975ab
} }
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index d046f5dae570c6c7987740ab0648ef1c2d9d92d5..1fe4b4d04d155ffbe5447a38bfc39886edf98919 100644 index 17f43806df5c8c14a7c90f02e8519e6786700859..6c9d1b53e1c4cc96620d3605c4fdd2d816cb5bf7 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -2163,6 +2163,8 @@ public class PurpurWorldConfig { @@ -2159,6 +2159,8 @@ public class PurpurWorldConfig {
public boolean phantomFlamesOnSwoop = false; public boolean phantomFlamesOnSwoop = false;
public boolean phantomTakeDamageFromWater = false; public boolean phantomTakeDamageFromWater = false;
public boolean phantomAlwaysDropExp = false; public boolean phantomAlwaysDropExp = false;
@@ -34,7 +34,7 @@ index d046f5dae570c6c7987740ab0648ef1c2d9d92d5..1fe4b4d04d155ffbe5447a38bfc39886
private void phantomSettings() { private void phantomSettings() {
phantomRidable = getBoolean("mobs.phantom.ridable", phantomRidable); phantomRidable = getBoolean("mobs.phantom.ridable", phantomRidable);
phantomRidableInWater = getBoolean("mobs.phantom.ridable-in-water", phantomRidableInWater); phantomRidableInWater = getBoolean("mobs.phantom.ridable-in-water", phantomRidableInWater);
@@ -2199,6 +2201,13 @@ public class PurpurWorldConfig { @@ -2195,6 +2197,13 @@ public class PurpurWorldConfig {
phantomFlamesOnSwoop = getBoolean("mobs.phantom.flames-on-swoop", phantomFlamesOnSwoop); phantomFlamesOnSwoop = getBoolean("mobs.phantom.flames-on-swoop", phantomFlamesOnSwoop);
phantomTakeDamageFromWater = getBoolean("mobs.phantom.takes-damage-from-water", phantomTakeDamageFromWater); phantomTakeDamageFromWater = getBoolean("mobs.phantom.takes-damage-from-water", phantomTakeDamageFromWater);
phantomAlwaysDropExp = getBoolean("mobs.phantom.always-drop-exp", phantomAlwaysDropExp); phantomAlwaysDropExp = getBoolean("mobs.phantom.always-drop-exp", phantomAlwaysDropExp);

View File

@@ -6,7 +6,7 @@ Subject: [PATCH] Max joins per second
When this option is set to true the `max-joins-per-tick` setting in paper.yml will be used per second instead of per tick When this option is set to true the `max-joins-per-tick` setting in paper.yml will be used per second instead of per tick
diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java
index 3e550f8e7cd4f4e16f499a8a2a4b95420270f07a..a937bc49a85c0e565f0400163c1c9174891fb48d 100644 index fff8d15d44613a075b9793c2a41520212166eb3b..4b0e41b5e26ecf632dff512aac6660fff5264072 100644
--- a/src/main/java/net/minecraft/network/Connection.java --- a/src/main/java/net/minecraft/network/Connection.java
+++ b/src/main/java/net/minecraft/network/Connection.java +++ b/src/main/java/net/minecraft/network/Connection.java
@@ -617,11 +617,20 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> { @@ -617,11 +617,20 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> {
@@ -31,10 +31,10 @@ index 3e550f8e7cd4f4e16f499a8a2a4b95420270f07a..a937bc49a85c0e565f0400163c1c9174
} }
// Paper end - Buffer joins to world // Paper end - Buffer joins to world
diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
index 5643fced7c9fd52552fe082142128a83fd76d2c0..96b50d5f4e3f51f40e57a4061229f09aaa49eb94 100644 index 357b5080b6d3651c8f913081de283576a0a17cec..f8179f8b7a57a66705d51f30ab528307e3a84b32 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java --- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
@@ -458,8 +458,10 @@ public class PurpurConfig { @@ -456,8 +456,10 @@ public class PurpurConfig {
} }
public static boolean useUPnP = false; public static boolean useUPnP = false;

View File

@@ -9,10 +9,10 @@ This patch adds a config option to allow the minimum demand to instead
be configurable. be configurable.
diff --git a/src/main/java/net/minecraft/world/entity/npc/Villager.java b/src/main/java/net/minecraft/world/entity/npc/Villager.java 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 b05b4df3c6dd3c08da10add4180829357b2e7f00..3fb1ebe0cf0657eea34b1f4de14b5802ee4e09c9 100644 index 8e519706b025579aad1b74be3b8c6c49146a64a2..b1a0a11f8443a797146dbaf46b9830133f3a51e0 100644
--- a/src/main/java/net/minecraft/world/entity/npc/Villager.java --- a/src/main/java/net/minecraft/world/entity/npc/Villager.java
+++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java +++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java
@@ -551,7 +551,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler @@ -539,7 +539,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
while (iterator.hasNext()) { while (iterator.hasNext()) {
MerchantOffer merchantrecipe = (MerchantOffer) iterator.next(); MerchantOffer merchantrecipe = (MerchantOffer) iterator.next();
@@ -40,10 +40,10 @@ index 0efc8d997b34302c3e0a5d7ec73a11a940dbeefe..af157881d440b34cfe79fbc9b03cc9ef
public ItemStack assemble() { public ItemStack assemble() {
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index 1fe4b4d04d155ffbe5447a38bfc39886edf98919..f671cad8a0ae956445f56639124bc2ad382c8dc2 100644 index 6c9d1b53e1c4cc96620d3605c4fdd2d816cb5bf7..e11ff40921da76c9d42b6a478fe7bd3e4417140b 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -2893,6 +2893,7 @@ public class PurpurWorldConfig { @@ -2889,6 +2889,7 @@ public class PurpurWorldConfig {
public boolean villagerTakeDamageFromWater = false; public boolean villagerTakeDamageFromWater = false;
public boolean villagerAllowTrading = true; public boolean villagerAllowTrading = true;
public boolean villagerAlwaysDropExp = false; public boolean villagerAlwaysDropExp = false;
@@ -51,7 +51,7 @@ index 1fe4b4d04d155ffbe5447a38bfc39886edf98919..f671cad8a0ae956445f56639124bc2ad
private void villagerSettings() { private void villagerSettings() {
villagerRidable = getBoolean("mobs.villager.ridable", villagerRidable); villagerRidable = getBoolean("mobs.villager.ridable", villagerRidable);
villagerRidableInWater = getBoolean("mobs.villager.ridable-in-water", villagerRidableInWater); villagerRidableInWater = getBoolean("mobs.villager.ridable-in-water", villagerRidableInWater);
@@ -2914,6 +2915,7 @@ public class PurpurWorldConfig { @@ -2910,6 +2911,7 @@ public class PurpurWorldConfig {
villagerTakeDamageFromWater = getBoolean("mobs.villager.takes-damage-from-water", villagerTakeDamageFromWater); villagerTakeDamageFromWater = getBoolean("mobs.villager.takes-damage-from-water", villagerTakeDamageFromWater);
villagerAllowTrading = getBoolean("mobs.villager.allow-trading", villagerAllowTrading); villagerAllowTrading = getBoolean("mobs.villager.allow-trading", villagerAllowTrading);
villagerAlwaysDropExp = getBoolean("mobs.villager.always-drop-exp", villagerAlwaysDropExp); villagerAlwaysDropExp = getBoolean("mobs.villager.always-drop-exp", villagerAlwaysDropExp);

View File

@@ -5,19 +5,19 @@ Subject: [PATCH] Lobotomize stuck villagers
diff --git a/src/main/java/net/minecraft/world/entity/npc/Villager.java b/src/main/java/net/minecraft/world/entity/npc/Villager.java 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 3fb1ebe0cf0657eea34b1f4de14b5802ee4e09c9..3d93d548b8c68cc0ee7c52dd0f92664c47077b6d 100644 index b1a0a11f8443a797146dbaf46b9830133f3a51e0..052a131d7222ac490b5c40e65c1f801a4299b4e9 100644
--- a/src/main/java/net/minecraft/world/entity/npc/Villager.java --- a/src/main/java/net/minecraft/world/entity/npc/Villager.java
+++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java +++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java
@@ -142,6 +142,8 @@ public class Villager extends AbstractVillager implements ReputationEventHandler @@ -141,6 +141,8 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
}, MemoryModuleType.MEETING_POINT, (entityvillager, holder) -> { }, MemoryModuleType.MEETING_POINT, (entityvillager, holder) -> {
return holder.is(PoiTypes.MEETING); return holder.is(PoiTypes.MEETING);
}); });
+ private boolean isLobotomized = false; public boolean isLobotomized() { return this.isLobotomized; } // Purpur + private boolean isLobotomized = false; public boolean isLobotomized() { return this.isLobotomized; } // Purpur
+ private int notLobotomizedCount = 0; // Purpur + private int notLobotomizedCount = 0; // Purpur
public long nextGolemPanic = -1; // Pufferfish public Villager(EntityType<? extends Villager> entityType, Level world) {
this(entityType, world, VillagerType.PLAINS);
@@ -202,6 +204,48 @@ public class Villager extends AbstractVillager implements ReputationEventHandler @@ -200,6 +202,48 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
return this.level().purpurConfig.villagerAlwaysDropExp; return this.level().purpurConfig.villagerAlwaysDropExp;
} }
@@ -66,14 +66,16 @@ index 3fb1ebe0cf0657eea34b1f4de14b5802ee4e09c9..3d93d548b8c68cc0ee7c52dd0f92664c
@Override @Override
public Brain<Villager> getBrain() { public Brain<Villager> getBrain() {
return (Brain<Villager>) super.getBrain(); // CraftBukkit - decompile error return (Brain<Villager>) super.getBrain(); // CraftBukkit - decompile error
@@ -299,13 +343,22 @@ public class Villager extends AbstractVillager implements ReputationEventHandler @@ -294,11 +338,19 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
// Paper start // Paper start - EAR 2
this.customServerAiStep(false); this.customServerAiStep(world, false);
} }
- protected void customServerAiStep(final boolean inactive) { - protected void customServerAiStep(ServerLevel world, final boolean inactive) {
+ protected void customServerAiStep(boolean inactive) { // Purpur - not final + protected void customServerAiStep(ServerLevel world, boolean inactive) { // Purpur - not final
// Paper end // Paper end - EAR 2
this.level().getProfiler().push("villagerBrain"); ProfilerFiller gameprofilerfiller = Profiler.get();
gameprofilerfiller.push("villagerBrain");
+ // Purpur start + // Purpur start
+ if (this.level().purpurConfig.villagerLobotomizeEnabled) { + if (this.level().purpurConfig.villagerLobotomizeEnabled) {
+ // treat as inactive if lobotomized + // treat as inactive if lobotomized
@@ -82,19 +84,14 @@ index 3fb1ebe0cf0657eea34b1f4de14b5802ee4e09c9..3d93d548b8c68cc0ee7c52dd0f92664c
+ this.isLobotomized = false; + this.isLobotomized = false;
+ } + }
+ // Purpur end + // Purpur end
// Pufferfish start if (!inactive && (getRider() == null || !this.isControllable())) this.getBrain().tick(world, this); // Purpur
if (!inactive && (getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) { // Purpur - only use brain if no rider gameprofilerfiller.pop();
this.getBrain().tick((ServerLevel) this.level(), this); // Paper
}
+ else if (this.isLobotomized && shouldRestock()) restock(); // Purpur
// Pufferfish end
this.level().getProfiler().pop();
if (this.assignProfessionWhenSpawned) { if (this.assignProfessionWhenSpawned) {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java
index bd2987fa1fb194a581567134ed980e8fc043f435..bdd345595ed71a8018349e184afe8582a24f3622 100644 index 8e895d6f84f7d84b219f2424909dd42e5f08dec4..53dcce0701d713c5dd097340a91b8be4806de4b8 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java
@@ -374,4 +374,11 @@ public class CraftVillager extends CraftAbstractVillager implements Villager { @@ -375,4 +375,11 @@ public class CraftVillager extends CraftAbstractVillager implements Villager {
getHandle().getGossips().gossips.clear(); getHandle().getGossips().gossips.clear();
} }
// Paper end // Paper end
@@ -107,10 +104,10 @@ index bd2987fa1fb194a581567134ed980e8fc043f435..bdd345595ed71a8018349e184afe8582
+ // Purpur end + // Purpur end
} }
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index f671cad8a0ae956445f56639124bc2ad382c8dc2..5fe653e690bfe00852f13e4242a78333252e92bc 100644 index e11ff40921da76c9d42b6a478fe7bd3e4417140b..f43b835c9a7af1e19b9dd5de40fb2267c153595f 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -2894,6 +2894,9 @@ public class PurpurWorldConfig { @@ -2890,6 +2890,9 @@ public class PurpurWorldConfig {
public boolean villagerAllowTrading = true; public boolean villagerAllowTrading = true;
public boolean villagerAlwaysDropExp = false; public boolean villagerAlwaysDropExp = false;
public int villagerMinimumDemand = 0; public int villagerMinimumDemand = 0;
@@ -120,7 +117,7 @@ index f671cad8a0ae956445f56639124bc2ad382c8dc2..5fe653e690bfe00852f13e4242a78333
private void villagerSettings() { private void villagerSettings() {
villagerRidable = getBoolean("mobs.villager.ridable", villagerRidable); villagerRidable = getBoolean("mobs.villager.ridable", villagerRidable);
villagerRidableInWater = getBoolean("mobs.villager.ridable-in-water", villagerRidableInWater); villagerRidableInWater = getBoolean("mobs.villager.ridable-in-water", villagerRidableInWater);
@@ -2916,6 +2919,18 @@ public class PurpurWorldConfig { @@ -2912,6 +2915,18 @@ public class PurpurWorldConfig {
villagerAllowTrading = getBoolean("mobs.villager.allow-trading", villagerAllowTrading); villagerAllowTrading = getBoolean("mobs.villager.allow-trading", villagerAllowTrading);
villagerAlwaysDropExp = getBoolean("mobs.villager.always-drop-exp", villagerAlwaysDropExp); villagerAlwaysDropExp = getBoolean("mobs.villager.always-drop-exp", villagerAlwaysDropExp);
villagerMinimumDemand = getInt("mobs.villager.minimum-demand", villagerMinimumDemand); villagerMinimumDemand = getInt("mobs.villager.minimum-demand", villagerMinimumDemand);

View File

@@ -17,10 +17,10 @@ index 18dad0825616c4167a0a7555689ee64910a87e09..6945992491027d43eca4f1ca697ad45c
&& this.lookTime > 0 && this.lookTime > 0
&& entity.getBrain().getMemory(MemoryModuleType.INTERACTION_TARGET).isPresent(); && entity.getBrain().getMemory(MemoryModuleType.INTERACTION_TARGET).isPresent();
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index 5fe653e690bfe00852f13e4242a78333252e92bc..eae99e53fd0bc9534ed8e70a7c5c1b1925c5e27b 100644 index f43b835c9a7af1e19b9dd5de40fb2267c153595f..ac3042705a8ef4154b6feac9115bac19f7fdead3 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -2897,6 +2897,7 @@ public class PurpurWorldConfig { @@ -2893,6 +2893,7 @@ public class PurpurWorldConfig {
public boolean villagerLobotomizeEnabled = false; public boolean villagerLobotomizeEnabled = false;
public int villagerLobotomizeCheckInterval = 100; public int villagerLobotomizeCheckInterval = 100;
public boolean villagerLobotomizeWaitUntilTradeLocked = false; public boolean villagerLobotomizeWaitUntilTradeLocked = false;
@@ -28,7 +28,7 @@ index 5fe653e690bfe00852f13e4242a78333252e92bc..eae99e53fd0bc9534ed8e70a7c5c1b19
private void villagerSettings() { private void villagerSettings() {
villagerRidable = getBoolean("mobs.villager.ridable", villagerRidable); villagerRidable = getBoolean("mobs.villager.ridable", villagerRidable);
villagerRidableInWater = getBoolean("mobs.villager.ridable-in-water", villagerRidableInWater); villagerRidableInWater = getBoolean("mobs.villager.ridable-in-water", villagerRidableInWater);
@@ -2931,6 +2932,7 @@ public class PurpurWorldConfig { @@ -2927,6 +2928,7 @@ public class PurpurWorldConfig {
villagerLobotomizeEnabled = getBoolean("mobs.villager.lobotomize.enabled", villagerLobotomizeEnabled); villagerLobotomizeEnabled = getBoolean("mobs.villager.lobotomize.enabled", villagerLobotomizeEnabled);
villagerLobotomizeCheckInterval = getInt("mobs.villager.lobotomize.check-interval", villagerLobotomizeCheckInterval); villagerLobotomizeCheckInterval = getInt("mobs.villager.lobotomize.check-interval", villagerLobotomizeCheckInterval);
villagerLobotomizeWaitUntilTradeLocked = getBoolean("mobs.villager.lobotomize.wait-until-trade-locked", villagerLobotomizeWaitUntilTradeLocked); villagerLobotomizeWaitUntilTradeLocked = getBoolean("mobs.villager.lobotomize.wait-until-trade-locked", villagerLobotomizeWaitUntilTradeLocked);

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] MC-238526 - Fix spawner not spawning water animals correctly
diff --git a/src/main/java/net/minecraft/world/entity/animal/WaterAnimal.java b/src/main/java/net/minecraft/world/entity/animal/WaterAnimal.java diff --git a/src/main/java/net/minecraft/world/entity/animal/WaterAnimal.java b/src/main/java/net/minecraft/world/entity/animal/WaterAnimal.java
index c9cabb061ebc9172647304431cc3fb2593dd47ba..565408c03849fb3011fb708478a99ec6ffd081ef 100644 index 8c4532a250f8679d729a35c17e9b5bd339264450..16518ade3b0c355e6002801d88eb92cc82dc7b56 100644
--- a/src/main/java/net/minecraft/world/entity/animal/WaterAnimal.java --- a/src/main/java/net/minecraft/world/entity/animal/WaterAnimal.java
+++ b/src/main/java/net/minecraft/world/entity/animal/WaterAnimal.java +++ b/src/main/java/net/minecraft/world/entity/animal/WaterAnimal.java
@@ -71,6 +71,6 @@ public abstract class WaterAnimal extends PathfinderMob { @@ -74,6 +74,6 @@ public abstract class WaterAnimal extends PathfinderMob {
i = world.getMinecraftWorld().paperConfig().entities.spawning.wateranimalSpawnHeight.maximum.or(i); i = world.getMinecraftWorld().paperConfig().entities.spawning.wateranimalSpawnHeight.maximum.or(i);
j = world.getMinecraftWorld().paperConfig().entities.spawning.wateranimalSpawnHeight.minimum.or(j); j = world.getMinecraftWorld().paperConfig().entities.spawning.wateranimalSpawnHeight.minimum.or(j);
// Paper end - Make water animal spawn height configurable // Paper end - Make water animal spawn height configurable
@@ -17,10 +17,10 @@ index c9cabb061ebc9172647304431cc3fb2593dd47ba..565408c03849fb3011fb708478a99ec6
} }
} }
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index eae99e53fd0bc9534ed8e70a7c5c1b1925c5e27b..2f2f4972cef6d980d1188e072ae1dd7f9732cc8c 100644 index ac3042705a8ef4154b6feac9115bac19f7fdead3..1426f0f6246c4e57a66e25365609c36991a72059 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -1021,8 +1021,10 @@ public class PurpurWorldConfig { @@ -1019,8 +1019,10 @@ public class PurpurWorldConfig {
} }
public boolean spawnerDeactivateByRedstone = false; public boolean spawnerDeactivateByRedstone = false;

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Config for mob last hurt by player time
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index cb9ae94b4fff8406cdbc40a1d5d38f0272a4a212..409d5c775b3187f2d3b58879e3c945d16a690299 100644 index 090f259115573f0ed2fb7ed79d191b3f09ac27cd..60b0cf7cd5e4bcbe882590b79a70dafb23e6772f 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -1579,13 +1579,13 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -1603,13 +1603,13 @@ public abstract class LivingEntity extends Entity implements Attackable {
if (entity1 instanceof net.minecraft.world.entity.player.Player) { if (entity1 instanceof net.minecraft.world.entity.player.Player) {
net.minecraft.world.entity.player.Player entityhuman = (net.minecraft.world.entity.player.Player) entity1; net.minecraft.world.entity.player.Player entityhuman = (net.minecraft.world.entity.player.Player) entity1;
@@ -25,10 +25,10 @@ index cb9ae94b4fff8406cdbc40a1d5d38f0272a4a212..409d5c775b3187f2d3b58879e3c945d1
if (entityliving2 instanceof net.minecraft.world.entity.player.Player) { if (entityliving2 instanceof net.minecraft.world.entity.player.Player) {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index a187a3ff72d544c6ee5dbba95de206ec3b81c2d0..491c320d3745587757ddc9131a7585275e35d0c2 100644 index bf84c9664ca6d6c3d862e592c39bcc59374b63fe..051ffc663317fe5a4fafe0750c89fafdece4d316 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -514,7 +514,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { @@ -523,7 +523,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
net.minecraft.server.level.ServerPlayer entityPlayer = killer == null ? null : ((CraftPlayer) killer).getHandle(); net.minecraft.server.level.ServerPlayer entityPlayer = killer == null ? null : ((CraftPlayer) killer).getHandle();
getHandle().lastHurtByPlayer = entityPlayer; getHandle().lastHurtByPlayer = entityPlayer;
getHandle().lastHurtByMob = entityPlayer; getHandle().lastHurtByMob = entityPlayer;
@@ -38,21 +38,21 @@ index a187a3ff72d544c6ee5dbba95de206ec3b81c2d0..491c320d3745587757ddc9131a758527
// Paper end // Paper end
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index 2f2f4972cef6d980d1188e072ae1dd7f9732cc8c..37c61fbf7a0e8b8aa88a60716b7aa82233a82e9a 100644 index 1426f0f6246c4e57a66e25365609c36991a72059..bd48ba4acf41ec77f542ca7e8dfe6280bb2fbed1 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -144,6 +144,7 @@ public class PurpurWorldConfig { @@ -143,6 +143,7 @@ public class PurpurWorldConfig {
public boolean mobsIgnoreRails = false;
public boolean rainStopsAfterSleep = true;
public boolean thunderStopsAfterSleep = true; public boolean thunderStopsAfterSleep = true;
public boolean persistentTileEntityLore = false;
public boolean persistentTileEntityDisplayName = true;
+ public int mobLastHurtByPlayerTime = 100; + public int mobLastHurtByPlayerTime = 100;
private void miscGameplayMechanicsSettings() { private void miscGameplayMechanicsSettings() {
useBetterMending = getBoolean("gameplay-mechanics.use-better-mending", useBetterMending); useBetterMending = getBoolean("gameplay-mechanics.use-better-mending", useBetterMending);
alwaysTameInCreative = getBoolean("gameplay-mechanics.always-tame-in-creative", alwaysTameInCreative); alwaysTameInCreative = getBoolean("gameplay-mechanics.always-tame-in-creative", alwaysTameInCreative);
@@ -176,6 +177,7 @@ public class PurpurWorldConfig { @@ -174,6 +175,7 @@ public class PurpurWorldConfig {
mobsIgnoreRails = getBoolean("gameplay-mechanics.mobs-ignore-rails", mobsIgnoreRails); }
rainStopsAfterSleep = getBoolean("gameplay-mechanics.rain-stops-after-sleep", rainStopsAfterSleep); persistentTileEntityLore = getBoolean("gameplay-mechanics.persistent-tileentity-lore", persistentTileEntityLore);
thunderStopsAfterSleep = getBoolean("gameplay-mechanics.thunder-stops-after-sleep", thunderStopsAfterSleep); persistentTileEntityDisplayName = getBoolean("gameplay-mechanics.persistent-tileentity-display-name", persistentTileEntityDisplayName);
+ mobLastHurtByPlayerTime = getInt("gameplay-mechanics.mob-last-hurt-by-player-time", mobLastHurtByPlayerTime); + mobLastHurtByPlayerTime = getInt("gameplay-mechanics.mob-last-hurt-by-player-time", mobLastHurtByPlayerTime);
} }

View File

@@ -5,7 +5,7 @@ Subject: [PATCH] Anvil repair/damage options
diff --git a/src/main/java/net/minecraft/world/level/block/AnvilBlock.java b/src/main/java/net/minecraft/world/level/block/AnvilBlock.java diff --git a/src/main/java/net/minecraft/world/level/block/AnvilBlock.java b/src/main/java/net/minecraft/world/level/block/AnvilBlock.java
index c77d4adbba79ec39ab78c2a6bac1e8f94ba7fd68..97f75aa767c90a244a094367b408e6899224c7b9 100644 index 50c907c962f936d2035bb7550750cdbd220b29c2..7f07a38553325056ab4ae65895c8c5c12cb41a1f 100644
--- a/src/main/java/net/minecraft/world/level/block/AnvilBlock.java --- a/src/main/java/net/minecraft/world/level/block/AnvilBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/AnvilBlock.java +++ b/src/main/java/net/minecraft/world/level/block/AnvilBlock.java
@@ -59,6 +59,53 @@ public class AnvilBlock extends FallingBlock { @@ -59,6 +59,53 @@ public class AnvilBlock extends FallingBlock {
@@ -61,12 +61,12 @@ index c77d4adbba79ec39ab78c2a6bac1e8f94ba7fd68..97f75aa767c90a244a094367b408e689
+ +
@Override @Override
protected InteractionResult useWithoutItem(BlockState state, Level world, BlockPos pos, Player player, BlockHitResult hit) { protected InteractionResult useWithoutItem(BlockState state, Level world, BlockPos pos, Player player, BlockHitResult hit) {
if (world.isClientSide) { if (!world.isClientSide) {
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index 37c61fbf7a0e8b8aa88a60716b7aa82233a82e9a..1977a20b69426cdd023ac9e9e20a1b709b9fb96f 100644 index bd48ba4acf41ec77f542ca7e8dfe6280bb2fbed1..9f4f3d94e6790b29cfda030780d95caf48eee0e5 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -788,9 +788,13 @@ public class PurpurWorldConfig { @@ -786,9 +786,13 @@ public class PurpurWorldConfig {
public boolean anvilAllowColors = false; public boolean anvilAllowColors = false;
public boolean anvilColorsUseMiniMessage; public boolean anvilColorsUseMiniMessage;

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Option to disable turtle egg trampling with feather falling
diff --git a/src/main/java/net/minecraft/world/level/block/TurtleEggBlock.java b/src/main/java/net/minecraft/world/level/block/TurtleEggBlock.java diff --git a/src/main/java/net/minecraft/world/level/block/TurtleEggBlock.java b/src/main/java/net/minecraft/world/level/block/TurtleEggBlock.java
index 2f0e8aeb9c45853fca12ddd78a7d51813a600e67..08ba90f760abb9fb62311dddd7b5bdbd0d9518d7 100644 index e1c984ec64565584c78fe0a6c7db3537108bac59..3829dbae8542396f8360eae54f0ed18fbde4cd8c 100644
--- a/src/main/java/net/minecraft/world/level/block/TurtleEggBlock.java --- a/src/main/java/net/minecraft/world/level/block/TurtleEggBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/TurtleEggBlock.java +++ b/src/main/java/net/minecraft/world/level/block/TurtleEggBlock.java
@@ -219,7 +219,13 @@ public class TurtleEggBlock extends Block { @@ -220,7 +220,13 @@ public class TurtleEggBlock extends Block {
if (!(entity instanceof LivingEntity)) { if (!(entity instanceof LivingEntity)) {
return false; return false;
} }
@@ -24,10 +24,10 @@ index 2f0e8aeb9c45853fca12ddd78a7d51813a600e67..08ba90f760abb9fb62311dddd7b5bdbd
return world.purpurConfig.turtleEggsBypassMobGriefing || world.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING); return world.purpurConfig.turtleEggsBypassMobGriefing || world.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING);
// Purpur end // Purpur end
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index 1977a20b69426cdd023ac9e9e20a1b709b9fb96f..5db74ab53a80f4a24a0294983089e7226ab33388 100644 index 9f4f3d94e6790b29cfda030780d95caf48eee0e5..d5b19afb053ff01962939d1584b2d00db3f9cea3 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -1049,12 +1049,14 @@ public class PurpurWorldConfig { @@ -1047,12 +1047,14 @@ public class PurpurWorldConfig {
public boolean turtleEggsBreakFromMinecarts = false; public boolean turtleEggsBreakFromMinecarts = false;
public boolean turtleEggsBypassMobGriefing = false; public boolean turtleEggsBypassMobGriefing = false;
public int turtleEggsRandomTickCrackChance = 500; public int turtleEggsRandomTickCrackChance = 500;

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Add toggle for enchant level clamping
diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java
index 581bd217304e0f9e0b2113c335694805dfb4e2a1..85a0a07707a2b4029879b8caea79ded4bd849dab 100644 index e114e687f2f4503546687fd6792226a643af8793..cccdf61ff0b08531ec0f2165588abe5dd4d488eb 100644
--- a/src/main/java/net/minecraft/server/Main.java --- a/src/main/java/net/minecraft/server/Main.java
+++ b/src/main/java/net/minecraft/server/Main.java +++ b/src/main/java/net/minecraft/server/Main.java
@@ -120,6 +120,11 @@ public class Main { @@ -119,6 +119,11 @@ public class Main {
JvmProfiler.INSTANCE.start(Environment.SERVER); JvmProfiler.INSTANCE.start(Environment.SERVER);
} }
@@ -21,15 +21,15 @@ index 581bd217304e0f9e0b2113c335694805dfb4e2a1..85a0a07707a2b4029879b8caea79ded4
Bootstrap.bootStrap(); Bootstrap.bootStrap();
Bootstrap.validate(); Bootstrap.validate();
diff --git a/src/main/java/net/minecraft/world/item/enchantment/ItemEnchantments.java b/src/main/java/net/minecraft/world/item/enchantment/ItemEnchantments.java diff --git a/src/main/java/net/minecraft/world/item/enchantment/ItemEnchantments.java b/src/main/java/net/minecraft/world/item/enchantment/ItemEnchantments.java
index 8ac485d82c2d2b32f4d54e02c18c2cb2c3df4fa4..9ebe6a5f31ceacd33d9c111966ad941b535b4e67 100644 index cfc6a657cae92c68868a76c1b7b1febe2a16e9f4..a12c08da793139e39dc11c213c94796b83bd8240 100644
--- a/src/main/java/net/minecraft/world/item/enchantment/ItemEnchantments.java --- a/src/main/java/net/minecraft/world/item/enchantment/ItemEnchantments.java
+++ b/src/main/java/net/minecraft/world/item/enchantment/ItemEnchantments.java +++ b/src/main/java/net/minecraft/world/item/enchantment/ItemEnchantments.java
@@ -35,7 +35,7 @@ public class ItemEnchantments implements TooltipProvider { @@ -35,7 +35,7 @@ public class ItemEnchantments implements TooltipProvider {
private static final java.util.Comparator<Holder<Enchantment>> ENCHANTMENT_ORDER = java.util.Comparator.comparing(Holder::getRegisteredName); private static final java.util.Comparator<Holder<Enchantment>> ENCHANTMENT_ORDER = java.util.Comparator.comparing(Holder::getRegisteredName);
public static final ItemEnchantments EMPTY = new ItemEnchantments(new Object2IntAVLTreeMap<>(ENCHANTMENT_ORDER), true); public static final ItemEnchantments EMPTY = new ItemEnchantments(new Object2IntAVLTreeMap<>(ENCHANTMENT_ORDER), true);
// Paper end // Paper end
- private static final Codec<Integer> LEVEL_CODEC = Codec.intRange(0, 255); - private static final Codec<Integer> LEVEL_CODEC = Codec.intRange(1, 255);
+ private static final Codec<Integer> LEVEL_CODEC = Codec.intRange(0, (org.purpurmc.purpur.PurpurConfig.clampEnchantLevels ? 255 : 32767)); // Purpur + private static final Codec<Integer> LEVEL_CODEC = Codec.intRange(1, (org.purpurmc.purpur.PurpurConfig.clampEnchantLevels ? 255 : 32767)); // Purpur
private static final Codec<Object2IntAVLTreeMap<Holder<Enchantment>>> LEVELS_CODEC = Codec.unboundedMap( private static final Codec<Object2IntAVLTreeMap<Holder<Enchantment>>> LEVELS_CODEC = Codec.unboundedMap(
Enchantment.CODEC, LEVEL_CODEC Enchantment.CODEC, LEVEL_CODEC
)// Paper start - sort enchantments )// Paper start - sort enchantments
@@ -42,7 +42,7 @@ index 8ac485d82c2d2b32f4d54e02c18c2cb2c3df4fa4..9ebe6a5f31ceacd33d9c111966ad941b
throw new IllegalArgumentException("Enchantment " + entry.getKey() + " has invalid level " + i); throw new IllegalArgumentException("Enchantment " + entry.getKey() + " has invalid level " + i);
} }
} }
@@ -166,13 +166,13 @@ public class ItemEnchantments implements TooltipProvider { @@ -164,13 +164,13 @@ public class ItemEnchantments implements TooltipProvider {
if (level <= 0) { if (level <= 0) {
this.enchantments.removeInt(enchantment); this.enchantments.removeInt(enchantment);
} else { } else {
@@ -59,10 +59,10 @@ index 8ac485d82c2d2b32f4d54e02c18c2cb2c3df4fa4..9ebe6a5f31ceacd33d9c111966ad941b
} }
diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
index 2acc947aa944cee92b7cccfb4aeac507c7dea9eb..dd6b60bcd5b1555437575283f6f89904bfa47741 100644 index f8179f8b7a57a66705d51f30ab528307e3a84b32..5b509058cda0e0b5f923f669b5dd3d9e67e3e148 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java --- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
@@ -399,6 +399,7 @@ public class PurpurConfig { @@ -398,6 +398,7 @@ public class PurpurConfig {
public static boolean allowHigherEnchantsLevels = false; public static boolean allowHigherEnchantsLevels = false;
public static boolean allowUnsafeEnchantCommand = false; public static boolean allowUnsafeEnchantCommand = false;
public static boolean replaceIncompatibleEnchants = false; public static boolean replaceIncompatibleEnchants = false;
@@ -70,7 +70,7 @@ index 2acc947aa944cee92b7cccfb4aeac507c7dea9eb..dd6b60bcd5b1555437575283f6f89904
private static void enchantmentSettings() { private static void enchantmentSettings() {
if (version < 30) { if (version < 30) {
boolean oldValue = getBoolean("settings.enchantment.allow-unsafe-enchants", false); boolean oldValue = getBoolean("settings.enchantment.allow-unsafe-enchants", false);
@@ -423,6 +424,7 @@ public class PurpurConfig { @@ -421,6 +422,7 @@ public class PurpurConfig {
allowHigherEnchantsLevels = getBoolean("settings.enchantment.anvil.allow-higher-enchants-levels", allowHigherEnchantsLevels); allowHigherEnchantsLevels = getBoolean("settings.enchantment.anvil.allow-higher-enchants-levels", allowHigherEnchantsLevels);
allowUnsafeEnchantCommand = getBoolean("settings.enchantment.allow-unsafe-enchant-command", allowUnsafeEnchantCommand); allowUnsafeEnchantCommand = getBoolean("settings.enchantment.allow-unsafe-enchant-command", allowUnsafeEnchantCommand);
replaceIncompatibleEnchants = getBoolean("settings.enchantment.anvil.replace-incompatible-enchants", replaceIncompatibleEnchants); replaceIncompatibleEnchants = getBoolean("settings.enchantment.anvil.replace-incompatible-enchants", replaceIncompatibleEnchants);

View File

@@ -6,10 +6,10 @@ Subject: [PATCH] Implement configurable search radius for villagers to spawn
diff --git a/src/main/java/net/minecraft/world/entity/npc/Villager.java b/src/main/java/net/minecraft/world/entity/npc/Villager.java 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 3d93d548b8c68cc0ee7c52dd0f92664c47077b6d..4af1857c4fbc18067b2fa0ae43501ce540630c6f 100644 index 052a131d7222ac490b5c40e65c1f801a4299b4e9..c885b214f4d7d91627e98d8779aab8515f205636 100644
--- a/src/main/java/net/minecraft/world/entity/npc/Villager.java --- a/src/main/java/net/minecraft/world/entity/npc/Villager.java
+++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java +++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java
@@ -1101,6 +1101,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler @@ -1065,6 +1065,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
} }
public void spawnGolemIfNeeded(ServerLevel world, long time, int requiredCount) { public void spawnGolemIfNeeded(ServerLevel world, long time, int requiredCount) {
@@ -18,10 +18,10 @@ index 3d93d548b8c68cc0ee7c52dd0f92664c47077b6d..4af1857c4fbc18067b2fa0ae43501ce5
AABB axisalignedbb = this.getBoundingBox().inflate(10.0D, 10.0D, 10.0D); AABB axisalignedbb = this.getBoundingBox().inflate(10.0D, 10.0D, 10.0D);
List<Villager> list = world.getEntitiesOfClass(Villager.class, axisalignedbb); List<Villager> list = world.getEntitiesOfClass(Villager.class, axisalignedbb);
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index 5db74ab53a80f4a24a0294983089e7226ab33388..5ce28dfe1d78dedd64482b2bb75ce070b55a8c73 100644 index d5b19afb053ff01962939d1584b2d00db3f9cea3..cc6b3d249cd63a4cf9f1888f21f251199cdccde4 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -2908,6 +2908,8 @@ public class PurpurWorldConfig { @@ -2904,6 +2904,8 @@ public class PurpurWorldConfig {
public int villagerLobotomizeCheckInterval = 100; public int villagerLobotomizeCheckInterval = 100;
public boolean villagerLobotomizeWaitUntilTradeLocked = false; public boolean villagerLobotomizeWaitUntilTradeLocked = false;
public boolean villagerDisplayTradeItem = true; public boolean villagerDisplayTradeItem = true;
@@ -30,7 +30,7 @@ index 5db74ab53a80f4a24a0294983089e7226ab33388..5ce28dfe1d78dedd64482b2bb75ce070
private void villagerSettings() { private void villagerSettings() {
villagerRidable = getBoolean("mobs.villager.ridable", villagerRidable); villagerRidable = getBoolean("mobs.villager.ridable", villagerRidable);
villagerRidableInWater = getBoolean("mobs.villager.ridable-in-water", villagerRidableInWater); villagerRidableInWater = getBoolean("mobs.villager.ridable-in-water", villagerRidableInWater);
@@ -2943,6 +2945,8 @@ public class PurpurWorldConfig { @@ -2939,6 +2941,8 @@ public class PurpurWorldConfig {
villagerLobotomizeCheckInterval = getInt("mobs.villager.lobotomize.check-interval", villagerLobotomizeCheckInterval); villagerLobotomizeCheckInterval = getInt("mobs.villager.lobotomize.check-interval", villagerLobotomizeCheckInterval);
villagerLobotomizeWaitUntilTradeLocked = getBoolean("mobs.villager.lobotomize.wait-until-trade-locked", villagerLobotomizeWaitUntilTradeLocked); villagerLobotomizeWaitUntilTradeLocked = getBoolean("mobs.villager.lobotomize.wait-until-trade-locked", villagerLobotomizeWaitUntilTradeLocked);
villagerDisplayTradeItem = getBoolean("mobs.villager.display-trade-item", villagerDisplayTradeItem); villagerDisplayTradeItem = getBoolean("mobs.villager.display-trade-item", villagerDisplayTradeItem);

View File

@@ -54,17 +54,17 @@ index aa65f4bf60172a2629daf6e15f7f48d29b250ee0..d95d122601dd47a27e8d82a13b071919
} }
// CraftBukkit end // CraftBukkit end
diff --git a/src/main/java/net/minecraft/world/damagesource/DamageSources.java b/src/main/java/net/minecraft/world/damagesource/DamageSources.java diff --git a/src/main/java/net/minecraft/world/damagesource/DamageSources.java b/src/main/java/net/minecraft/world/damagesource/DamageSources.java
index da790aac3bd8981f351b7e241015ff42bd0da73b..d143bba490bfb677361ab82c44f0f31a4a2a43d6 100644 index 61e906fb47b242e86789dca1a210473c76863166..d343fd5c9f31073f1b3a0f91b8ea61a67077cc12 100644
--- a/src/main/java/net/minecraft/world/damagesource/DamageSources.java --- a/src/main/java/net/minecraft/world/damagesource/DamageSources.java
+++ b/src/main/java/net/minecraft/world/damagesource/DamageSources.java +++ b/src/main/java/net/minecraft/world/damagesource/DamageSources.java
@@ -46,12 +46,14 @@ public class DamageSources { @@ -47,12 +47,14 @@ public class DamageSources {
private final DamageSource melting; private final DamageSource melting;
private final DamageSource poison; private final DamageSource poison;
private final DamageSource scissors; // Purpur private final DamageSource scissors; // Purpur
+ private final DamageSource stonecutter; // Purpur + private final DamageSource stonecutter; // Purpur
public DamageSources(RegistryAccess registryManager) { public DamageSources(RegistryAccess registryManager) {
this.damageTypes = registryManager.registryOrThrow(Registries.DAMAGE_TYPE); this.damageTypes = registryManager.lookupOrThrow(Registries.DAMAGE_TYPE);
this.melting = this.source(DamageTypes.ON_FIRE).melting(); this.melting = this.source(DamageTypes.ON_FIRE).melting();
this.poison = this.source(DamageTypes.MAGIC).poison(); this.poison = this.source(DamageTypes.MAGIC).poison();
this.scissors = this.source(DamageTypes.MAGIC).scissors(); // Purpur this.scissors = this.source(DamageTypes.MAGIC).scissors(); // Purpur
@@ -72,7 +72,7 @@ index da790aac3bd8981f351b7e241015ff42bd0da73b..d143bba490bfb677361ab82c44f0f31a
// CraftBukkit end // CraftBukkit end
this.inFire = this.source(DamageTypes.IN_FIRE); this.inFire = this.source(DamageTypes.IN_FIRE);
this.campfire = this.source(DamageTypes.CAMPFIRE); this.campfire = this.source(DamageTypes.CAMPFIRE);
@@ -105,6 +107,9 @@ public class DamageSources { @@ -107,6 +109,9 @@ public class DamageSources {
public DamageSource scissors() { public DamageSource scissors() {
return this.scissors; return this.scissors;
} }
@@ -83,10 +83,10 @@ index da790aac3bd8981f351b7e241015ff42bd0da73b..d143bba490bfb677361ab82c44f0f31a
public DamageSource inFire() { public DamageSource inFire() {
diff --git a/src/main/java/net/minecraft/world/level/block/StonecutterBlock.java b/src/main/java/net/minecraft/world/level/block/StonecutterBlock.java diff --git a/src/main/java/net/minecraft/world/level/block/StonecutterBlock.java b/src/main/java/net/minecraft/world/level/block/StonecutterBlock.java
index 59fd521cd1e1101e2adce9830c43784e05abccdd..ff04b4ed1f4e2e6ca2286243d4faaa9b8edcc7cc 100644 index e61644241f24b42bb4f702d3eef5b590b4d107c8..0bf6503819b02e5ba2c346d9d563a93f2946d89b 100644
--- a/src/main/java/net/minecraft/world/level/block/StonecutterBlock.java --- a/src/main/java/net/minecraft/world/level/block/StonecutterBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/StonecutterBlock.java +++ b/src/main/java/net/minecraft/world/level/block/StonecutterBlock.java
@@ -97,4 +97,14 @@ public class StonecutterBlock extends Block { @@ -98,4 +98,14 @@ public class StonecutterBlock extends Block {
protected boolean isPathfindable(BlockState state, PathComputationType type) { protected boolean isPathfindable(BlockState state, PathComputationType type) {
return false; return false;
} }
@@ -102,7 +102,7 @@ index 59fd521cd1e1101e2adce9830c43784e05abccdd..ff04b4ed1f4e2e6ca2286243d4faaa9b
+ // Purpur end + // Purpur end
} }
diff --git a/src/main/java/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java b/src/main/java/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java diff --git a/src/main/java/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java b/src/main/java/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java
index 31ae0f466ae522d767907ec5066b26695f327b96..f26383cf896785333dbd6f86348d5a5f67a6731f 100644 index f6291ff377b38cb84692a9fd564b4b1a9780cf4f..224896124706764412033c8726c822e116f2c0f1 100644
--- a/src/main/java/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java --- a/src/main/java/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java
+++ b/src/main/java/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java +++ b/src/main/java/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java
@@ -491,7 +491,7 @@ public class WalkNodeEvaluator extends NodeEvaluator { @@ -491,7 +491,7 @@ public class WalkNodeEvaluator extends NodeEvaluator {
@@ -115,10 +115,10 @@ index 31ae0f466ae522d767907ec5066b26695f327b96..f26383cf896785333dbd6f86348d5a5f
} else if (blockState.is(Blocks.HONEY_BLOCK)) { } else if (blockState.is(Blocks.HONEY_BLOCK)) {
return PathType.STICKY_HONEY; return PathType.STICKY_HONEY;
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index df37da354b5ffffc484a8660949c8969a5b3acc1..858c6c860d9b8aaa1d3f9f77a9e410726239d7cc 100644 index c9f5047bfa48c12a9090cb8da4bb9045e38e8f89..483b2fa71df29e064e35694a6017286bf30f1568 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -1142,7 +1142,7 @@ public class CraftEventFactory { @@ -1140,7 +1140,7 @@ public class CraftEventFactory {
return CraftEventFactory.callEntityDamageEvent(source.getDirectBlock(), source.getDirectBlockState(), entity, DamageCause.LAVA, bukkitDamageSource, modifiers, modifierFunctions, cancelled); return CraftEventFactory.callEntityDamageEvent(source.getDirectBlock(), source.getDirectBlockState(), entity, DamageCause.LAVA, bukkitDamageSource, modifiers, modifierFunctions, cancelled);
} else if (source.getDirectBlock() != null) { } else if (source.getDirectBlock() != null) {
DamageCause cause; DamageCause cause;
@@ -128,7 +128,7 @@ index df37da354b5ffffc484a8660949c8969a5b3acc1..858c6c860d9b8aaa1d3f9f77a9e41072
} else if (source.is(DamageTypes.HOT_FLOOR)) { } else if (source.is(DamageTypes.HOT_FLOOR)) {
cause = DamageCause.HOT_FLOOR; cause = DamageCause.HOT_FLOOR;
diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
index 94da1ade7a7ee4df42532feb4443513d0d15026a..ba0a6ceb8a62536a5b58452c82b66383acbc9b0e 100644 index 5b509058cda0e0b5f923f669b5dd3d9e67e3e148..5475a8c622c4090e994f87f6a28febdccecbf973 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java --- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
@@ -211,8 +211,10 @@ public class PurpurConfig { @@ -211,8 +211,10 @@ public class PurpurConfig {
@@ -143,10 +143,10 @@ index 94da1ade7a7ee4df42532feb4443513d0d15026a..ba0a6ceb8a62536a5b58452c82b66383
public static boolean advancementOnlyBroadcastToAffectedPlayer = false; public static boolean advancementOnlyBroadcastToAffectedPlayer = false;
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index 5ce28dfe1d78dedd64482b2bb75ce070b55a8c73..645ded84255eaad6ae9c90e66fb349828d4ad9c1 100644 index cc6b3d249cd63a4cf9f1888f21f251199cdccde4..c1b269ebd90be16888f7fcace9efc0e0c08a4448 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -1044,6 +1044,11 @@ public class PurpurWorldConfig { @@ -1042,6 +1042,11 @@ public class PurpurWorldConfig {
spongeAbsorbsWaterFromMud = getBoolean("blocks.sponge.absorbs-water-from-mud", spongeAbsorbsWaterFromMud); spongeAbsorbsWaterFromMud = getBoolean("blocks.sponge.absorbs-water-from-mud", spongeAbsorbsWaterFromMud);
} }

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Configurable damage settings for magma blocks
diff --git a/src/main/java/net/minecraft/world/level/block/MagmaBlock.java b/src/main/java/net/minecraft/world/level/block/MagmaBlock.java diff --git a/src/main/java/net/minecraft/world/level/block/MagmaBlock.java b/src/main/java/net/minecraft/world/level/block/MagmaBlock.java
index 02d59789c09f58045fea302ea6f2ee3856114de3..8072713da7ed8b7a44b63c241050c3a9c16d7b27 100644 index 7ffdcf18bf4bd8b5325c76945b2d80ca3fe52958..dfa931316fde0b2e80068a0edd1427ffd096b15b 100644
--- a/src/main/java/net/minecraft/world/level/block/MagmaBlock.java --- a/src/main/java/net/minecraft/world/level/block/MagmaBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/MagmaBlock.java +++ b/src/main/java/net/minecraft/world/level/block/MagmaBlock.java
@@ -28,7 +28,7 @@ public class MagmaBlock extends Block { @@ -29,7 +29,7 @@ public class MagmaBlock extends Block {
@Override @Override
public void stepOn(Level world, BlockPos pos, BlockState state, Entity entity) { public void stepOn(Level world, BlockPos pos, BlockState state, Entity entity) {
@@ -18,10 +18,10 @@ index 02d59789c09f58045fea302ea6f2ee3856114de3..8072713da7ed8b7a44b63c241050c3a9
} }
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index 645ded84255eaad6ae9c90e66fb349828d4ad9c1..686b039a2027463f6c1df49f71a5473d9e355089 100644 index c1b269ebd90be16888f7fcace9efc0e0c08a4448..f370e1e5132e5800114f8bd8700444d7892590ac 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -985,6 +985,11 @@ public class PurpurWorldConfig { @@ -983,6 +983,11 @@ public class PurpurWorldConfig {
pistonBlockPushLimit = getInt("blocks.piston.block-push-limit", pistonBlockPushLimit); pistonBlockPushLimit = getInt("blocks.piston.block-push-limit", pistonBlockPushLimit);
} }

View File

@@ -5,7 +5,7 @@ Subject: [PATCH] Add config for snow on blue ice
diff --git a/src/main/java/net/minecraft/world/level/block/SnowLayerBlock.java b/src/main/java/net/minecraft/world/level/block/SnowLayerBlock.java diff --git a/src/main/java/net/minecraft/world/level/block/SnowLayerBlock.java b/src/main/java/net/minecraft/world/level/block/SnowLayerBlock.java
index 93e8e5107ac047c1f2579b4fe6b0a202edb695f6..f82d275aac7bf3949d3dcc412c7e39e115c69458 100644 index 9908a0b5b1fec5f9de518a733f7abbbff7e1a9f9..0ad444cf7f798f63e9140a42c5d5d8cab0fcf14f 100644
--- a/src/main/java/net/minecraft/world/level/block/SnowLayerBlock.java --- a/src/main/java/net/minecraft/world/level/block/SnowLayerBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/SnowLayerBlock.java +++ b/src/main/java/net/minecraft/world/level/block/SnowLayerBlock.java
@@ -88,6 +88,12 @@ public class SnowLayerBlock extends Block { @@ -88,6 +88,12 @@ public class SnowLayerBlock extends Block {
@@ -22,10 +22,10 @@ index 93e8e5107ac047c1f2579b4fe6b0a202edb695f6..f82d275aac7bf3949d3dcc412c7e39e1
} }
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index 686b039a2027463f6c1df49f71a5473d9e355089..1252c9b4a9d3d071ba794482ea8db2a25f543f72 100644 index f370e1e5132e5800114f8bd8700444d7892590ac..ac183cb85490adc2312f5ec674a515826e540ae4 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -966,9 +966,11 @@ public class PurpurWorldConfig { @@ -964,9 +964,11 @@ public class PurpurWorldConfig {
public boolean mobsSpawnOnPackedIce = true; public boolean mobsSpawnOnPackedIce = true;
public boolean mobsSpawnOnBlueIce = true; public boolean mobsSpawnOnBlueIce = true;

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Skeletons eat wither roses
diff --git a/src/main/java/net/minecraft/world/entity/monster/Skeleton.java b/src/main/java/net/minecraft/world/entity/monster/Skeleton.java diff --git a/src/main/java/net/minecraft/world/entity/monster/Skeleton.java b/src/main/java/net/minecraft/world/entity/monster/Skeleton.java
index 3f81faffc1a54ab1148c410ef80964d9876e4b77..cb714f78ad73f709967d7449c411c5b1385a9440 100644 index 61b5f27c1125ed1b183dd3b86b44a10b7098f91c..b1158967400815b90687dddcc482846c70e03658 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Skeleton.java --- a/src/main/java/net/minecraft/world/entity/monster/Skeleton.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Skeleton.java +++ b/src/main/java/net/minecraft/world/entity/monster/Skeleton.java
@@ -15,6 +15,16 @@ import net.minecraft.world.item.Items; @@ -17,6 +17,16 @@ import net.minecraft.world.item.Items;
import net.minecraft.world.level.ItemLike; import net.minecraft.world.level.ItemLike;
import net.minecraft.world.level.Level; import net.minecraft.world.level.Level;
@@ -25,7 +25,7 @@ index 3f81faffc1a54ab1148c410ef80964d9876e4b77..cb714f78ad73f709967d7449c411c5b1
public class Skeleton extends AbstractSkeleton { public class Skeleton extends AbstractSkeleton {
private static final int TOTAL_CONVERSION_TIME = 300; private static final int TOTAL_CONVERSION_TIME = 300;
@@ -175,4 +185,63 @@ public class Skeleton extends AbstractSkeleton { @@ -181,4 +191,63 @@ public class Skeleton extends AbstractSkeleton {
} }
} }
@@ -90,10 +90,10 @@ index 3f81faffc1a54ab1148c410ef80964d9876e4b77..cb714f78ad73f709967d7449c411c5b1
+ // Purpur end + // Purpur end
} }
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index 1252c9b4a9d3d071ba794482ea8db2a25f543f72..9847dc72f5b768a591471fc6e29629a7d93a8899 100644 index ac183cb85490adc2312f5ec674a515826e540ae4..a7f750506e03cae0e965dfd874e92d3157576fb0 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -2569,6 +2569,7 @@ public class PurpurWorldConfig { @@ -2565,6 +2565,7 @@ public class PurpurWorldConfig {
public boolean skeletonTakeDamageFromWater = false; public boolean skeletonTakeDamageFromWater = false;
public boolean skeletonAlwaysDropExp = false; public boolean skeletonAlwaysDropExp = false;
public double skeletonHeadVisibilityPercent = 0.5D; public double skeletonHeadVisibilityPercent = 0.5D;
@@ -101,7 +101,7 @@ index 1252c9b4a9d3d071ba794482ea8db2a25f543f72..9847dc72f5b768a591471fc6e29629a7
private void skeletonSettings() { private void skeletonSettings() {
skeletonRidable = getBoolean("mobs.skeleton.ridable", skeletonRidable); skeletonRidable = getBoolean("mobs.skeleton.ridable", skeletonRidable);
skeletonRidableInWater = getBoolean("mobs.skeleton.ridable-in-water", skeletonRidableInWater); skeletonRidableInWater = getBoolean("mobs.skeleton.ridable-in-water", skeletonRidableInWater);
@@ -2583,6 +2584,7 @@ public class PurpurWorldConfig { @@ -2579,6 +2580,7 @@ public class PurpurWorldConfig {
skeletonTakeDamageFromWater = getBoolean("mobs.skeleton.takes-damage-from-water", skeletonTakeDamageFromWater); skeletonTakeDamageFromWater = getBoolean("mobs.skeleton.takes-damage-from-water", skeletonTakeDamageFromWater);
skeletonAlwaysDropExp = getBoolean("mobs.skeleton.always-drop-exp", skeletonAlwaysDropExp); skeletonAlwaysDropExp = getBoolean("mobs.skeleton.always-drop-exp", skeletonAlwaysDropExp);
skeletonHeadVisibilityPercent = getDouble("mobs.skeleton.head-visibility-percent", skeletonHeadVisibilityPercent); skeletonHeadVisibilityPercent = getDouble("mobs.skeleton.head-visibility-percent", skeletonHeadVisibilityPercent);

View File

@@ -5,7 +5,7 @@ Subject: [PATCH] Enchantment Table Persists Lapis
diff --git a/src/main/java/net/minecraft/world/inventory/EnchantmentMenu.java b/src/main/java/net/minecraft/world/inventory/EnchantmentMenu.java diff --git a/src/main/java/net/minecraft/world/inventory/EnchantmentMenu.java b/src/main/java/net/minecraft/world/inventory/EnchantmentMenu.java
index 9bc9b4218ffd966f43097c9e009b2926af58c810..e59a38d051179753fa9b29e8d746e25e162cac3e 100644 index 50a735dd97daab4fb9579f922a4c63de60204f29..5b8ad051347f73553acb65c5ddc690d2b7eaa754 100644
--- a/src/main/java/net/minecraft/world/inventory/EnchantmentMenu.java --- a/src/main/java/net/minecraft/world/inventory/EnchantmentMenu.java
+++ b/src/main/java/net/minecraft/world/inventory/EnchantmentMenu.java +++ b/src/main/java/net/minecraft/world/inventory/EnchantmentMenu.java
@@ -42,6 +42,12 @@ import org.bukkit.event.enchantment.PrepareItemEnchantEvent; @@ -42,6 +42,12 @@ import org.bukkit.event.enchantment.PrepareItemEnchantEvent;
@@ -44,10 +44,10 @@ index 9bc9b4218ffd966f43097c9e009b2926af58c810..e59a38d051179753fa9b29e8d746e25e
}; };
this.random = RandomSource.create(); this.random = RandomSource.create();
this.enchantmentSeed = DataSlot.standalone(); this.enchantmentSeed = DataSlot.standalone();
@@ -101,6 +123,17 @@ public class EnchantmentMenu extends AbstractContainerMenu { @@ -100,6 +122,16 @@ public class EnchantmentMenu extends AbstractContainerMenu {
return Pair.of(InventoryMenu.BLOCK_ATLAS, EnchantmentMenu.EMPTY_SLOT_LAPIS_LAZULI);
} }
}); });
+ // Purpur start + // Purpur start
+ access.execute((level, pos) -> { + access.execute((level, pos) -> {
+ if (level.purpurConfig.enchantmentTableLapisPersists) { + if (level.purpurConfig.enchantmentTableLapisPersists) {
@@ -58,11 +58,10 @@ index 9bc9b4218ffd966f43097c9e009b2926af58c810..e59a38d051179753fa9b29e8d746e25e
+ } + }
+ }); + });
+ // Purpur end + // Purpur end
+ this.addStandardInventorySlots(playerInventory, 8, 84);
int j; this.addDataSlot(DataSlot.shared(this.costs, 0));
this.addDataSlot(DataSlot.shared(this.costs, 1));
for (j = 0; j < 3; ++j) { @@ -329,6 +361,7 @@ public class EnchantmentMenu extends AbstractContainerMenu {
@@ -341,6 +374,7 @@ public class EnchantmentMenu extends AbstractContainerMenu {
public void removed(net.minecraft.world.entity.player.Player player) { public void removed(net.minecraft.world.entity.player.Player player) {
super.removed(player); super.removed(player);
this.access.execute((world, blockposition) -> { this.access.execute((world, blockposition) -> {
@@ -71,10 +70,10 @@ index 9bc9b4218ffd966f43097c9e009b2926af58c810..e59a38d051179753fa9b29e8d746e25e
}); });
} }
diff --git a/src/main/java/net/minecraft/world/level/block/EnchantingTableBlock.java b/src/main/java/net/minecraft/world/level/block/EnchantingTableBlock.java diff --git a/src/main/java/net/minecraft/world/level/block/EnchantingTableBlock.java b/src/main/java/net/minecraft/world/level/block/EnchantingTableBlock.java
index 151e856dda3aa262c846ce8793650ee582bfb749..be0ed8a14e5726d5fcea1864302b18fb75fde2b4 100644 index a7fb500d950687743d1fc0b3ad3e6d10dcc6e31a..ce6a9e15ae0114623e79b5d8c244c2c490a3f74e 100644
--- a/src/main/java/net/minecraft/world/level/block/EnchantingTableBlock.java --- a/src/main/java/net/minecraft/world/level/block/EnchantingTableBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/EnchantingTableBlock.java +++ b/src/main/java/net/minecraft/world/level/block/EnchantingTableBlock.java
@@ -124,4 +124,18 @@ public class EnchantingTableBlock extends BaseEntityBlock { @@ -123,4 +123,18 @@ public class EnchantingTableBlock extends BaseEntityBlock {
protected boolean isPathfindable(BlockState state, PathComputationType type) { protected boolean isPathfindable(BlockState state, PathComputationType type) {
return false; return false;
} }
@@ -94,7 +93,7 @@ index 151e856dda3aa262c846ce8793650ee582bfb749..be0ed8a14e5726d5fcea1864302b18fb
+ // Purpur end + // Purpur end
} }
diff --git a/src/main/java/net/minecraft/world/level/block/entity/EnchantingTableBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/EnchantingTableBlockEntity.java diff --git a/src/main/java/net/minecraft/world/level/block/entity/EnchantingTableBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/EnchantingTableBlockEntity.java
index d47bc2f54c4722a0b8c419b99ee57eb3cb25d750..fdeabdcc781b605d6f3ee18528fd380ffff95660 100644 index 39aac959775afeaeea211f21d498cb0ddf0a3fcb..6349a342c023f378af431a73a62fb017882e257d 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/EnchantingTableBlockEntity.java --- a/src/main/java/net/minecraft/world/level/block/entity/EnchantingTableBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/EnchantingTableBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/EnchantingTableBlockEntity.java
@@ -28,6 +28,7 @@ public class EnchantingTableBlockEntity extends BlockEntity implements Nameable @@ -28,6 +28,7 @@ public class EnchantingTableBlockEntity extends BlockEntity implements Nameable
@@ -107,7 +106,7 @@ index d47bc2f54c4722a0b8c419b99ee57eb3cb25d750..fdeabdcc781b605d6f3ee18528fd380f
super(BlockEntityType.ENCHANTING_TABLE, pos, state); super(BlockEntityType.ENCHANTING_TABLE, pos, state);
@@ -39,6 +40,7 @@ public class EnchantingTableBlockEntity extends BlockEntity implements Nameable @@ -39,6 +40,7 @@ public class EnchantingTableBlockEntity extends BlockEntity implements Nameable
if (this.hasCustomName()) { if (this.hasCustomName()) {
nbt.putString("CustomName", Component.Serializer.toJson(this.name, registryLookup)); nbt.putString("CustomName", Component.Serializer.toJson(this.name, registries));
} }
+ nbt.putInt("Purpur.Lapis", this.lapis); // Purpur + nbt.putInt("Purpur.Lapis", this.lapis); // Purpur
} }
@@ -115,7 +114,7 @@ index d47bc2f54c4722a0b8c419b99ee57eb3cb25d750..fdeabdcc781b605d6f3ee18528fd380f
@Override @Override
@@ -47,6 +49,7 @@ public class EnchantingTableBlockEntity extends BlockEntity implements Nameable @@ -47,6 +49,7 @@ public class EnchantingTableBlockEntity extends BlockEntity implements Nameable
if (nbt.contains("CustomName", 8)) { if (nbt.contains("CustomName", 8)) {
this.name = parseCustomNameSafe(nbt.getString("CustomName"), registryLookup); this.name = parseCustomNameSafe(nbt.getString("CustomName"), registries);
} }
+ this.lapis = nbt.getInt("Purpur.Lapis"); // Purpur + this.lapis = nbt.getInt("Purpur.Lapis"); // Purpur
} }
@@ -137,10 +136,10 @@ index d47bc2f54c4722a0b8c419b99ee57eb3cb25d750..fdeabdcc781b605d6f3ee18528fd380f
+ // Purpur + // Purpur
} }
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index 9847dc72f5b768a591471fc6e29629a7d93a8899..da81089e2eb52051b7ee38e08f9119423bb925ab 100644 index a7f750506e03cae0e965dfd874e92d3157576fb0..b28282fc3a2715d77187fab816dce9b38adbe6c1 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -1543,6 +1543,11 @@ public class PurpurWorldConfig { @@ -1541,6 +1541,11 @@ public class PurpurWorldConfig {
elderGuardianAlwaysDropExp = getBoolean("mobs.elder_guardian.always-drop-exp", elderGuardianAlwaysDropExp); elderGuardianAlwaysDropExp = getBoolean("mobs.elder_guardian.always-drop-exp", elderGuardianAlwaysDropExp);
} }

View File

@@ -18,10 +18,10 @@ index 300929a406905f5ff1ede664d5b99fb0938d4d2e..a4e9ac0e07f08e0b6aa682e8c1587d9c
throw new SignedMessageChain.DecodeException(SignedMessageChain.DecodeException.OUT_OF_ORDER_CHAT, org.bukkit.event.player.PlayerKickEvent.Cause.OUT_OF_ORDER_CHAT); // Paper - kick event causes throw new SignedMessageChain.DecodeException(SignedMessageChain.DecodeException.OUT_OF_ORDER_CHAT, org.bukkit.event.player.PlayerKickEvent.Cause.OUT_OF_ORDER_CHAT); // Paper - kick event causes
} else { } else {
diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
index ba0a6ceb8a62536a5b58452c82b66383acbc9b0e..585fa894e7c4b72b93de6a5abb60471b1689f9b6 100644 index 5475a8c622c4090e994f87f6a28febdccecbf973..afb165af34f365210fdfa6542cf7a81435096738 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java --- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
@@ -463,9 +463,11 @@ public class PurpurConfig { @@ -461,9 +461,11 @@ public class PurpurConfig {
public static boolean useUPnP = false; public static boolean useUPnP = false;
public static boolean maxJoinsPerSecond = false; public static boolean maxJoinsPerSecond = false;

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Config for sculk shrieker can_summon state
diff --git a/src/main/java/net/minecraft/world/level/block/SculkShriekerBlock.java b/src/main/java/net/minecraft/world/level/block/SculkShriekerBlock.java diff --git a/src/main/java/net/minecraft/world/level/block/SculkShriekerBlock.java b/src/main/java/net/minecraft/world/level/block/SculkShriekerBlock.java
index b6b367492ebe2af3e63381bef935c6077f6ddb27..09f34c30d9a03751ed826b26375ac5aee778cce4 100644 index 0e05bfef55dcacb50766bba8328ffeb8a5394c31..e00fcea07e74de647c26ff9eb32bc682738c15b7 100644
--- a/src/main/java/net/minecraft/world/level/block/SculkShriekerBlock.java --- a/src/main/java/net/minecraft/world/level/block/SculkShriekerBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/SculkShriekerBlock.java +++ b/src/main/java/net/minecraft/world/level/block/SculkShriekerBlock.java
@@ -134,7 +134,7 @@ public class SculkShriekerBlock extends BaseEntityBlock implements SimpleWaterlo @@ -135,7 +135,7 @@ public class SculkShriekerBlock extends BaseEntityBlock implements SimpleWaterlo
@Nullable @Nullable
@Override @Override
public BlockState getStateForPlacement(BlockPlaceContext ctx) { public BlockState getStateForPlacement(BlockPlaceContext ctx) {
@@ -18,10 +18,10 @@ index b6b367492ebe2af3e63381bef935c6077f6ddb27..09f34c30d9a03751ed826b26375ac5ae
@Override @Override
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index da81089e2eb52051b7ee38e08f9119423bb925ab..b7b0a9ec673d5e20c9cb0e9c93153e793bfa9d5d 100644 index b28282fc3a2715d77187fab816dce9b38adbe6c1..b6b0ebe3c96c4c8f4ce9ed454ec64a7f64e6b950 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -1023,6 +1023,11 @@ public class PurpurWorldConfig { @@ -1021,6 +1021,11 @@ public class PurpurWorldConfig {
} }
} }

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Config to not let coral die
diff --git a/src/main/java/net/minecraft/world/level/block/BaseCoralPlantTypeBlock.java b/src/main/java/net/minecraft/world/level/block/BaseCoralPlantTypeBlock.java diff --git a/src/main/java/net/minecraft/world/level/block/BaseCoralPlantTypeBlock.java b/src/main/java/net/minecraft/world/level/block/BaseCoralPlantTypeBlock.java
index ce9f189bdafec26360bfadd0f36a8bc2726e132b..d5465b48531fd4b4094874c135274abf985ee71a 100644 index d7ca7a43d2d5f8cad416156fd40588cdd6634f52..231338adda19f57bf1a95379cc2e14341d4068d0 100644
--- a/src/main/java/net/minecraft/world/level/block/BaseCoralPlantTypeBlock.java --- a/src/main/java/net/minecraft/world/level/block/BaseCoralPlantTypeBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/BaseCoralPlantTypeBlock.java +++ b/src/main/java/net/minecraft/world/level/block/BaseCoralPlantTypeBlock.java
@@ -38,6 +38,7 @@ public abstract class BaseCoralPlantTypeBlock extends Block implements SimpleWat @@ -39,6 +39,7 @@ public abstract class BaseCoralPlantTypeBlock extends Block implements SimpleWat
} }
protected static boolean scanForWater(BlockState state, BlockGetter world, BlockPos pos) { protected static boolean scanForWater(BlockState state, BlockGetter world, BlockPos pos) {
@@ -17,10 +17,10 @@ index ce9f189bdafec26360bfadd0f36a8bc2726e132b..d5465b48531fd4b4094874c135274abf
return true; return true;
} else { } else {
diff --git a/src/main/java/net/minecraft/world/level/block/CoralBlock.java b/src/main/java/net/minecraft/world/level/block/CoralBlock.java diff --git a/src/main/java/net/minecraft/world/level/block/CoralBlock.java b/src/main/java/net/minecraft/world/level/block/CoralBlock.java
index 81fe0dea8e6e23c4a78f07fc2f9c0d68cd683f11..bff97b7d3909f2ec9e58a341b901b3741927543f 100644 index a59b23f4062fa896836dec72cbd5097411774ad1..c526ea13a726624adaa654f09ff84c899c13ab98 100644
--- a/src/main/java/net/minecraft/world/level/block/CoralBlock.java --- a/src/main/java/net/minecraft/world/level/block/CoralBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/CoralBlock.java +++ b/src/main/java/net/minecraft/world/level/block/CoralBlock.java
@@ -59,6 +59,7 @@ public class CoralBlock extends Block { @@ -60,6 +60,7 @@ public class CoralBlock extends Block {
} }
protected boolean scanForWater(BlockGetter world, BlockPos pos) { protected boolean scanForWater(BlockGetter world, BlockPos pos) {
@@ -29,10 +29,10 @@ index 81fe0dea8e6e23c4a78f07fc2f9c0d68cd683f11..bff97b7d3909f2ec9e58a341b901b374
int i = aenumdirection.length; int i = aenumdirection.length;
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index b7b0a9ec673d5e20c9cb0e9c93153e793bfa9d5d..e90f8c2ca467d9567366ae5c04175e3b5bc7cfc4 100644 index b6b0ebe3c96c4c8f4ce9ed454ec64a7f64e6b950..3853e9e894c19da5a0e74c30a5e248c3e8790160 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -872,6 +872,11 @@ public class PurpurWorldConfig { @@ -870,6 +870,11 @@ public class PurpurWorldConfig {
composterBulkProcess = getBoolean("blocks.composter.sneak-to-bulk-process", composterBulkProcess); composterBulkProcess = getBoolean("blocks.composter.sneak-to-bulk-process", composterBulkProcess);
} }

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Add local difficulty api
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 33e4818ba5a90d78d69baad9f6b1be1b1382e9f3..02dca1188af7b235610d4f432cae47bcd624d5b8 100644 index d41c81158c00931e6b11093cce141f6a3085ba05..3be5c25f8ce15e2f035c92e5fe90693e0236967d 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -2386,6 +2386,12 @@ public class CraftWorld extends CraftRegionAccessor implements World { @@ -2399,6 +2399,12 @@ public class CraftWorld extends CraftRegionAccessor implements World {
return (this.getHandle().getDragonFight() == null) ? null : new CraftDragonBattle(this.getHandle().getDragonFight()); return (this.getHandle().getDragonFight() == null) ? null : new CraftDragonBattle(this.getHandle().getDragonFight());
} }