mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 08:27:43 +01:00
Updated Upstream (Paper & Pufferfish)
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@af94364 Fix slime spawners not spawning outside slime chunks (#7741) PaperMC/Paper@6b9f7a0 Don't fire worldborder events for virtual borders (#7749) PaperMC/Paper@8bfb1d2 Pass ServerLevel for gamerule callbacks (#7668) PaperMC/Paper@c66b0f9 Add pre-unbreaking amount to PlayerItemDamageEvent (#7724) PaperMC/Paper@86fb3d2 Don't send itemmeta for books with the hide option enabled (#7734) PaperMC/Paper@c642d25 Improve update folder behavior (#7687) Pufferfish Changes: pufferfish-gg/Pufferfish@1bedb87 Updated Upstream (Paper) pufferfish-gg/Pufferfish@952b720 Add additional SIMD debug info/fix messages pufferfish-gg/Pufferfish@54099cf Put Java 18 in SIMD error messages
This commit is contained in:
@@ -214,10 +214,10 @@ index 0000000000000000000000000000000000000000..10310fdd53de28efb8a8250f6d3b0c8e
|
||||
+}
|
||||
diff --git a/src/main/java/gg/pufferfish/pufferfish/simd/SIMDChecker.java b/src/main/java/gg/pufferfish/pufferfish/simd/SIMDChecker.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..3e36d19582172232f617ffc7045dd2012665b99a
|
||||
index 0000000000000000000000000000000000000000..66244a98901fff4479c50ce955502e2975f804c6
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/gg/pufferfish/pufferfish/simd/SIMDChecker.java
|
||||
@@ -0,0 +1,29 @@
|
||||
@@ -0,0 +1,30 @@
|
||||
+package gg.pufferfish.pufferfish.simd;
|
||||
+
|
||||
+import jdk.incubator.vector.IntVector;
|
||||
@@ -234,6 +234,7 @@ index 0000000000000000000000000000000000000000..3e36d19582172232f617ffc7045dd201
|
||||
+ if (SIMDDetection.getJavaVersion() != 17 && SIMDDetection.getJavaVersion() != 18) {
|
||||
+ return false;
|
||||
+ } else {
|
||||
+ SIMDDetection.testRun = true;
|
||||
+ IntVector oneVector = IntVector.broadcast(IntVector.SPECIES_256, 1);
|
||||
+ IntVector twoVector = IntVector.broadcast(IntVector.SPECIES_256, 2);
|
||||
+ IntVector result = oneVector.add(twoVector);
|
||||
@@ -249,10 +250,10 @@ index 0000000000000000000000000000000000000000..3e36d19582172232f617ffc7045dd201
|
||||
+}
|
||||
diff --git a/src/main/java/gg/pufferfish/pufferfish/simd/SIMDDetection.java b/src/main/java/gg/pufferfish/pufferfish/simd/SIMDDetection.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..c6a7f59b246ab9a8f3c7ac895287ed71a28a6aaa
|
||||
index 0000000000000000000000000000000000000000..d5ee3dfde2fed1f1bec49df22ba37ce725de4c2c
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/gg/pufferfish/pufferfish/simd/SIMDDetection.java
|
||||
@@ -0,0 +1,32 @@
|
||||
@@ -0,0 +1,33 @@
|
||||
+package gg.pufferfish.pufferfish.simd;
|
||||
+
|
||||
+@Deprecated
|
||||
@@ -260,6 +261,7 @@ index 0000000000000000000000000000000000000000..c6a7f59b246ab9a8f3c7ac895287ed71
|
||||
+
|
||||
+ public static boolean isEnabled = false;
|
||||
+ public static boolean versionLimited = false;
|
||||
+ public static boolean testRun = false;
|
||||
+
|
||||
+ @Deprecated
|
||||
+ public static boolean canEnable() {
|
||||
@@ -407,10 +409,10 @@ index b937441d2fb46b108644c49fcf073859765aa02e..d95b01bfd0657cf089c0f5412453cca0
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
||||
index 42da20011544075a9bea63a12ae86f2f21720667..16d0e517afd3fae21f2666c6b4e1e38dcf5ea64b 100644
|
||||
index bea2e464861771383f8fcf143fa817340cb8ab1d..cbda2ba8cb80d4f24cf4b4cd74c1fea6669273df 100644
|
||||
--- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
||||
+++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
||||
@@ -582,7 +582,9 @@ public final class SimplePluginManager implements PluginManager {
|
||||
@@ -616,7 +616,9 @@ public final class SimplePluginManager implements PluginManager {
|
||||
|
||||
// Paper start
|
||||
private void handlePluginException(String msg, Throwable ex, Plugin plugin) {
|
||||
@@ -420,7 +422,7 @@ index 42da20011544075a9bea63a12ae86f2f21720667..16d0e517afd3fae21f2666c6b4e1e38d
|
||||
callEvent(new ServerExceptionEvent(new ServerPluginEnableDisableException(msg, ex, plugin)));
|
||||
}
|
||||
// Paper end
|
||||
@@ -641,9 +643,11 @@ public final class SimplePluginManager implements PluginManager {
|
||||
@@ -675,9 +677,11 @@ public final class SimplePluginManager implements PluginManager {
|
||||
));
|
||||
}
|
||||
} catch (Throwable ex) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Kevin Raneri <kevin.raneri@gmail.com>
|
||||
Date: Fri, 4 Mar 2022 05:03:15 -0500
|
||||
Date: Wed, 3 Feb 2021 23:02:38 -0600
|
||||
Subject: [PATCH] Pufferfish Server Changes
|
||||
|
||||
Pufferfish
|
||||
@@ -629,10 +629,10 @@ index 0000000000000000000000000000000000000000..020368da69b9a492155f6de6297f7473
|
||||
+}
|
||||
diff --git a/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java b/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..56330536c52fa327ef89d7a08e72557c6633c8bb
|
||||
index 0000000000000000000000000000000000000000..bd01a39767f65d959060b890afe7f9d8d426d70a
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java
|
||||
@@ -0,0 +1,291 @@
|
||||
@@ -0,0 +1,293 @@
|
||||
+package gg.pufferfish.pufferfish;
|
||||
+
|
||||
+import gg.pufferfish.pufferfish.simd.SIMDDetection;
|
||||
@@ -726,16 +726,18 @@ index 0000000000000000000000000000000000000000..56330536c52fa327ef89d7a08e72557c
|
||||
+ // Attempt to detect vectorization
|
||||
+ try {
|
||||
+ SIMDDetection.isEnabled = SIMDDetection.canEnable();
|
||||
+ SIMDDetection.versionLimited = SIMDDetection.getJavaVersion() != 17;
|
||||
+ SIMDDetection.versionLimited = SIMDDetection.getJavaVersion() != 17 && SIMDDetection.getJavaVersion() != 18;
|
||||
+ } catch (NoClassDefFoundError | Exception ignored) {}
|
||||
+
|
||||
+ if (SIMDDetection.isEnabled) {
|
||||
+ PufferfishLogger.LOGGER.info("SIMD operations detected as functional. Will replace some operations with faster versions.");
|
||||
+ } else if (SIMDDetection.versionLimited) {
|
||||
+ PufferfishLogger.LOGGER.warning("Will not enable SIMD! These optimizations are only safely supported on Java 17.");
|
||||
+ PufferfishLogger.LOGGER.warning("Will not enable SIMD! These optimizations are only safely supported on Java 17 and Java 18.");
|
||||
+ } else {
|
||||
+ PufferfishLogger.LOGGER.warning("SIMD operations are available for your server, but are not configured!");
|
||||
+ PufferfishLogger.LOGGER.warning("To enable additional optimizations, add \"--add-modules=jdk.incubator.vector\" to your startup flags, BEFORE the \"-jar\".");
|
||||
+ PufferfishLogger.LOGGER.warning("If you have already added this flag, then SIMD operations are not supported on your JVM or CPU.");
|
||||
+ PufferfishLogger.LOGGER.warning("Debug: Java: " + System.getProperty("java.version") + ", test run: " + SIMDDetection.testRun);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
@@ -2179,7 +2181,7 @@ index c8d56947305c981a3268ce4ae3e975db350ceff2..371b0f95b23d67c9913875a3dd7888e7
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index e28e09aae1d95d9bed50a137e999e6d457e62478..27e90ca03275a42271bbe97ee1a63a355b098ede 100644
|
||||
index 257c94f7c1cb00c9a91ab82e311dfd8eca29c538..6afd7c8b3a0db90dbab14b4405ae4c750e5b0ef1 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -235,6 +235,8 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -2425,7 +2427,7 @@ index 50fd3419deb668dda64b1056f03fb66da55e6960..c63ee396e990d11e2f613f3b5a478b48
|
||||
this.getRandomBlockPosition(j, 0, k, 15, blockposition);
|
||||
int normalY = chunk.getHeight(Heightmap.Types.MOTION_BLOCKING, blockposition.getX() & 15, blockposition.getZ() & 15) + 1;
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index ca876d0916b7b888e8df58fb6b115fa0ab5b79d3..93eb94fc3b1dd35efecc4615bd4f1b0b8361be2d 100644
|
||||
index 9df5b678ce4343d0bb54133393f6bbe40fe5366b..350a64a1864780c192436c7819991881a94d281c 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1116,6 +1116,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -2741,7 +2743,7 @@ index 79abd84696ef099f6b12ddeaa6e398f18c53316a..29169f9819ebbe0b90d87ed1e5833a3a
|
||||
public final String id;
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index fdd76d1a1636f30f519c434b41061d826c4a8261..6a31e29bce673e698922da3c3ba8fd4d8b0adedb 100644
|
||||
index 1521f53ee1bd85ca44a68b2c9d969eaf63fa342e..bf896f821b88415691312d5c725ed21bb2e3f024 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -141,7 +141,6 @@ import org.bukkit.event.entity.EntityTeleportEvent;
|
||||
@@ -2799,7 +2801,7 @@ index fdd76d1a1636f30f519c434b41061d826c4a8261..6a31e29bce673e698922da3c3ba8fd4d
|
||||
public boolean onClimbable() {
|
||||
if (this.isSpectator()) {
|
||||
return false;
|
||||
@@ -3540,7 +3561,10 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -3548,7 +3569,10 @@ public abstract class LivingEntity extends Entity {
|
||||
Vec3 vec3d1 = new Vec3(entity.getX(), entity.getEyeY(), entity.getZ());
|
||||
|
||||
// Paper - diff on change - used in CraftLivingEntity#hasLineOfSight(Location) and CraftWorld#lineOfSightExists
|
||||
@@ -3329,7 +3331,7 @@ index d1eefa6ef3e9abfe7af4d8310aa64465fa2d5463..0f4aa330e5b179bb706a31917c671f16
|
||||
default BlockHitResult clip(ClipContext raytrace1, BlockPos blockposition) {
|
||||
// Paper start - Prevent raytrace from loading chunks
|
||||
diff --git a/src/main/java/net/minecraft/world/level/GameRules.java b/src/main/java/net/minecraft/world/level/GameRules.java
|
||||
index 798afc145c54306fcf0838d8daef2bdf17763da9..e67d5012bc7af629d05bceb1b1e22162272e17aa 100644
|
||||
index 22feab6477bad023c2d6cc9ac99d392d0afe0a31..fb2626d2a6babe531dd1849333b119ab36200d80 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/GameRules.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/GameRules.java
|
||||
@@ -90,6 +90,7 @@ public class GameRules {
|
||||
|
||||
@@ -66,7 +66,7 @@ index 5c445772eb244bd31316be3f78305614c46b9363..38995873e2b4cf9e7ac83d074c817a04
|
||||
|
||||
public void doTick() {
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index a133fd75ee9dc007d1c380771a0f7d5a1f714dcf..142437f0224e186dd74500ac88d5c1d147db3e71 100644
|
||||
index 41e6543ecb8b4459af91f58ab8a3034b3a429512..835c7ca3473d34b97534998500d2820a5881bdbf 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2475,6 +2475,8 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -194,7 +194,7 @@ index e82a9d41a0710c0bd8a3fa2f8ee1704f7e1e56df..2ce9b08535cf3783e6823de348943300
|
||||
protected ParticleOptions getInkParticle() {
|
||||
return ParticleTypes.GLOW_SQUID_INK;
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 6a31e29bce673e698922da3c3ba8fd4d8b0adedb..69d14a128cbd4bcfc36b3a3b6acfbf4168ffbb79 100644
|
||||
index bf896f821b88415691312d5c725ed21bb2e3f024..a052d67bbcf1fc4b0a5eb44fb0f0d26e96841416 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -219,9 +219,9 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -236,7 +236,7 @@ index 6a31e29bce673e698922da3c3ba8fd4d8b0adedb..69d14a128cbd4bcfc36b3a3b6acfbf41
|
||||
double d0 = (double) this.getJumpPower() + this.getJumpBoostPower();
|
||||
Vec3 vec3d = this.getDeltaMovement();
|
||||
// Paper start
|
||||
@@ -3358,8 +3359,10 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -3366,8 +3367,10 @@ public abstract class LivingEntity extends Entity {
|
||||
this.pushEntities();
|
||||
this.level.getProfiler().pop();
|
||||
// Paper start
|
||||
@@ -249,7 +249,7 @@ index 6a31e29bce673e698922da3c3ba8fd4d8b0adedb..69d14a128cbd4bcfc36b3a3b6acfbf41
|
||||
Location from = new Location(this.level.getWorld(), this.xo, this.yo, this.zo, this.yRotO, this.xRotO);
|
||||
Location to = new Location (this.level.getWorld(), this.getX(), this.getY(), this.getZ(), this.getYRot(), this.getXRot());
|
||||
io.papermc.paper.event.entity.EntityMoveEvent event = new io.papermc.paper.event.entity.EntityMoveEvent(this.getBukkitLivingEntity(), from, to.clone());
|
||||
@@ -3369,6 +3372,21 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -3377,6 +3380,21 @@ public abstract class LivingEntity extends Entity {
|
||||
absMoveTo(event.getTo().getX(), event.getTo().getY(), event.getTo().getZ(), event.getTo().getYaw(), event.getTo().getPitch());
|
||||
}
|
||||
}
|
||||
@@ -4033,7 +4033,7 @@ index 3a3f3358c4bbd16bdcadc56c6a865ecfb942ad54..e73644f453bed8523bfad47764018362
|
||||
protected void defineSynchedData() {
|
||||
super.defineSynchedData();
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/Slime.java b/src/main/java/net/minecraft/world/entity/monster/Slime.java
|
||||
index b6e78e8145ea78d532f22707c7525829c5778076..86d8150934769c886ad657877993e1b4d4ab6829 100644
|
||||
index 2e819d32915941bd77034ce599eb787610a6d666..a76cc2a88a14db90901869b9bcb24e9e045501c9 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/Slime.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Slime.java
|
||||
@@ -65,18 +65,55 @@ public class Slime extends Mob implements Enemy {
|
||||
@@ -4092,7 +4092,7 @@ index b6e78e8145ea78d532f22707c7525829c5778076..86d8150934769c886ad657877993e1b4
|
||||
this.targetSelector.addGoal(1, new NearestAttackableTargetGoal<>(this, Player.class, 10, true, false, (entityliving) -> {
|
||||
return Math.abs(entityliving.getY() - this.getY()) <= 4.0D;
|
||||
}));
|
||||
@@ -366,11 +403,12 @@ public class Slime extends Mob implements Enemy {
|
||||
@@ -371,11 +408,12 @@ public class Slime extends Mob implements Enemy {
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -4106,7 +4106,7 @@ index b6e78e8145ea78d532f22707c7525829c5778076..86d8150934769c886ad657877993e1b4
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@@ -403,7 +441,7 @@ public class Slime extends Mob implements Enemy {
|
||||
@@ -408,7 +446,7 @@ public class Slime extends Mob implements Enemy {
|
||||
return super.getDimensions(pose).scale(0.255F * (float) this.getSize());
|
||||
}
|
||||
|
||||
@@ -4115,7 +4115,7 @@ index b6e78e8145ea78d532f22707c7525829c5778076..86d8150934769c886ad657877993e1b4
|
||||
|
||||
private float yRot;
|
||||
private int jumpDelay;
|
||||
@@ -422,21 +460,33 @@ public class Slime extends Mob implements Enemy {
|
||||
@@ -427,21 +465,33 @@ public class Slime extends Mob implements Enemy {
|
||||
}
|
||||
|
||||
public void setWantedMovement(double speed) {
|
||||
@@ -4152,7 +4152,7 @@ index b6e78e8145ea78d532f22707c7525829c5778076..86d8150934769c886ad657877993e1b4
|
||||
if (this.jumpDelay-- <= 0) {
|
||||
this.jumpDelay = this.slime.getJumpDelay();
|
||||
if (this.isAggressive) {
|
||||
@@ -453,7 +503,7 @@ public class Slime extends Mob implements Enemy {
|
||||
@@ -458,7 +508,7 @@ public class Slime extends Mob implements Enemy {
|
||||
this.mob.setSpeed(0.0F);
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Implement elytra settings
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 667827901c5b8479ebbbc89c25eec222e4906e7d..0ff49c290f5294e6986d9c2088e441f0ec96ff22 100644
|
||||
index d26d4db18e70bcfcf149787b822facf9824eb9f7..a50035eae2faec356bb8cc3956ae39618f8dace2 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -3419,7 +3419,16 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -3427,7 +3427,16 @@ public abstract class LivingEntity extends Entity {
|
||||
int j = i / 10;
|
||||
|
||||
if (j % 2 == 0) {
|
||||
@@ -54,7 +54,7 @@ index 543a08f920319a2547258640bafebb1e70af65c4..dd211aa7c4ef1e158933a89898b9e5bc
|
||||
itemStack.shrink(1);
|
||||
} else ((net.minecraft.server.level.ServerPlayer) user).getBukkitEntity().updateInventory();
|
||||
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
index d1183ab1a0d0d6a973bde1640c34cc884f81e167..d57c6a70c0a19b840ae8003d480c480a33a0b02a 100644
|
||||
index 4da450d1289c12356b24a81f267ba136983a2d20..d823e4ceba2128ee588b2b344cc8f91cd6de1d13 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
@@ -552,7 +552,7 @@ public final class ItemStack {
|
||||
@@ -66,7 +66,7 @@ index d1183ab1a0d0d6a973bde1640c34cc884f81e167..d57c6a70c0a19b840ae8003d480c480a
|
||||
int k = 0;
|
||||
|
||||
for (int l = 0; j > 0 && l < amount; ++l) {
|
||||
@@ -606,6 +606,12 @@ public final class ItemStack {
|
||||
@@ -607,6 +607,12 @@ public final class ItemStack {
|
||||
if (this.hurt(amount, entity.getRandom(), entity /*instanceof ServerPlayer ? (ServerPlayer) entity : null*/)) { // Paper - pass LivingEntity for EntityItemDamageEvent
|
||||
breakCallback.accept(entity);
|
||||
Item item = this.getItem();
|
||||
|
||||
@@ -58,10 +58,10 @@ index 75e1f6b593a23c88f34cc25db580930066bfb7bb..6cb145ce59d26d8c743962166ff74788
|
||||
((ServerPlayer) player).connection.send(new ClientboundContainerSetDataPacket(containerId, 0, cost.get()));
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
index d57c6a70c0a19b840ae8003d480c480a33a0b02a..84d77fee05eda89cdd37be281e771415dcfabda4 100644
|
||||
index d823e4ceba2128ee588b2b344cc8f91cd6de1d13..4098ed7542fe484ee066c3cdc4720e61cc9acae0 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
@@ -1156,6 +1156,12 @@ public final class ItemStack {
|
||||
@@ -1157,6 +1157,12 @@ public final class ItemStack {
|
||||
return this.tag != null && this.tag.contains("Enchantments", 9) ? !this.tag.getList("Enchantments", 10).isEmpty() : false;
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ index ab822d03cbd8cc5047277f42f29e4c736fb177b3..6c45a860407e42d0f72ab02afddc5b1f
|
||||
// Purpur end
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 4be548422d14ae4d8800e73c4e91f55f67a1bfee..2773267524a58219876a84aa44b97094e155883a 100644
|
||||
index e5077f045b2a2bea277494d062b3d5c5cd1385e8..6866f2efa5d558d8eb01bfa88e1d916013cf6577 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -263,6 +263,7 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -60,7 +60,7 @@ index 4be548422d14ae4d8800e73c4e91f55f67a1bfee..2773267524a58219876a84aa44b97094
|
||||
}
|
||||
|
||||
// CraftBukkit start
|
||||
@@ -3439,6 +3446,27 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -3447,6 +3454,27 @@ public abstract class LivingEntity extends Entity {
|
||||
this.hurt(DamageSource.DROWN, 1.0F);
|
||||
}
|
||||
|
||||
@@ -273,7 +273,7 @@ index e7e4d87fb8a5276fd617afc4e0b925100abf3f76..42919b2267eed71e29830a96afdd3be1
|
||||
// Paper end
|
||||
private static enum AttackPhase {
|
||||
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 15bbf62f1dab73b501044c6ada0f6f3b09ab07df..695ff6b65114a2aea761e55d61bea6d49d804f2e 100644
|
||||
index 6e2ab702f63c08f0124b529ca196e83934e1d7a0..bc92a419f15d20f741dc6b7b218018c0c06ae6c2 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
|
||||
@@ -93,11 +93,12 @@ public class Zombie extends Monster {
|
||||
|
||||
@@ -17,17 +17,16 @@ index c039b896ee85543c26a8ab76640080f539deaa4c..b79045402f490373d3d83d80aa8e3b94
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
index 665baa256637756fe16892b37969c7e1ec51b0f6..c3b8387896fe5a7618e363b3fad1cdd3a06c55b5 100644
|
||||
index a138f2067d1f747ef35add78027cd2aa2f191bb2..69318c141b2b05ba22100232f0b637f3ed53b7b7 100644
|
||||
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
@@ -962,9 +962,11 @@ public class PurpurWorldConfig {
|
||||
@@ -961,8 +961,10 @@ public class PurpurWorldConfig {
|
||||
}
|
||||
|
||||
public boolean spawnerDeactivateByRedstone = false;
|
||||
public boolean spawnerFixMC50647 = false;
|
||||
+ public boolean spawnerFixMC238526 = false;
|
||||
private void spawnerSettings() {
|
||||
spawnerDeactivateByRedstone = getBoolean("blocks.spawner.deactivate-by-redstone", spawnerDeactivateByRedstone);
|
||||
spawnerFixMC50647 = getBoolean("blocks.spawner.fix-mc-50647", spawnerFixMC50647);
|
||||
+ spawnerFixMC238526 = getBoolean("blocks.spawner.fix-mc-238526", spawnerFixMC238526);
|
||||
}
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: BillyGalbreath <Blake.Galbreath@Gmail.com>
|
||||
Date: Sun, 30 Jan 2022 02:03:34 -0600
|
||||
Subject: [PATCH] MC-50647 - Fix spawners not spawning slimes correctly
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/Slime.java b/src/main/java/net/minecraft/world/entity/monster/Slime.java
|
||||
index 90c2e4ccc7191a43722c876c3804a829d98e8713..47e9d93f75d3cfbda4e5a3a3a2ed1e204331a961 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/Slime.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Slime.java
|
||||
@@ -403,6 +403,7 @@ public class Slime extends Mob implements Enemy {
|
||||
|
||||
public static boolean checkSlimeSpawnRules(EntityType<Slime> type, LevelAccessor world, MobSpawnType spawnReason, BlockPos pos, Random random) {
|
||||
if (world.getDifficulty() != Difficulty.PEACEFUL) {
|
||||
+ if (spawnReason == MobSpawnType.SPAWNER && world.getMinecraftWorld().purpurConfig.spawnerFixMC50647) return true; // Purpur
|
||||
// Paper start - Replace rules for Height in Swamp Biome
|
||||
final double maxHeightSwamp = world.getMinecraftWorld().paperConfig.slimeMaxSpawnHeightInSwamp;
|
||||
final double minHeightSwamp = world.getMinecraftWorld().paperConfig.slimeMinSpawnHeightInSwamp;
|
||||
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
index ff2be61f790f39aae37794e7d7e4115073bfd716..665baa256637756fe16892b37969c7e1ec51b0f6 100644
|
||||
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
@@ -961,8 +961,10 @@ public class PurpurWorldConfig {
|
||||
}
|
||||
|
||||
public boolean spawnerDeactivateByRedstone = false;
|
||||
+ public boolean spawnerFixMC50647 = false;
|
||||
private void spawnerSettings() {
|
||||
spawnerDeactivateByRedstone = getBoolean("blocks.spawner.deactivate-by-redstone", spawnerDeactivateByRedstone);
|
||||
+ spawnerFixMC50647 = getBoolean("blocks.spawner.fix-mc-50647", spawnerFixMC50647);
|
||||
}
|
||||
|
||||
public int spongeAbsorptionArea = 64;
|
||||
@@ -5,7 +5,7 @@ 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
|
||||
index f8c7eb51608fcf91de3da03afd9ffd34dbedaffc..92154459fd46db7e9182952cc1f844298c2dcb3c 100644
|
||||
index 27877223340647049f432138caf62326182c8bbb..8bef96dd28ffb2de00a8d3c50f158d5e537516e6 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -1418,13 +1418,13 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -38,7 +38,7 @@ index 7534889c4169cbd26f7e778cbd3be49bd2640c83..ca767d5a8ecb1d0c41ed149fd77eb2f4
|
||||
// Paper end
|
||||
|
||||
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
index c3b8387896fe5a7618e363b3fad1cdd3a06c55b5..7c131da608b91555cd5293da5b90de0ee9c10f9e 100644
|
||||
index 69318c141b2b05ba22100232f0b637f3ed53b7b7..ce375eaefbed62233db7bf95e23cd1c1a650d711 100644
|
||||
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
@@ -136,6 +136,7 @@ public class PurpurWorldConfig {
|
||||
@@ -64,7 +64,7 @@ index 61cadc946954a1e92bd9b395b87dcb83eef786c4..e398366f2021554248fda62a7199670b
|
||||
return InteractionResult.SUCCESS;
|
||||
} else {
|
||||
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
index 7c131da608b91555cd5293da5b90de0ee9c10f9e..3454d2ec2c76541a943c321477e2939cd20bab69 100644
|
||||
index ce375eaefbed62233db7bf95e23cd1c1a650d711..a9d88e8d33f8950f5bd19e7a2d763fbeabee12c8 100644
|
||||
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
@@ -699,8 +699,12 @@ public class PurpurWorldConfig {
|
||||
Reference in New Issue
Block a user