Compare commits
14 Commits
release-40
...
release-51
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1f0f3fe45f | ||
|
|
9237ea8410 | ||
|
|
e622c64617 | ||
|
|
6ddb56dde7 | ||
|
|
d598e114a6 | ||
|
|
f6a1d5825f | ||
|
|
0c997c2e0c | ||
|
|
8c336c7e8e | ||
|
|
af9f9f76f3 | ||
|
|
ed191511cf | ||
|
|
f0e1e58914 | ||
|
|
6bf0230eb6 | ||
|
|
11623bf432 | ||
|
|
23e724232e |
@@ -1,2 +1,2 @@
|
|||||||
purpurCommit = 68117a4e35802c17c89eb0b8ff993d08a8e2bd66
|
purpurCommit = 561164b800712a7bd02ca0a7069c23bc71677b79
|
||||||
pufferfishCommit = 19a70d2ca38093d36f233cb3b590f4d28b85c078
|
pufferfishCommit = 845c015664150048d0a7c02b706fe1c05a91ac16
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
group = org.plazmamc.plazma
|
group = org.plazmamc.plazma
|
||||||
version = 1.19.4-R0.1-SNAPSHOT
|
version = 1.19.4-R0.1-SNAPSHOT
|
||||||
|
|
||||||
paperCommit = bcd8dc2c1189293c4fc0b57048f0f0668c1b7e60
|
paperCommit = 956062a5d51bc4735e280c0a48e37f2fddb73c34
|
||||||
|
|
||||||
org.gradle.caching = true
|
org.gradle.caching = true
|
||||||
org.gradle.parallel = true
|
org.gradle.parallel = true
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
From: AlphaKR93 <dev@alpha93.kr>
|
From: AlphaKR93 <dev@alpha93.kr>
|
||||||
Date: Wed, 17 May 2023 05:33:40 +0000
|
Date: Sun, 4 Jun 2023 07:49:45 +0000
|
||||||
Subject: [PATCH] Pufferfish API Changes
|
Subject: [PATCH] Pufferfish API Changes
|
||||||
|
|
||||||
Original: Kevin Raneri <kevin.raneri@gmail.com>
|
Original: Kevin Raneri <kevin.raneri@gmail.com>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
From: AlphaKR93 <dev@alpha93.kr>
|
From: AlphaKR93 <dev@alpha93.kr>
|
||||||
Date: Wed, 17 May 2023 05:41:48 +0000
|
Date: Sun, 4 Jun 2023 07:52:25 +0000
|
||||||
Subject: [PATCH] Purpur API Changes
|
Subject: [PATCH] Purpur API Changes
|
||||||
|
|
||||||
Original: PurpurMC
|
Original: PurpurMC
|
||||||
@@ -1171,10 +1171,10 @@ index bc84b892cae5fe7019a3ad481e9da79956efa1fe..48eb5b00c460cccde29d327cef1d63fc
|
|||||||
+ // Purpur end
|
+ // Purpur end
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||||
index 9cd49bf6db451af67cd15c8857d7bf51a4e1a67a..838f32eb3397d847071f54648dbac02c35d621cf 100644
|
index 88c4885569d2b8b22fce55601d50608ac8e9388c..dc437885404ae147a06cac653e519a4674a9a951 100644
|
||||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||||
@@ -3057,4 +3057,139 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
@@ -3068,4 +3068,139 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||||
@Override
|
@Override
|
||||||
Spigot spigot();
|
Spigot spigot();
|
||||||
// Spigot end
|
// Spigot end
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
From: AlphaKR93 <dev@alpha93.kr>
|
From: AlphaKR93 <dev@alpha93.kr>
|
||||||
Date: Wed, 17 May 2023 05:33:40 +0000
|
Date: Sun, 4 Jun 2023 07:49:45 +0000
|
||||||
Subject: [PATCH] Pufferfish Server Changes
|
Subject: [PATCH] Pufferfish Server Changes
|
||||||
|
|
||||||
Original: Kevin Raneri <kevin.raneri@gmail.com>
|
Original: Kevin Raneri <kevin.raneri@gmail.com>
|
||||||
@@ -20,7 +20,7 @@ You should have received a copy of the GNU General Public License
|
|||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||||
index 9cf389defdaeb887e9cad4f0fed3f3b95667b238..b41b186397d013c19436c345be98b785d4bd0295 100644
|
index 4f2fa65ade89c5703451dad4f80eeef162b277d1..3ee1160c796cc86db9bc9438055b307239e9a8f7 100644
|
||||||
--- a/build.gradle.kts
|
--- a/build.gradle.kts
|
||||||
+++ b/build.gradle.kts
|
+++ b/build.gradle.kts
|
||||||
@@ -7,8 +7,12 @@ plugins {
|
@@ -7,8 +7,12 @@ plugins {
|
||||||
@@ -616,10 +616,10 @@ index 0000000000000000000000000000000000000000..020368da69b9a492155f6de6297f7473
|
|||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java b/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java
|
diff --git a/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java b/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000000000000000000000000000000000000..6e441a1a28ba72a8b1cc09fe5fca71b3c70627d4
|
index 0000000000000000000000000000000000000000..f88e0b31b10b329fd8e94fc48148f490f31da646
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java
|
+++ b/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java
|
||||||
@@ -0,0 +1,285 @@
|
@@ -0,0 +1,293 @@
|
||||||
+package gg.pufferfish.pufferfish;
|
+package gg.pufferfish.pufferfish;
|
||||||
+
|
+
|
||||||
+import gg.pufferfish.pufferfish.simd.SIMDDetection;
|
+import gg.pufferfish.pufferfish.simd.SIMDDetection;
|
||||||
@@ -895,6 +895,14 @@ index 0000000000000000000000000000000000000000..6e441a1a28ba72a8b1cc09fe5fca71b3
|
|||||||
+ "This can improve performance by a few percent, but has minor gameplay implications.");
|
+ "This can improve performance by a few percent, but has minor gameplay implications.");
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
|
+ public static boolean allowEndCrystalRespawn;
|
||||||
|
+ private static void allowEndCrystalRespawn() {
|
||||||
|
+ getBoolean("allow-end-crystal-respawn", true,
|
||||||
|
+ "Allows end crystals to respawn the ender dragon.",
|
||||||
|
+ "On servers that expect end crystal fights in the end dimension, disabling this",
|
||||||
|
+ "will prevent the server from performing an expensive search to attempt respawning",
|
||||||
|
+ "the ender dragon whenever a player places an end crystal.");
|
||||||
|
+ }
|
||||||
+
|
+
|
||||||
+ public static boolean disableMethodProfiler;
|
+ public static boolean disableMethodProfiler;
|
||||||
+ public static boolean disableOutOfOrderChat;
|
+ public static boolean disableOutOfOrderChat;
|
||||||
@@ -1875,7 +1883,7 @@ index 04b1531572e8fff1e46fe1c94e7fc863841e0f66..47ddc42f2b63d9d3fae5ae6ea93d4183
|
|||||||
int LARGE_MAX_STACK_SIZE = 64;
|
int LARGE_MAX_STACK_SIZE = 64;
|
||||||
int DEFAULT_DISTANCE_LIMIT = 8;
|
int DEFAULT_DISTANCE_LIMIT = 8;
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index df316ca580a0a3b4ba6b658f7d7bdf542f4ad85b..1030b54428b15f387580a2ce47a7a1eb0c8d521b 100644
|
index 280ee1838106201f5e3ba7753caced6d030f7e55..b4ab2cfb7a5fa0d2efd1a759d754d5203aaac077 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -292,7 +292,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -292,7 +292,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
@@ -1887,7 +1895,7 @@ index df316ca580a0a3b4ba6b658f7d7bdf542f4ad85b..1030b54428b15f387580a2ce47a7a1eb
|
|||||||
private ChunkPos chunkPosition;
|
private ChunkPos chunkPosition;
|
||||||
private Vec3 deltaMovement;
|
private Vec3 deltaMovement;
|
||||||
private float yRot;
|
private float yRot;
|
||||||
@@ -416,6 +416,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -417,6 +417,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
return this.originWorld;
|
return this.originWorld;
|
||||||
}
|
}
|
||||||
// Paper end
|
// Paper end
|
||||||
@@ -1900,7 +1908,7 @@ index df316ca580a0a3b4ba6b658f7d7bdf542f4ad85b..1030b54428b15f387580a2ce47a7a1eb
|
|||||||
public float getBukkitYaw() {
|
public float getBukkitYaw() {
|
||||||
return this.yRot;
|
return this.yRot;
|
||||||
}
|
}
|
||||||
@@ -490,17 +496,36 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -491,17 +497,36 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
this.isLegacyTrackingEntity = isLegacyTrackingEntity;
|
this.isLegacyTrackingEntity = isLegacyTrackingEntity;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1938,7 +1946,7 @@ index df316ca580a0a3b4ba6b658f7d7bdf542f4ad85b..1030b54428b15f387580a2ce47a7a1eb
|
|||||||
for (Entity passenger : passengers) {
|
for (Entity passenger : passengers) {
|
||||||
org.spigotmc.TrackingRange.TrackingRangeType passengerType = passenger.trackingRangeType;
|
org.spigotmc.TrackingRange.TrackingRangeType passengerType = passenger.trackingRangeType;
|
||||||
int passengerRange = chunkMap.getEntityTrackerRange(passengerType.ordinal());
|
int passengerRange = chunkMap.getEntityTrackerRange(passengerType.ordinal());
|
||||||
@@ -509,6 +534,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -510,6 +535,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
range = passengerRange;
|
range = passengerRange;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1948,7 +1956,7 @@ index df316ca580a0a3b4ba6b658f7d7bdf542f4ad85b..1030b54428b15f387580a2ce47a7a1eb
|
|||||||
|
|
||||||
return chunkMap.playerEntityTrackerTrackMaps[type.ordinal()].getObjectsInRange(MCUtil.getCoordinateKey(this));
|
return chunkMap.playerEntityTrackerTrackMaps[type.ordinal()].getObjectsInRange(MCUtil.getCoordinateKey(this));
|
||||||
}
|
}
|
||||||
@@ -790,6 +818,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -791,6 +819,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
public void baseTick() {
|
public void baseTick() {
|
||||||
@@ -1961,7 +1969,7 @@ index df316ca580a0a3b4ba6b658f7d7bdf542f4ad85b..1030b54428b15f387580a2ce47a7a1eb
|
|||||||
this.level.getProfiler().push("entityBaseTick");
|
this.level.getProfiler().push("entityBaseTick");
|
||||||
if (firstTick && this instanceof net.minecraft.world.entity.NeutralMob neutralMob) neutralMob.tickInitialPersistentAnger(level); // Paper - Update last hurt when ticking
|
if (firstTick && this instanceof net.minecraft.world.entity.NeutralMob neutralMob) neutralMob.tickInitialPersistentAnger(level); // Paper - Update last hurt when ticking
|
||||||
this.feetBlockState = null;
|
this.feetBlockState = null;
|
||||||
@@ -4163,16 +4197,18 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -4164,16 +4198,18 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean updateFluidHeightAndDoFluidPushing(TagKey<Fluid> tag, double speed) {
|
public boolean updateFluidHeightAndDoFluidPushing(TagKey<Fluid> tag, double speed) {
|
||||||
@@ -1987,7 +1995,7 @@ index df316ca580a0a3b4ba6b658f7d7bdf542f4ad85b..1030b54428b15f387580a2ce47a7a1eb
|
|||||||
double d1 = 0.0D;
|
double d1 = 0.0D;
|
||||||
boolean flag = this.isPushedByFluid();
|
boolean flag = this.isPushedByFluid();
|
||||||
boolean flag1 = false;
|
boolean flag1 = false;
|
||||||
@@ -4180,14 +4216,61 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -4181,14 +4217,61 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
int k1 = 0;
|
int k1 = 0;
|
||||||
BlockPos.MutableBlockPos blockposition_mutableblockposition = new BlockPos.MutableBlockPos();
|
BlockPos.MutableBlockPos blockposition_mutableblockposition = new BlockPos.MutableBlockPos();
|
||||||
|
|
||||||
@@ -2055,7 +2063,7 @@ index df316ca580a0a3b4ba6b658f7d7bdf542f4ad85b..1030b54428b15f387580a2ce47a7a1eb
|
|||||||
|
|
||||||
if (d2 >= axisalignedbb.minY) {
|
if (d2 >= axisalignedbb.minY) {
|
||||||
flag1 = true;
|
flag1 = true;
|
||||||
@@ -4209,9 +4292,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -4210,9 +4293,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2578,7 +2586,7 @@ index 27c028ab6b1edb6e413af3bbaa27bf30f2d85540..302ca7391109c10e81a7745504b3c530
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
|
diff --git a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
|
||||||
index 8b2a3a8482018b7db7de81bc295862f783e17ce5..e6f87e1e3c99195ed11c81162cb54e7f5750c4ba 100644
|
index a211ca048dddc75afce1f83ee1700bad66e457fc..85260fd93ca8d5ffd0ba7a98f1d47093d58f0f87 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
|
--- a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
|
+++ b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
|
||||||
@@ -44,6 +44,36 @@ public abstract class Projectile extends Entity implements TraceableEntity {
|
@@ -44,6 +44,36 @@ public abstract class Projectile extends Entity implements TraceableEntity {
|
||||||
@@ -2665,6 +2673,19 @@ index 08f027cdcaeeca7b545483cb8c5eb8d13e4933b9..992ff554643b149d9c6101562a9754a8
|
|||||||
this.readChestVehicleSaveData(nbt);
|
this.readChestVehicleSaveData(nbt);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
diff --git a/src/main/java/net/minecraft/world/item/EndCrystalItem.java b/src/main/java/net/minecraft/world/item/EndCrystalItem.java
|
||||||
|
index 171ce56ec3b8761f75144b1fca2f100fcbba6800..4202d8df909a6315cce0def93ad5241a519de43e 100644
|
||||||
|
--- a/src/main/java/net/minecraft/world/item/EndCrystalItem.java
|
||||||
|
+++ b/src/main/java/net/minecraft/world/item/EndCrystalItem.java
|
||||||
|
@@ -55,7 +55,7 @@ public class EndCrystalItem extends Item {
|
||||||
|
world.gameEvent((Entity) context.getPlayer(), GameEvent.ENTITY_PLACE, blockposition1);
|
||||||
|
EndDragonFight enderdragonbattle = ((ServerLevel) world).dragonFight();
|
||||||
|
|
||||||
|
- if (enderdragonbattle != null) {
|
||||||
|
+ if (enderdragonbattle != null && gg.pufferfish.pufferfish.PufferfishConfig.allowEndCrystalRespawn) { // Pufferfish
|
||||||
|
enderdragonbattle.tryRespawn();
|
||||||
|
}
|
||||||
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/world/item/crafting/ShapelessRecipe.java b/src/main/java/net/minecraft/world/item/crafting/ShapelessRecipe.java
|
diff --git a/src/main/java/net/minecraft/world/item/crafting/ShapelessRecipe.java b/src/main/java/net/minecraft/world/item/crafting/ShapelessRecipe.java
|
||||||
index f4f3f3a19d3cadaef1ae1a47daa68251a983dcf2..8da06f8bea0239c5206d5d4f4ff48bdeb0a89f9d 100644
|
index f4f3f3a19d3cadaef1ae1a47daa68251a983dcf2..8da06f8bea0239c5206d5d4f4ff48bdeb0a89f9d 100644
|
||||||
--- a/src/main/java/net/minecraft/world/item/crafting/ShapelessRecipe.java
|
--- a/src/main/java/net/minecraft/world/item/crafting/ShapelessRecipe.java
|
||||||
@@ -3190,7 +3211,7 @@ index d190bad5d287766ed4165ed827d9901a9d878687..13594b96cc8f451723c3598ef302ccee
|
|||||||
|
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java
|
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java
|
||||||
index 1b80a91fa36c59a31b57ef7ef4a68eacbb0f17f5..b5e118456af6421ae3f85cb8232dc97a8b2d46b7 100644
|
index 854865f28bcae0fb0c17717c914687f78e951e21..c6297917e94f5a8b4b1447b2c29c44b806ccaff6 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java
|
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java
|
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java
|
||||||
@@ -27,6 +27,7 @@ public class LevelChunkSection {
|
@@ -27,6 +27,7 @@ public class LevelChunkSection {
|
||||||
@@ -3217,7 +3238,7 @@ index 1b80a91fa36c59a31b57ef7ef4a68eacbb0f17f5..b5e118456af6421ae3f85cb8232dc97a
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.updateKnownBlockInfo(x | (z << 4) | (y << 8), iblockdata1, state); // Paper
|
this.updateKnownBlockInfo(x | (z << 4) | (y << 8), iblockdata1, state); // Paper
|
||||||
@@ -260,6 +263,7 @@ public class LevelChunkSection {
|
@@ -261,6 +264,7 @@ public class LevelChunkSection {
|
||||||
if (fluid.isRandomlyTicking()) {
|
if (fluid.isRandomlyTicking()) {
|
||||||
this.tickingFluidCount = (short) (this.tickingFluidCount + 1);
|
this.tickingFluidCount = (short) (this.tickingFluidCount + 1);
|
||||||
}
|
}
|
||||||
@@ -3431,10 +3452,10 @@ index ebe65474a4a05ff1637d7f37ebcfe690af59def5..42142c512b12e5b269c19f1e821c50e7
|
|||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
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 e769f7b0904814ee63e2a73dca57e5dc33382fba..e38391da44a1b5e3b845eba2d80453021a1e0c25 100644
|
index 894c0d5bfa001def4374b657e3eb8f15a0caa1e9..a49520fbb3cbce866338c964dd0aadbd113bf411 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
|
||||||
@@ -257,7 +257,7 @@ import javax.annotation.Nullable; // Paper
|
@@ -259,7 +259,7 @@ import javax.annotation.Nullable; // Paper
|
||||||
import javax.annotation.Nonnull; // Paper
|
import javax.annotation.Nonnull; // Paper
|
||||||
|
|
||||||
public final class CraftServer implements Server {
|
public final class CraftServer implements Server {
|
||||||
@@ -3443,7 +3464,7 @@ index e769f7b0904814ee63e2a73dca57e5dc33382fba..e38391da44a1b5e3b845eba2d8045302
|
|||||||
private final String serverVersion;
|
private final String serverVersion;
|
||||||
private final String bukkitVersion = Versioning.getBukkitVersion();
|
private final String bukkitVersion = Versioning.getBukkitVersion();
|
||||||
private final Logger logger = Logger.getLogger("Minecraft");
|
private final Logger logger = Logger.getLogger("Minecraft");
|
||||||
@@ -1040,6 +1040,11 @@ public final class CraftServer implements Server {
|
@@ -1042,6 +1042,11 @@ public final class CraftServer implements Server {
|
||||||
plugin.getPluginMeta().getDisplayName(),
|
plugin.getPluginMeta().getDisplayName(),
|
||||||
"This plugin is not properly shutting down its async tasks when it is being shut down. This task may throw errors during the final shutdown logs and might not complete before process dies."
|
"This plugin is not properly shutting down its async tasks when it is being shut down. This task may throw errors during the final shutdown logs and might not complete before process dies."
|
||||||
));
|
));
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
From: AlphaKR93 <dev@alpha93.kr>
|
From: AlphaKR93 <dev@alpha93.kr>
|
||||||
Date: Wed, 17 May 2023 05:41:47 +0000
|
Date: Sun, 4 Jun 2023 07:52:24 +0000
|
||||||
Subject: [PATCH] Purpur Server Changes
|
Subject: [PATCH] Purpur Server Changes
|
||||||
|
|
||||||
Original: PurpurMC
|
Original: PurpurMC
|
||||||
@@ -25,7 +25,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|||||||
SOFTWARE.
|
SOFTWARE.
|
||||||
|
|
||||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||||
index b41b186397d013c19436c345be98b785d4bd0295..22470f0ab8354a9f31a0f195f3fe80f2f5ee2f0e 100644
|
index 3ee1160c796cc86db9bc9438055b307239e9a8f7..9c01005751c0088f560f96401cdfdebbbda4e7ec 100644
|
||||||
--- a/build.gradle.kts
|
--- a/build.gradle.kts
|
||||||
+++ b/build.gradle.kts
|
+++ b/build.gradle.kts
|
||||||
@@ -7,12 +7,8 @@ plugins {
|
@@ -7,12 +7,8 @@ plugins {
|
||||||
@@ -249,7 +249,7 @@ index fa56cd09102a89692b42f1d14257990508c5c720..f9251183df72ddc56662fd3f02acf216
|
|||||||
setListData(vector);
|
setListData(vector);
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java b/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java
|
diff --git a/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java b/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java
|
||||||
index 6e441a1a28ba72a8b1cc09fe5fca71b3c70627d4..47e77541e558e18758ae0fcc2aa4e47261e928b6 100644
|
index f88e0b31b10b329fd8e94fc48148f490f31da646..fd26eb27a2fcebe8c768305c587c908bcedacf1d 100644
|
||||||
--- a/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java
|
--- a/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java
|
||||||
+++ b/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java
|
+++ b/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java
|
||||||
@@ -28,6 +28,7 @@ public class PufferfishConfig {
|
@@ -28,6 +28,7 @@ public class PufferfishConfig {
|
||||||
@@ -3620,7 +3620,7 @@ index 9ddbfcf80d9a381dace78a62880f85a4d767e0eb..7383c7d3820dce06108eaafd236a7c6c
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
index 5c21de0d48fba88c3164b72e0eb624706b683fab..c27e455321951e76e4818fec0e64301f5620dbf6 100644
|
index 92e758a286a5db079c32d53cc52c8a422457daef..ff56981a03b55f9ee1ec8ad36adaf9849b2c914b 100644
|
||||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
@@ -469,6 +469,7 @@ public abstract class PlayerList {
|
@@ -469,6 +469,7 @@ public abstract class PlayerList {
|
||||||
@@ -4181,7 +4181,7 @@ index 14fab63346d56c72cd7534a04760efd10eef4295..745e792482f61c571e2efbd4200dd1bd
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index 1030b54428b15f387580a2ce47a7a1eb0c8d521b..f31f4ecf8fb07f6cf01eea0aa14f5d454a4ce2a3 100644
|
index b4ab2cfb7a5fa0d2efd1a759d754d5203aaac077..e71eca3ddbbeb3168dd73433b6d6ffe9f6755f77 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -156,7 +156,7 @@ import org.bukkit.plugin.PluginManager;
|
@@ -156,7 +156,7 @@ import org.bukkit.plugin.PluginManager;
|
||||||
@@ -4211,7 +4211,7 @@ index 1030b54428b15f387580a2ce47a7a1eb0c8d521b..f31f4ecf8fb07f6cf01eea0aa14f5d45
|
|||||||
private float eyeHeight;
|
private float eyeHeight;
|
||||||
public boolean isInPowderSnow;
|
public boolean isInPowderSnow;
|
||||||
public boolean wasInPowderSnow;
|
public boolean wasInPowderSnow;
|
||||||
@@ -400,6 +400,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -401,6 +401,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
private UUID originWorld;
|
private UUID originWorld;
|
||||||
public boolean freezeLocked = false; // Paper - Freeze Tick Lock API
|
public boolean freezeLocked = false; // Paper - Freeze Tick Lock API
|
||||||
public boolean collidingWithWorldBorder; // Paper
|
public boolean collidingWithWorldBorder; // Paper
|
||||||
@@ -4219,7 +4219,7 @@ index 1030b54428b15f387580a2ce47a7a1eb0c8d521b..f31f4ecf8fb07f6cf01eea0aa14f5d45
|
|||||||
|
|
||||||
public void setOrigin(@javax.annotation.Nonnull Location location) {
|
public void setOrigin(@javax.annotation.Nonnull Location location) {
|
||||||
this.origin = location.toVector();
|
this.origin = location.toVector();
|
||||||
@@ -579,7 +580,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -580,7 +581,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
this.bb = Entity.INITIAL_AABB;
|
this.bb = Entity.INITIAL_AABB;
|
||||||
this.stuckSpeedMultiplier = Vec3.ZERO;
|
this.stuckSpeedMultiplier = Vec3.ZERO;
|
||||||
this.nextStep = 1.0F;
|
this.nextStep = 1.0F;
|
||||||
@@ -4228,7 +4228,7 @@ index 1030b54428b15f387580a2ce47a7a1eb0c8d521b..f31f4ecf8fb07f6cf01eea0aa14f5d45
|
|||||||
this.remainingFireTicks = -this.getFireImmuneTicks();
|
this.remainingFireTicks = -this.getFireImmuneTicks();
|
||||||
this.fluidHeight = new Object2DoubleArrayMap(2);
|
this.fluidHeight = new Object2DoubleArrayMap(2);
|
||||||
this.fluidOnEyes = new HashSet();
|
this.fluidOnEyes = new HashSet();
|
||||||
@@ -824,7 +825,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -825,7 +826,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Pufferfish end - entity TTL
|
// Pufferfish end - entity TTL
|
||||||
@@ -4237,7 +4237,7 @@ index 1030b54428b15f387580a2ce47a7a1eb0c8d521b..f31f4ecf8fb07f6cf01eea0aa14f5d45
|
|||||||
if (firstTick && this instanceof net.minecraft.world.entity.NeutralMob neutralMob) neutralMob.tickInitialPersistentAnger(level); // Paper - Update last hurt when ticking
|
if (firstTick && this instanceof net.minecraft.world.entity.NeutralMob neutralMob) neutralMob.tickInitialPersistentAnger(level); // Paper - Update last hurt when ticking
|
||||||
this.feetBlockState = null;
|
this.feetBlockState = null;
|
||||||
if (this.isPassenger() && this.getVehicle().isRemoved()) {
|
if (this.isPassenger() && this.getVehicle().isRemoved()) {
|
||||||
@@ -885,7 +886,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -886,7 +887,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.firstTick = false;
|
this.firstTick = false;
|
||||||
@@ -4246,7 +4246,7 @@ index 1030b54428b15f387580a2ce47a7a1eb0c8d521b..f31f4ecf8fb07f6cf01eea0aa14f5d45
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void setSharedFlagOnFire(boolean onFire) {
|
public void setSharedFlagOnFire(boolean onFire) {
|
||||||
@@ -894,10 +895,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -895,10 +896,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
|
|
||||||
public void checkOutOfWorld() {
|
public void checkOutOfWorld() {
|
||||||
// Paper start - Configurable nether ceiling damage
|
// Paper start - Configurable nether ceiling damage
|
||||||
@@ -4259,7 +4259,7 @@ index 1030b54428b15f387580a2ce47a7a1eb0c8d521b..f31f4ecf8fb07f6cf01eea0aa14f5d45
|
|||||||
this.outOfWorld();
|
this.outOfWorld();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1059,7 +1061,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -1060,7 +1062,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4268,7 +4268,7 @@ index 1030b54428b15f387580a2ce47a7a1eb0c8d521b..f31f4ecf8fb07f6cf01eea0aa14f5d45
|
|||||||
if (this.stuckSpeedMultiplier.lengthSqr() > 1.0E-7D) {
|
if (this.stuckSpeedMultiplier.lengthSqr() > 1.0E-7D) {
|
||||||
movement = movement.multiply(this.stuckSpeedMultiplier);
|
movement = movement.multiply(this.stuckSpeedMultiplier);
|
||||||
this.stuckSpeedMultiplier = Vec3.ZERO;
|
this.stuckSpeedMultiplier = Vec3.ZERO;
|
||||||
@@ -1068,7 +1070,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -1069,7 +1071,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
// Paper start - ignore movement changes while inactive.
|
// Paper start - ignore movement changes while inactive.
|
||||||
if (isTemporarilyActive && !(this instanceof ItemEntity || this instanceof net.minecraft.world.entity.vehicle.AbstractMinecart) && movement == getDeltaMovement() && movementType == MoverType.SELF) {
|
if (isTemporarilyActive && !(this instanceof ItemEntity || this instanceof net.minecraft.world.entity.vehicle.AbstractMinecart) && movement == getDeltaMovement() && movementType == MoverType.SELF) {
|
||||||
setDeltaMovement(Vec3.ZERO);
|
setDeltaMovement(Vec3.ZERO);
|
||||||
@@ -4277,7 +4277,7 @@ index 1030b54428b15f387580a2ce47a7a1eb0c8d521b..f31f4ecf8fb07f6cf01eea0aa14f5d45
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Paper end
|
// Paper end
|
||||||
@@ -1089,8 +1091,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -1090,8 +1092,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
this.setPos(this.getX() + vec3d1.x, this.getY() + vec3d1.y, this.getZ() + vec3d1.z);
|
this.setPos(this.getX() + vec3d1.x, this.getY() + vec3d1.y, this.getZ() + vec3d1.z);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4288,7 +4288,7 @@ index 1030b54428b15f387580a2ce47a7a1eb0c8d521b..f31f4ecf8fb07f6cf01eea0aa14f5d45
|
|||||||
boolean flag = !Mth.equal(movement.x, vec3d1.x);
|
boolean flag = !Mth.equal(movement.x, vec3d1.x);
|
||||||
boolean flag1 = !Mth.equal(movement.z, vec3d1.z);
|
boolean flag1 = !Mth.equal(movement.z, vec3d1.z);
|
||||||
|
|
||||||
@@ -1109,7 +1111,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -1110,7 +1112,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
|
|
||||||
this.checkFallDamage(vec3d1.y, this.onGround, iblockdata, blockposition);
|
this.checkFallDamage(vec3d1.y, this.onGround, iblockdata, blockposition);
|
||||||
if (this.isRemoved()) {
|
if (this.isRemoved()) {
|
||||||
@@ -4297,7 +4297,7 @@ index 1030b54428b15f387580a2ce47a7a1eb0c8d521b..f31f4ecf8fb07f6cf01eea0aa14f5d45
|
|||||||
} else {
|
} else {
|
||||||
if (this.horizontalCollision) {
|
if (this.horizontalCollision) {
|
||||||
Vec3 vec3d2 = this.getDeltaMovement();
|
Vec3 vec3d2 = this.getDeltaMovement();
|
||||||
@@ -1250,7 +1252,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -1251,7 +1253,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
this.setRemainingFireTicks(-this.getFireImmuneTicks());
|
this.setRemainingFireTicks(-this.getFireImmuneTicks());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4306,7 +4306,7 @@ index 1030b54428b15f387580a2ce47a7a1eb0c8d521b..f31f4ecf8fb07f6cf01eea0aa14f5d45
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Paper start - detailed watchdog information
|
// Paper start - detailed watchdog information
|
||||||
@@ -1677,7 +1679,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -1678,7 +1680,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean fireImmune() {
|
public boolean fireImmune() {
|
||||||
@@ -4315,7 +4315,7 @@ index 1030b54428b15f387580a2ce47a7a1eb0c8d521b..f31f4ecf8fb07f6cf01eea0aa14f5d45
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean causeFallDamage(float fallDistance, float damageMultiplier, DamageSource damageSource) {
|
public boolean causeFallDamage(float fallDistance, float damageMultiplier, DamageSource damageSource) {
|
||||||
@@ -1746,7 +1748,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -1747,7 +1749,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
return this.isInWater() || flag;
|
return this.isInWater() || flag;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4324,7 +4324,7 @@ index 1030b54428b15f387580a2ce47a7a1eb0c8d521b..f31f4ecf8fb07f6cf01eea0aa14f5d45
|
|||||||
Entity entity = this.getVehicle();
|
Entity entity = this.getVehicle();
|
||||||
|
|
||||||
if (entity instanceof Boat) {
|
if (entity instanceof Boat) {
|
||||||
@@ -2339,6 +2341,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -2340,6 +2342,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
nbt.putBoolean("Paper.FreezeLock", true);
|
nbt.putBoolean("Paper.FreezeLock", true);
|
||||||
}
|
}
|
||||||
// Paper end
|
// Paper end
|
||||||
@@ -4336,7 +4336,7 @@ index 1030b54428b15f387580a2ce47a7a1eb0c8d521b..f31f4ecf8fb07f6cf01eea0aa14f5d45
|
|||||||
return nbt;
|
return nbt;
|
||||||
} catch (Throwable throwable) {
|
} catch (Throwable throwable) {
|
||||||
CrashReport crashreport = CrashReport.forThrowable(throwable, "Saving entity NBT");
|
CrashReport crashreport = CrashReport.forThrowable(throwable, "Saving entity NBT");
|
||||||
@@ -2507,6 +2514,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -2508,6 +2515,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
freezeLocked = nbt.getBoolean("Paper.FreezeLock");
|
freezeLocked = nbt.getBoolean("Paper.FreezeLock");
|
||||||
}
|
}
|
||||||
// Paper end
|
// Paper end
|
||||||
@@ -4348,7 +4348,7 @@ index 1030b54428b15f387580a2ce47a7a1eb0c8d521b..f31f4ecf8fb07f6cf01eea0aa14f5d45
|
|||||||
|
|
||||||
} catch (Throwable throwable) {
|
} catch (Throwable throwable) {
|
||||||
CrashReport crashreport = CrashReport.forThrowable(throwable, "Loading entity NBT");
|
CrashReport crashreport = CrashReport.forThrowable(throwable, "Loading entity NBT");
|
||||||
@@ -2823,6 +2835,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -2824,6 +2836,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
this.passengers = ImmutableList.copyOf(list);
|
this.passengers = ImmutableList.copyOf(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4362,7 +4362,7 @@ index 1030b54428b15f387580a2ce47a7a1eb0c8d521b..f31f4ecf8fb07f6cf01eea0aa14f5d45
|
|||||||
this.gameEvent(GameEvent.ENTITY_MOUNT, entity);
|
this.gameEvent(GameEvent.ENTITY_MOUNT, entity);
|
||||||
}
|
}
|
||||||
return true; // CraftBukkit
|
return true; // CraftBukkit
|
||||||
@@ -2864,6 +2883,14 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -2865,6 +2884,14 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// Spigot end
|
// Spigot end
|
||||||
@@ -4377,7 +4377,7 @@ index 1030b54428b15f387580a2ce47a7a1eb0c8d521b..f31f4ecf8fb07f6cf01eea0aa14f5d45
|
|||||||
if (this.passengers.size() == 1 && this.passengers.get(0) == entity) {
|
if (this.passengers.size() == 1 && this.passengers.get(0) == entity) {
|
||||||
this.passengers = ImmutableList.of();
|
this.passengers = ImmutableList.of();
|
||||||
} else {
|
} else {
|
||||||
@@ -2923,12 +2950,15 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -2924,12 +2951,15 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
return Vec3.directionFromRotation(this.getRotationVector());
|
return Vec3.directionFromRotation(this.getRotationVector());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4394,7 +4394,7 @@ index 1030b54428b15f387580a2ce47a7a1eb0c8d521b..f31f4ecf8fb07f6cf01eea0aa14f5d45
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.isInsidePortal = true;
|
this.isInsidePortal = true;
|
||||||
@@ -2946,7 +2976,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -2947,7 +2977,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
ServerLevel worldserver1 = minecraftserver.getLevel(resourcekey);
|
ServerLevel worldserver1 = minecraftserver.getLevel(resourcekey);
|
||||||
|
|
||||||
if (true && !this.isPassenger() && this.portalTime++ >= i) { // CraftBukkit
|
if (true && !this.isPassenger() && this.portalTime++ >= i) { // CraftBukkit
|
||||||
@@ -4403,7 +4403,7 @@ index 1030b54428b15f387580a2ce47a7a1eb0c8d521b..f31f4ecf8fb07f6cf01eea0aa14f5d45
|
|||||||
this.portalTime = i;
|
this.portalTime = i;
|
||||||
// Paper start
|
// Paper start
|
||||||
io.papermc.paper.event.entity.EntityPortalReadyEvent event = new io.papermc.paper.event.entity.EntityPortalReadyEvent(this.getBukkitEntity(), worldserver1 == null ? null : worldserver1.getWorld(), org.bukkit.PortalType.NETHER);
|
io.papermc.paper.event.entity.EntityPortalReadyEvent event = new io.papermc.paper.event.entity.EntityPortalReadyEvent(this.getBukkitEntity(), worldserver1 == null ? null : worldserver1.getWorld(), org.bukkit.PortalType.NETHER);
|
||||||
@@ -2964,7 +2994,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -2965,7 +2995,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
}
|
}
|
||||||
} // Paper
|
} // Paper
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
@@ -4412,7 +4412,7 @@ index 1030b54428b15f387580a2ce47a7a1eb0c8d521b..f31f4ecf8fb07f6cf01eea0aa14f5d45
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.isInsidePortal = false;
|
this.isInsidePortal = false;
|
||||||
@@ -2979,7 +3009,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -2980,7 +3010,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.processPortalCooldown();
|
this.processPortalCooldown();
|
||||||
@@ -4421,7 +4421,7 @@ index 1030b54428b15f387580a2ce47a7a1eb0c8d521b..f31f4ecf8fb07f6cf01eea0aa14f5d45
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3161,7 +3191,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -3162,7 +3192,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getMaxAirSupply() {
|
public int getMaxAirSupply() {
|
||||||
@@ -4430,7 +4430,7 @@ index 1030b54428b15f387580a2ce47a7a1eb0c8d521b..f31f4ecf8fb07f6cf01eea0aa14f5d45
|
|||||||
}
|
}
|
||||||
|
|
||||||
public int getAirSupply() {
|
public int getAirSupply() {
|
||||||
@@ -3431,14 +3461,14 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -3432,14 +3462,14 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
}
|
}
|
||||||
// Paper end
|
// Paper end
|
||||||
if (this.level instanceof ServerLevel && !this.isRemoved()) {
|
if (this.level instanceof ServerLevel && !this.isRemoved()) {
|
||||||
@@ -4447,7 +4447,7 @@ index 1030b54428b15f387580a2ce47a7a1eb0c8d521b..f31f4ecf8fb07f6cf01eea0aa14f5d45
|
|||||||
PortalInfo shapedetectorshape = (location == null) ? this.findDimensionEntryPoint(worldserver) : new PortalInfo(new Vec3(location.x(), location.y(), location.z()), Vec3.ZERO, this.yRot, this.xRot, worldserver, null); // CraftBukkit
|
PortalInfo shapedetectorshape = (location == null) ? this.findDimensionEntryPoint(worldserver) : new PortalInfo(new Vec3(location.x(), location.y(), location.z()), Vec3.ZERO, this.yRot, this.xRot, worldserver, null); // CraftBukkit
|
||||||
|
|
||||||
if (shapedetectorshape == null) {
|
if (shapedetectorshape == null) {
|
||||||
@@ -3472,7 +3502,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -3473,7 +3503,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
this.unRide();
|
this.unRide();
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
@@ -4456,7 +4456,7 @@ index 1030b54428b15f387580a2ce47a7a1eb0c8d521b..f31f4ecf8fb07f6cf01eea0aa14f5d45
|
|||||||
// Paper start - Change lead drop timing to prevent dupe
|
// Paper start - Change lead drop timing to prevent dupe
|
||||||
if (this instanceof Mob) {
|
if (this instanceof Mob) {
|
||||||
((Mob) this).dropLeash(true, true); // Paper drop lead
|
((Mob) this).dropLeash(true, true); // Paper drop lead
|
||||||
@@ -3495,10 +3525,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -3496,10 +3526,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.removeAfterChangingDimensions();
|
this.removeAfterChangingDimensions();
|
||||||
@@ -4469,7 +4469,7 @@ index 1030b54428b15f387580a2ce47a7a1eb0c8d521b..f31f4ecf8fb07f6cf01eea0aa14f5d45
|
|||||||
return entity;
|
return entity;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -3618,7 +3648,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -3619,7 +3649,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean canChangeDimensions() {
|
public boolean canChangeDimensions() {
|
||||||
@@ -4478,7 +4478,7 @@ index 1030b54428b15f387580a2ce47a7a1eb0c8d521b..f31f4ecf8fb07f6cf01eea0aa14f5d45
|
|||||||
}
|
}
|
||||||
|
|
||||||
public float getBlockExplosionResistance(Explosion explosion, BlockGetter world, BlockPos pos, BlockState blockState, FluidState fluidState, float max) {
|
public float getBlockExplosionResistance(Explosion explosion, BlockGetter world, BlockPos pos, BlockState blockState, FluidState fluidState, float max) {
|
||||||
@@ -3915,6 +3945,20 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -3916,6 +3946,20 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
return SlotAccess.NULL;
|
return SlotAccess.NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4499,7 +4499,7 @@ index 1030b54428b15f387580a2ce47a7a1eb0c8d521b..f31f4ecf8fb07f6cf01eea0aa14f5d45
|
|||||||
@Override
|
@Override
|
||||||
public void sendSystemMessage(Component message) {}
|
public void sendSystemMessage(Component message) {}
|
||||||
|
|
||||||
@@ -4196,6 +4240,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -4197,6 +4241,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
this.yRotO = this.getYRot();
|
this.yRotO = this.getYRot();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4512,7 +4512,7 @@ index 1030b54428b15f387580a2ce47a7a1eb0c8d521b..f31f4ecf8fb07f6cf01eea0aa14f5d45
|
|||||||
public boolean updateFluidHeightAndDoFluidPushing(TagKey<Fluid> tag, double speed) {
|
public boolean updateFluidHeightAndDoFluidPushing(TagKey<Fluid> tag, double speed) {
|
||||||
if (false && this.touchingUnloadedChunk()) { // Pufferfish - cost of a lookup here is the same cost as below, so skip
|
if (false && this.touchingUnloadedChunk()) { // Pufferfish - cost of a lookup here is the same cost as below, so skip
|
||||||
return false;
|
return false;
|
||||||
@@ -4724,4 +4774,64 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -4725,4 +4775,64 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
return ((net.minecraft.server.level.ServerChunkCache) level.getChunkSource()).isPositionTicking(this);
|
return ((net.minecraft.server.level.ServerChunkCache) level.getChunkSource()).isPositionTicking(this);
|
||||||
}
|
}
|
||||||
// Paper end
|
// Paper end
|
||||||
@@ -4650,7 +4650,7 @@ index 8af0918d3a62de58a4b2af55022c812bb0e46092..3fc26a8976f4bfa28c2c6a862aac997d
|
|||||||
}
|
}
|
||||||
|
|
||||||
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 a9f20e6a73e2e1875abd1e122a5d08c4ef44f9d8..0c0f422ef0c20477295cea0b6b3c4b2d0a7db265 100644
|
index 89699aaccd45a5a928a97d1b3ad06f5de5b9fad1..186d6b06194eb2120c9cec6218c87e8cf2f11f65 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
|
||||||
@@ -306,7 +306,7 @@ public class ExperienceOrb extends Entity {
|
@@ -306,7 +306,7 @@ public class ExperienceOrb extends Entity {
|
||||||
@@ -15552,10 +15552,10 @@ index c4f4a26e016eea744f587461af80461074d48303..10b109de5abc015b61a896d363ad37a0
|
|||||||
public void tick() {
|
public void tick() {
|
||||||
super.tick();
|
super.tick();
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
|
diff --git a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
|
||||||
index e6f87e1e3c99195ed11c81162cb54e7f5750c4ba..220690cbd6552b06626f4edf5c71bed5cf1f12c4 100644
|
index 85260fd93ca8d5ffd0ba7a98f1d47093d58f0f87..505a60605ff2282f2c460c81464d60a433f41eda 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
|
--- a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
|
+++ b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
|
||||||
@@ -307,6 +307,6 @@ public abstract class Projectile extends Entity implements TraceableEntity {
|
@@ -318,6 +318,6 @@ public abstract class Projectile extends Entity implements TraceableEntity {
|
||||||
public boolean mayInteract(Level world, BlockPos pos) {
|
public boolean mayInteract(Level world, BlockPos pos) {
|
||||||
Entity entity = this.getOwner();
|
Entity entity = this.getOwner();
|
||||||
|
|
||||||
@@ -18061,37 +18061,31 @@ index a6c25647fb37f59307de0d390f8e8cf55504d7d3..52aae8bd4023b2bb48f12983f54b20fa
|
|||||||
world.scheduleTick(pos, this, 1);
|
world.scheduleTick(pos, this, 1);
|
||||||
return super.updateShape(state, direction, neighborState, world, pos, neighborPos);
|
return super.updateShape(state, direction, neighborState, world, pos, neighborPos);
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/block/ComposterBlock.java b/src/main/java/net/minecraft/world/level/block/ComposterBlock.java
|
diff --git a/src/main/java/net/minecraft/world/level/block/ComposterBlock.java b/src/main/java/net/minecraft/world/level/block/ComposterBlock.java
|
||||||
index fb4382337fe83f7d00c2212a7a71e0ba5bdd51cc..f085a669e2f2645e8c4f7a7e5a3c958f13809744 100644
|
index 6fab2b69a0af298bd00b309efcd6aa8399e23d1f..4f7b21caa123ea7896788fd25133d8de3ab1ccaf 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/block/ComposterBlock.java
|
--- a/src/main/java/net/minecraft/world/level/block/ComposterBlock.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/block/ComposterBlock.java
|
+++ b/src/main/java/net/minecraft/world/level/block/ComposterBlock.java
|
||||||
@@ -228,26 +228,28 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder {
|
@@ -228,20 +228,28 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder {
|
||||||
ItemStack itemstack = player.getItemInHand(hand);
|
ItemStack itemstack = player.getItemInHand(hand);
|
||||||
|
|
||||||
if (i < 8 && ComposterBlock.COMPOSTABLES.containsKey(itemstack.getItem())) {
|
if (i < 8 && ComposterBlock.COMPOSTABLES.containsKey(itemstack.getItem())) {
|
||||||
- if (i < 7 && !world.isClientSide) {
|
- if (i < 7 && !world.isClientSide) {
|
||||||
- // Paper start - EntityChangeBlockEvent
|
- BlockState iblockdata1 = ComposterBlock.addItem(player, state, world, pos, itemstack);
|
||||||
- double rand = world.getRandom().nextDouble();
|
- // Paper start - handle cancelled events
|
||||||
- BlockState dummyBlockState = ComposterBlock.addItem(player, state, org.bukkit.craftbukkit.util.DummyGeneratorAccess.INSTANCE, pos, itemstack, rand);
|
- if (iblockdata1 == null) {
|
||||||
- if (dummyBlockState == null) {
|
|
||||||
- return InteractionResult.PASS;
|
- return InteractionResult.PASS;
|
||||||
- }
|
- }
|
||||||
- if (state != dummyBlockState && org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(player, pos, dummyBlockState).isCancelled()) { // if block state will change and event cancelled
|
|
||||||
- return InteractionResult.sidedSuccess(world.isClientSide);
|
|
||||||
- }
|
|
||||||
- BlockState iblockdata1 = ComposterBlock.addItem(player, state, world, pos, itemstack, rand);
|
|
||||||
- // Paper end
|
- // Paper end
|
||||||
-
|
+ // Purpur start
|
||||||
|
+ BlockState newState = process(i, state, world, itemstack, pos, player);
|
||||||
|
+ if (newState == null) {
|
||||||
|
+ return InteractionResult.PASS;
|
||||||
|
+ }
|
||||||
|
|
||||||
- world.levelEvent(1500, pos, state != iblockdata1 ? 1 : 0);
|
- world.levelEvent(1500, pos, state != iblockdata1 ? 1 : 0);
|
||||||
- player.awardStat(Stats.ITEM_USED.get(itemstack.getItem()));
|
- player.awardStat(Stats.ITEM_USED.get(itemstack.getItem()));
|
||||||
- if (!player.getAbilities().instabuild) {
|
- if (!player.getAbilities().instabuild) {
|
||||||
- itemstack.shrink(1);
|
- itemstack.shrink(1);
|
||||||
- }
|
- }
|
||||||
+ // Purpur start
|
|
||||||
+ BlockState newState = process(i, state, world, itemstack, pos, player);
|
|
||||||
+ if (newState == null) {
|
|
||||||
+ return InteractionResult.PASS;
|
|
||||||
}
|
|
||||||
|
|
||||||
+ if (world.purpurConfig.composterBulkProcess && player.isShiftKeyDown() && newState != state) {
|
+ if (world.purpurConfig.composterBulkProcess && player.isShiftKeyDown() && newState != state) {
|
||||||
+ BlockState oldState;
|
+ BlockState oldState;
|
||||||
+ int oldCount, newCount, oldLevel, newLevel;
|
+ int oldCount, newCount, oldLevel, newLevel;
|
||||||
@@ -18106,28 +18100,22 @@ index fb4382337fe83f7d00c2212a7a71e0ba5bdd51cc..f085a669e2f2645e8c4f7a7e5a3c958f
|
|||||||
+ newCount = itemstack.getCount();
|
+ newCount = itemstack.getCount();
|
||||||
+ newLevel = newState.getValue(ComposterBlock.LEVEL);
|
+ newLevel = newState.getValue(ComposterBlock.LEVEL);
|
||||||
+ } while (newCount > 0 && (newCount != oldCount || newLevel != oldLevel || newState != oldState));
|
+ } while (newCount > 0 && (newCount != oldCount || newLevel != oldLevel || newState != oldState));
|
||||||
+ }
|
}
|
||||||
+ // Purpur end
|
+ // Purpur end
|
||||||
|
|
||||||
return InteractionResult.sidedSuccess(world.isClientSide);
|
return InteractionResult.sidedSuccess(world.isClientSide);
|
||||||
} else if (i == 8) {
|
} else if (i == 8) {
|
||||||
ComposterBlock.extractProduce(player, state, world, pos);
|
@@ -252,6 +260,26 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder {
|
||||||
@@ -257,6 +259,32 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder {
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
+ // Purpur start
|
|
||||||
+ private static BlockState process(int level, BlockState state, Level world, ItemStack itemstack, BlockPos pos, Player player) {
|
+ private static BlockState process(int level, BlockState state, Level world, ItemStack itemstack, BlockPos pos, Player player) {
|
||||||
+ if (level < 7 && !world.isClientSide) {
|
+ if (level < 7 && !world.isClientSide) {
|
||||||
+ // Paper start - EntityChangeBlockEvent
|
+ BlockState iblockdata1 = ComposterBlock.addItem(player, state, world, pos, itemstack);
|
||||||
+ double rand = world.getRandom().nextDouble();
|
+ // Paper start - handle cancelled events
|
||||||
+ BlockState dummyBlockState = ComposterBlock.addItem(player, state, org.bukkit.craftbukkit.util.DummyGeneratorAccess.INSTANCE, pos, itemstack, rand);
|
+ if (iblockdata1 == null) {
|
||||||
+ if (dummyBlockState == null) {
|
+ return iblockdata1;
|
||||||
+ return dummyBlockState;
|
|
||||||
+ }
|
+ }
|
||||||
+ if (state != dummyBlockState && org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(player, pos, dummyBlockState).isCancelled()) { // if block state will change and event cancelled
|
|
||||||
+ return state;
|
|
||||||
+ }
|
|
||||||
+ BlockState iblockdata1 = ComposterBlock.addItem(player, state, world, pos, itemstack, rand);
|
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
+
|
+
|
||||||
+ world.levelEvent(1500, pos, state != iblockdata1 ? 1 : 0);
|
+ world.levelEvent(1500, pos, state != iblockdata1 ? 1 : 0);
|
||||||
@@ -18135,7 +18123,7 @@ index fb4382337fe83f7d00c2212a7a71e0ba5bdd51cc..f085a669e2f2645e8c4f7a7e5a3c958f
|
|||||||
+ if (!player.getAbilities().instabuild) {
|
+ if (!player.getAbilities().instabuild) {
|
||||||
+ itemstack.shrink(1);
|
+ itemstack.shrink(1);
|
||||||
+ }
|
+ }
|
||||||
+ return dummyBlockState;
|
+ return iblockdata1;
|
||||||
+ }
|
+ }
|
||||||
+ return state;
|
+ return state;
|
||||||
+ }
|
+ }
|
||||||
@@ -20240,10 +20228,10 @@ index 714afc98b5150907b45a00060be4e41582333204..312a6d90c0a09570aef24c205dc2ff27
|
|||||||
+ // Purpur end - OfflinePlayer API
|
+ // Purpur end - OfflinePlayer API
|
||||||
}
|
}
|
||||||
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 e38391da44a1b5e3b845eba2d80453021a1e0c25..e5bac6bc792196226f975e7f3dd8f147fb14dbad 100644
|
index a49520fbb3cbce866338c964dd0aadbd113bf411..3f80b16c8d69f284a26b16cf2513a955005bf458 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
|
||||||
@@ -257,7 +257,7 @@ import javax.annotation.Nullable; // Paper
|
@@ -259,7 +259,7 @@ import javax.annotation.Nullable; // Paper
|
||||||
import javax.annotation.Nonnull; // Paper
|
import javax.annotation.Nonnull; // Paper
|
||||||
|
|
||||||
public final class CraftServer implements Server {
|
public final class CraftServer implements Server {
|
||||||
@@ -20252,7 +20240,7 @@ index e38391da44a1b5e3b845eba2d80453021a1e0c25..e5bac6bc792196226f975e7f3dd8f147
|
|||||||
private final String serverVersion;
|
private final String serverVersion;
|
||||||
private final String bukkitVersion = Versioning.getBukkitVersion();
|
private final String bukkitVersion = Versioning.getBukkitVersion();
|
||||||
private final Logger logger = Logger.getLogger("Minecraft");
|
private final Logger logger = Logger.getLogger("Minecraft");
|
||||||
@@ -317,6 +317,20 @@ public final class CraftServer implements Server {
|
@@ -319,6 +319,20 @@ public final class CraftServer implements Server {
|
||||||
this.structureManager = new CraftStructureManager(console.getStructureManager());
|
this.structureManager = new CraftStructureManager(console.getStructureManager());
|
||||||
|
|
||||||
Bukkit.setServer(this);
|
Bukkit.setServer(this);
|
||||||
@@ -20273,7 +20261,7 @@ index e38391da44a1b5e3b845eba2d80453021a1e0c25..e5bac6bc792196226f975e7f3dd8f147
|
|||||||
|
|
||||||
// Register all the Enchantments and PotionTypes now so we can stop new registration immediately after
|
// Register all the Enchantments and PotionTypes now so we can stop new registration immediately after
|
||||||
Enchantments.SHARPNESS.getClass();
|
Enchantments.SHARPNESS.getClass();
|
||||||
@@ -957,6 +971,7 @@ public final class CraftServer implements Server {
|
@@ -959,6 +973,7 @@ public final class CraftServer implements Server {
|
||||||
|
|
||||||
org.spigotmc.SpigotConfig.init((File) console.options.valueOf("spigot-settings")); // Spigot
|
org.spigotmc.SpigotConfig.init((File) console.options.valueOf("spigot-settings")); // Spigot
|
||||||
this.console.paperConfigurations.reloadConfigs(this.console);
|
this.console.paperConfigurations.reloadConfigs(this.console);
|
||||||
@@ -20281,7 +20269,7 @@ index e38391da44a1b5e3b845eba2d80453021a1e0c25..e5bac6bc792196226f975e7f3dd8f147
|
|||||||
for (ServerLevel world : this.console.getAllLevels()) {
|
for (ServerLevel world : this.console.getAllLevels()) {
|
||||||
// world.serverLevelData.setDifficulty(config.difficulty); // Paper - per level difficulty
|
// world.serverLevelData.setDifficulty(config.difficulty); // Paper - per level difficulty
|
||||||
world.setSpawnSettings(world.serverLevelData.getDifficulty() != Difficulty.PEACEFUL && config.spawnMonsters, config.spawnAnimals); // Paper - per level difficulty (from MinecraftServer#setDifficulty(ServerLevel, Difficulty, boolean))
|
world.setSpawnSettings(world.serverLevelData.getDifficulty() != Difficulty.PEACEFUL && config.spawnMonsters, config.spawnAnimals); // Paper - per level difficulty (from MinecraftServer#setDifficulty(ServerLevel, Difficulty, boolean))
|
||||||
@@ -972,6 +987,7 @@ public final class CraftServer implements Server {
|
@@ -974,6 +989,7 @@ public final class CraftServer implements Server {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
world.spigotConfig.init(); // Spigot
|
world.spigotConfig.init(); // Spigot
|
||||||
@@ -20289,7 +20277,7 @@ index e38391da44a1b5e3b845eba2d80453021a1e0c25..e5bac6bc792196226f975e7f3dd8f147
|
|||||||
}
|
}
|
||||||
|
|
||||||
Plugin[] pluginClone = pluginManager.getPlugins().clone(); // Paper
|
Plugin[] pluginClone = pluginManager.getPlugins().clone(); // Paper
|
||||||
@@ -987,6 +1003,7 @@ public final class CraftServer implements Server {
|
@@ -989,6 +1005,7 @@ public final class CraftServer implements Server {
|
||||||
this.reloadData();
|
this.reloadData();
|
||||||
org.spigotmc.SpigotConfig.registerCommands(); // Spigot
|
org.spigotmc.SpigotConfig.registerCommands(); // Spigot
|
||||||
io.papermc.paper.command.PaperCommands.registerCommands(this.console); // Paper
|
io.papermc.paper.command.PaperCommands.registerCommands(this.console); // Paper
|
||||||
@@ -20297,7 +20285,7 @@ index e38391da44a1b5e3b845eba2d80453021a1e0c25..e5bac6bc792196226f975e7f3dd8f147
|
|||||||
this.overrideAllCommandBlockCommands = this.commandsConfiguration.getStringList("command-block-overrides").contains("*");
|
this.overrideAllCommandBlockCommands = this.commandsConfiguration.getStringList("command-block-overrides").contains("*");
|
||||||
this.ignoreVanillaPermissions = this.commandsConfiguration.getBoolean("ignore-vanilla-permissions");
|
this.ignoreVanillaPermissions = this.commandsConfiguration.getBoolean("ignore-vanilla-permissions");
|
||||||
|
|
||||||
@@ -1429,6 +1446,55 @@ public final class CraftServer implements Server {
|
@@ -1431,6 +1448,55 @@ public final class CraftServer implements Server {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -20353,7 +20341,7 @@ index e38391da44a1b5e3b845eba2d80453021a1e0c25..e5bac6bc792196226f975e7f3dd8f147
|
|||||||
@Override
|
@Override
|
||||||
public List<Recipe> getRecipesFor(ItemStack result) {
|
public List<Recipe> getRecipesFor(ItemStack result) {
|
||||||
Validate.notNull(result, "Result cannot be null");
|
Validate.notNull(result, "Result cannot be null");
|
||||||
@@ -2700,6 +2766,7 @@ public final class CraftServer implements Server {
|
@@ -2702,6 +2768,7 @@ public final class CraftServer implements Server {
|
||||||
@Override
|
@Override
|
||||||
public double[] getTPS() {
|
public double[] getTPS() {
|
||||||
return new double[] {
|
return new double[] {
|
||||||
@@ -20361,7 +20349,7 @@ index e38391da44a1b5e3b845eba2d80453021a1e0c25..e5bac6bc792196226f975e7f3dd8f147
|
|||||||
net.minecraft.server.MinecraftServer.getServer().tps1.getAverage(),
|
net.minecraft.server.MinecraftServer.getServer().tps1.getAverage(),
|
||||||
net.minecraft.server.MinecraftServer.getServer().tps5.getAverage(),
|
net.minecraft.server.MinecraftServer.getServer().tps5.getAverage(),
|
||||||
net.minecraft.server.MinecraftServer.getServer().tps15.getAverage()
|
net.minecraft.server.MinecraftServer.getServer().tps15.getAverage()
|
||||||
@@ -2746,6 +2813,18 @@ public final class CraftServer implements Server {
|
@@ -2748,6 +2815,18 @@ public final class CraftServer implements Server {
|
||||||
return CraftServer.this.console.paperConfigurations.createLegacyObject(CraftServer.this.console);
|
return CraftServer.this.console.paperConfigurations.createLegacyObject(CraftServer.this.console);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -20380,7 +20368,7 @@ index e38391da44a1b5e3b845eba2d80453021a1e0c25..e5bac6bc792196226f975e7f3dd8f147
|
|||||||
@Override
|
@Override
|
||||||
public void restart() {
|
public void restart() {
|
||||||
org.spigotmc.RestartCommand.restart();
|
org.spigotmc.RestartCommand.restart();
|
||||||
@@ -2921,4 +3000,16 @@ public final class CraftServer implements Server {
|
@@ -2961,4 +3040,16 @@ public final class CraftServer implements Server {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Paper end
|
// Paper end
|
||||||
@@ -20398,10 +20386,10 @@ index e38391da44a1b5e3b845eba2d80453021a1e0c25..e5bac6bc792196226f975e7f3dd8f147
|
|||||||
+ // Purpur end
|
+ // Purpur end
|
||||||
}
|
}
|
||||||
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 8d3a32a0538a6065fd0725721ab8a1a011c4d64a..3013aeb442799aba5b2ae45edcb3c2c72a18a740 100644
|
index dafd2c85f89d8822e50db63c21631199c69a97a0..39a2ff8c34f995ab860aadc24d24136d602af646 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
|
||||||
@@ -2249,6 +2249,48 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
@@ -2282,6 +2282,48 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||||
return (this.getHandle().dragonFight() == null) ? null : new CraftDragonBattle(this.getHandle().dragonFight());
|
return (this.getHandle().dragonFight() == null) ? null : new CraftDragonBattle(this.getHandle().dragonFight());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -20801,10 +20789,10 @@ index 4d7a2c4c1001aefe9fcd4be8dbcb414f721bfff9..2c7716a9d65ebda209a144b82c2126b6
|
|||||||
+ // Purpur end
|
+ // Purpur end
|
||||||
}
|
}
|
||||||
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 3f498543cf0476ff1b184788d93f13b70c476c16..f4a341f72d727bbffa4cfcf72eda8ed0c8945c9e 100644
|
index be64633c8bcee96f2ad5247525cac965b7b031b1..e363891e8ab872ed24c557e3f94110f36c6fb277 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
|
||||||
@@ -533,10 +533,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
@@ -534,10 +534,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setPlayerListName(String name) {
|
public void setPlayerListName(String name) {
|
||||||
@@ -20821,7 +20809,7 @@ index 3f498543cf0476ff1b184788d93f13b70c476c16..f4a341f72d727bbffa4cfcf72eda8ed0
|
|||||||
for (ServerPlayer player : (List<ServerPlayer>) server.getHandle().players) {
|
for (ServerPlayer player : (List<ServerPlayer>) server.getHandle().players) {
|
||||||
if (player.getBukkitEntity().canSee(this)) {
|
if (player.getBukkitEntity().canSee(this)) {
|
||||||
player.connection.send(new ClientboundPlayerInfoUpdatePacket(ClientboundPlayerInfoUpdatePacket.Action.UPDATE_DISPLAY_NAME, this.getHandle()));
|
player.connection.send(new ClientboundPlayerInfoUpdatePacket(ClientboundPlayerInfoUpdatePacket.Action.UPDATE_DISPLAY_NAME, this.getHandle()));
|
||||||
@@ -1357,6 +1362,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
@@ -1358,6 +1363,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (entity.isVehicle() && !ignorePassengers) { // Paper - Teleport API
|
if (entity.isVehicle() && !ignorePassengers) { // Paper - Teleport API
|
||||||
@@ -20832,7 +20820,7 @@ index 3f498543cf0476ff1b184788d93f13b70c476c16..f4a341f72d727bbffa4cfcf72eda8ed0
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2404,6 +2413,28 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
@@ -2405,6 +2414,28 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||||
return this.getHandle().getAbilities().walkingSpeed * 2f;
|
return this.getHandle().getAbilities().walkingSpeed * 2f;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -20861,7 +20849,7 @@ index 3f498543cf0476ff1b184788d93f13b70c476c16..f4a341f72d727bbffa4cfcf72eda8ed0
|
|||||||
private void validateSpeed(float value) {
|
private void validateSpeed(float value) {
|
||||||
if (value < 0) {
|
if (value < 0) {
|
||||||
if (value < -1f) {
|
if (value < -1f) {
|
||||||
@@ -3196,4 +3227,97 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
@@ -3180,4 +3211,97 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||||
return this.spigot;
|
return this.spigot;
|
||||||
}
|
}
|
||||||
// Spigot end
|
// Spigot end
|
||||||
@@ -21041,7 +21029,7 @@ index e43fd3e59fd8c74828ae65965fade27f56beef65..b2f133c8baabba1cffa6e92ea0f85453
|
|||||||
+ // Purpur end
|
+ // Purpur end
|
||||||
}
|
}
|
||||||
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 221f5088953b3452966d07eabd4ea8b38c465fd9..bfb8039a65fbfdb6d2fa6fc4fdeb146fbc4e147f 100644
|
index a153c134cf26e86d49ef419eca35994539af0db3..e9599e0f3d2122c3843ebde81743bc8d558bfd30 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
|
||||||
@@ -563,6 +563,15 @@ public class CraftEventFactory {
|
@@ -563,6 +563,15 @@ public class CraftEventFactory {
|
||||||
|
|||||||
60
patches/server/0003-MC-Dev-fixes.patch
Normal file
60
patches/server/0003-MC-Dev-fixes.patch
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: IPECTER <ipectert@gmail.com>
|
||||||
|
Date: Tue, 30 May 2023 12:12:29 +0900
|
||||||
|
Subject: [PATCH] MC-Dev-fixes
|
||||||
|
|
||||||
|
|
||||||
|
diff --git a/src/main/java/net/minecraft/util/datafix/fixes/LeavesFix.java b/src/main/java/net/minecraft/util/datafix/fixes/LeavesFix.java
|
||||||
|
index 75f1d1f06978d836aab5ebbfe8f7d1e0ca5a95b6..89d70a992e0bcc8e7292c4f736470eafd8747b24 100644
|
||||||
|
--- a/src/main/java/net/minecraft/util/datafix/fixes/LeavesFix.java
|
||||||
|
+++ b/src/main/java/net/minecraft/util/datafix/fixes/LeavesFix.java
|
||||||
|
@@ -71,14 +71,14 @@ public class LeavesFix extends DataFix {
|
||||||
|
return this.fixTypeEverywhereTyped("Leaves fix", type, (typed) -> {
|
||||||
|
return typed.updateTyped(opticFinder, (typedx) -> {
|
||||||
|
int[] is = new int[]{0};
|
||||||
|
- Typed<?> typed2 = typedx.updateTyped(opticFinder2, (typed) -> {
|
||||||
|
- Int2ObjectMap<LeavesFix.LeavesSection> int2ObjectMap = new Int2ObjectOpenHashMap<>(typed.getAllTyped(opticFinder3).stream().map((typedx) -> {
|
||||||
|
- return new LeavesFix.LeavesSection(typedx, this.getInputSchema());
|
||||||
|
+ Typed<?> typed2 = typedx.updateTyped(opticFinder2, (typed2x) -> {
|
||||||
|
+ Int2ObjectMap<LeavesFix.LeavesSection> int2ObjectMap = new Int2ObjectOpenHashMap<>(typed2x.getAllTyped(opticFinder3).stream().map((typedx2) -> {
|
||||||
|
+ return new LeavesFix.LeavesSection(typedx2, this.getInputSchema());
|
||||||
|
}).collect(Collectors.toMap(LeavesFix.Section::getIndex, (leavesSection) -> {
|
||||||
|
return leavesSection;
|
||||||
|
})));
|
||||||
|
if (int2ObjectMap.values().stream().allMatch(LeavesFix.Section::isSkippable)) {
|
||||||
|
- return typed;
|
||||||
|
+ return typed2x;
|
||||||
|
} else {
|
||||||
|
List<IntSet> list = Lists.newArrayList();
|
||||||
|
|
||||||
|
@@ -134,8 +134,8 @@ public class LeavesFix extends DataFix {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- return typed.updateTyped(opticFinder3, (typedx) -> {
|
||||||
|
- return int2ObjectMap.get(typedx.get(DSL.remainderFinder()).get("Y").asInt(0)).write(typedx);
|
||||||
|
+ return typed.updateTyped(opticFinder3, (typedx2) -> {
|
||||||
|
+ return int2ObjectMap.get(typedx2.get(DSL.remainderFinder()).get("Y").asInt(0)).write(typedx2);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
@@ -298,8 +298,8 @@ public class LeavesFix extends DataFix {
|
||||||
|
throw new IllegalStateException("Block state type is not what was expected.");
|
||||||
|
} else {
|
||||||
|
Optional<List<Pair<String, Dynamic<?>>>> optional = typed.getOptional(this.paletteFinder);
|
||||||
|
- this.palette = optional.map((list) -> {
|
||||||
|
- return list.stream().map(Pair::getSecond).collect(Collectors.toList());
|
||||||
|
+ this.palette = (java.util.List)optional.map((list) -> {
|
||||||
|
+ return (java.util.List)list.stream().map(Pair::getSecond).collect(Collectors.toList());
|
||||||
|
}).orElse(ImmutableList.of());
|
||||||
|
Dynamic<?> dynamic = typed.get(DSL.remainderFinder());
|
||||||
|
this.index = dynamic.get("Y").asInt(0);
|
||||||
|
@@ -321,7 +321,7 @@ public class LeavesFix extends DataFix {
|
||||||
|
public Typed<?> write(Typed<?> typed) {
|
||||||
|
return this.isSkippable() ? typed : typed.update(DSL.remainderFinder(), (dynamic) -> {
|
||||||
|
return dynamic.set("BlockStates", dynamic.createLongList(Arrays.stream(this.storage.getRaw())));
|
||||||
|
- }).set(this.paletteFinder, this.palette.stream().map((dynamic) -> {
|
||||||
|
+ }).set(this.paletteFinder, (java.util.List)this.palette.stream().map((dynamic) -> {
|
||||||
|
return Pair.of(References.BLOCK_STATE.typeName(), dynamic);
|
||||||
|
}).collect(Collectors.toList()));
|
||||||
|
}
|
||||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Rebrand
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||||
index 22470f0ab8354a9f31a0f195f3fe80f2f5ee2f0e..dc89b3a8956af69fa71a2bfa17c22aee6c5e9edf 100644
|
index 9c01005751c0088f560f96401cdfdebbbda4e7ec..46fda579a95f9ab92a1ba61cad8218024a722208 100644
|
||||||
--- a/build.gradle.kts
|
--- a/build.gradle.kts
|
||||||
+++ b/build.gradle.kts
|
+++ b/build.gradle.kts
|
||||||
@@ -7,7 +7,7 @@ plugins {
|
@@ -7,7 +7,7 @@ plugins {
|
||||||
@@ -245,10 +245,10 @@ index bd502ca721de0cab438d995efa00ad0554c0d2fe..d72f61f545c3929825e628607b85e0d2
|
|||||||
|
|
||||||
private static final int DEFAULT_SIZE_THRESHOLD = 1024 * 8;
|
private static final int DEFAULT_SIZE_THRESHOLD = 1024 * 8;
|
||||||
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 e5bac6bc792196226f975e7f3dd8f147fb14dbad..4ca714c797e42102e2cd65ba5176ff20e6e5d0ca 100644
|
index 3f80b16c8d69f284a26b16cf2513a955005bf458..26c4f8da23bf83abf2e78894b731312028bed191 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
|
||||||
@@ -257,7 +257,7 @@ import javax.annotation.Nullable; // Paper
|
@@ -259,7 +259,7 @@ import javax.annotation.Nullable; // Paper
|
||||||
import javax.annotation.Nonnull; // Paper
|
import javax.annotation.Nonnull; // Paper
|
||||||
|
|
||||||
public final class CraftServer implements Server {
|
public final class CraftServer implements Server {
|
||||||
@@ -300,10 +300,10 @@ index 92b440b24c6b083f81837611d08fbd6773a2a6e6..058449f24eb3260dc230dad2a0b4c552
|
|||||||
this.playerBreedingCooldowns = this.getNewBreedingCooldownCache(); // Purpur
|
this.playerBreedingCooldowns = this.getNewBreedingCooldownCache(); // Purpur
|
||||||
this.generator = gen;
|
this.generator = gen;
|
||||||
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 4ca714c797e42102e2cd65ba5176ff20e6e5d0ca..7ab657fba87964db3dc7d6b4ba2d7f635e9f1f17 100644
|
index 26c4f8da23bf83abf2e78894b731312028bed191..bb5ec38711f369ffcbd184b4e144bc0d8d576013 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
|
||||||
@@ -971,6 +971,7 @@ public final class CraftServer implements Server {
|
@@ -973,6 +973,7 @@ public final class CraftServer implements Server {
|
||||||
|
|
||||||
org.spigotmc.SpigotConfig.init((File) console.options.valueOf("spigot-settings")); // Spigot
|
org.spigotmc.SpigotConfig.init((File) console.options.valueOf("spigot-settings")); // Spigot
|
||||||
this.console.paperConfigurations.reloadConfigs(this.console);
|
this.console.paperConfigurations.reloadConfigs(this.console);
|
||||||
@@ -311,7 +311,7 @@ index 4ca714c797e42102e2cd65ba5176ff20e6e5d0ca..7ab657fba87964db3dc7d6b4ba2d7f63
|
|||||||
org.purpurmc.purpur.PurpurConfig.init((File) console.options.valueOf("purpur-settings")); // Purpur
|
org.purpurmc.purpur.PurpurConfig.init((File) console.options.valueOf("purpur-settings")); // Purpur
|
||||||
for (ServerLevel world : this.console.getAllLevels()) {
|
for (ServerLevel world : this.console.getAllLevels()) {
|
||||||
// world.serverLevelData.setDifficulty(config.difficulty); // Paper - per level difficulty
|
// world.serverLevelData.setDifficulty(config.difficulty); // Paper - per level difficulty
|
||||||
@@ -2813,6 +2814,13 @@ public final class CraftServer implements Server {
|
@@ -2815,6 +2816,13 @@ public final class CraftServer implements Server {
|
||||||
return CraftServer.this.console.paperConfigurations.createLegacyObject(CraftServer.this.console);
|
return CraftServer.this.console.paperConfigurations.createLegacyObject(CraftServer.this.console);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -261,10 +261,10 @@ index 1ea3012995c738c67b31e997c138f824f9e69ba1..8ed00a650b712cbf4bc8796165a539d7
|
|||||||
this.enableStatus = this.get("enable-status", true);
|
this.enableStatus = this.get("enable-status", true);
|
||||||
this.hideOnlinePlayers = this.get("hide-online-players", false);
|
this.hideOnlinePlayers = this.get("hide-online-players", false);
|
||||||
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 7ab657fba87964db3dc7d6b4ba2d7f635e9f1f17..75290e5f555f1401b1b6904e8a44c97332bbd01f 100644
|
index bb5ec38711f369ffcbd184b4e144bc0d8d576013..5df6fd278a6555e483ea4ebc4e9625907585f77f 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
|
||||||
@@ -347,7 +347,7 @@ public final class CraftServer implements Server {
|
@@ -349,7 +349,7 @@ public final class CraftServer implements Server {
|
||||||
|
|
||||||
this.configuration = YamlConfiguration.loadConfiguration(this.getConfigFile());
|
this.configuration = YamlConfiguration.loadConfiguration(this.getConfigFile());
|
||||||
this.configuration.options().copyDefaults(true);
|
this.configuration.options().copyDefaults(true);
|
||||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Add permission to bypass reducedDebugInfo gamerule
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
index c27e455321951e76e4818fec0e64301f5620dbf6..7bfba4d638cd42cdd98a22d87effe9a3be005315 100644
|
index ff56981a03b55f9ee1ec8ad36adaf9849b2c914b..b22b86d7f226e0e24d6be27ea33ec9d690f8f238 100644
|
||||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
@@ -275,7 +275,7 @@ public abstract class PlayerList {
|
@@ -275,7 +275,7 @@ public abstract class PlayerList {
|
||||||
@@ -10,10 +10,10 @@ Subject: [PATCH] Various Optimizations
|
|||||||
0011 - Swaps the predicate order of collision (Akarin)
|
0011 - Swaps the predicate order of collision (Akarin)
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index f31f4ecf8fb07f6cf01eea0aa14f5d454a4ce2a3..599d0bcb737c14671387dd5e6b0e733c8d9fbf20 100644
|
index e71eca3ddbbeb3168dd73433b6d6ffe9f6755f77..f8be2d9d454965257de55d2aa572016115d1b346 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -1992,8 +1992,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -1993,8 +1993,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
public void playerTouch(Player player) {}
|
public void playerTouch(Player player) {}
|
||||||
|
|
||||||
public void push(Entity entity) {
|
public void push(Entity entity) {
|
||||||
@@ -24,7 +24,7 @@ index f31f4ecf8fb07f6cf01eea0aa14f5d454a4ce2a3..599d0bcb737c14671387dd5e6b0e733c
|
|||||||
if (this.level.paperConfig().collisions.onlyPlayersCollide && !(entity instanceof ServerPlayer || this instanceof ServerPlayer)) return; // Paper
|
if (this.level.paperConfig().collisions.onlyPlayersCollide && !(entity instanceof ServerPlayer || this instanceof ServerPlayer)) return; // Paper
|
||||||
double d0 = entity.getX() - this.getX();
|
double d0 = entity.getX() - this.getX();
|
||||||
double d1 = entity.getZ() - this.getZ();
|
double d1 = entity.getZ() - this.getZ();
|
||||||
@@ -2022,7 +2023,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -2023,7 +2024,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -103,7 +103,7 @@ index 8f911f589bf04902e38e2c625d84ba0c47cbd9ee..b15de37a06c3efb1c4bc790ccb23ebff
|
|||||||
if (packet == null || this.processedDisconnect) { // Spigot
|
if (packet == null || this.processedDisconnect) { // Spigot
|
||||||
return;
|
return;
|
||||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
index 7bfba4d638cd42cdd98a22d87effe9a3be005315..f89d66d65b39324011718068840295bb77d2a3e2 100644
|
index b22b86d7f226e0e24d6be27ea33ec9d690f8f238..022da50912d357581b2132cf57e1a767e436022c 100644
|
||||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
@@ -1464,7 +1464,7 @@ public abstract class PlayerList {
|
@@ -1464,7 +1464,7 @@ public abstract class PlayerList {
|
||||||
@@ -3,6 +3,8 @@ From: IPECTER <ipectert@gmail.com>
|
|||||||
Date: Wed, 10 May 2023 13:32:42 +0900
|
Date: Wed, 10 May 2023 13:32:42 +0900
|
||||||
Subject: [PATCH] Implement FerriteCore
|
Subject: [PATCH] Implement FerriteCore
|
||||||
|
|
||||||
|
Original: malte0811/FerriteCore
|
||||||
|
Copyright (C) 2023 malte0811
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
|
diff --git a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
|
||||||
index bee42ce7c1cb0f5ebd4890c02bc9c5dd727f7fd6..478802cedeef5166bf5662187038d1439be6c242 100644
|
index bee42ce7c1cb0f5ebd4890c02bc9c5dd727f7fd6..478802cedeef5166bf5662187038d1439be6c242 100644
|
||||||
22
patches/server/0038-Let-Me-Despawn-Configuration.patch
Normal file
22
patches/server/0038-Let-Me-Despawn-Configuration.patch
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: IPECTER <ipectert@gmail.com>
|
||||||
|
Date: Thu, 18 May 2023 16:21:37 +0900
|
||||||
|
Subject: [PATCH] Let Me Despawn Configuration
|
||||||
|
|
||||||
|
|
||||||
|
diff --git a/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java b/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java
|
||||||
|
index a1b55bb5431d1712fc06da0cf06857a986efeea0..116384c1fe27a868bcbe1d21f0b2723c73b9170c 100644
|
||||||
|
--- a/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java
|
||||||
|
+++ b/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java
|
||||||
|
@@ -131,4 +131,11 @@ public class LevelConfigurations extends ConfigurationPart {
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+ public LetMeDespawn letMeDespawn;
|
||||||
|
+ public class LetMeDespawn extends ConfigurationPart {
|
||||||
|
+
|
||||||
|
+ public boolean enabled = false;
|
||||||
|
+
|
||||||
|
+ }
|
||||||
|
}
|
||||||
74
patches/server/0039-Implement-Let-Me-Despawn.patch
Normal file
74
patches/server/0039-Implement-Let-Me-Despawn.patch
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: IPECTER <ipectert@gmail.com>
|
||||||
|
Date: Thu, 18 May 2023 16:42:40 +0900
|
||||||
|
Subject: [PATCH] Implement Let Me Despawn
|
||||||
|
|
||||||
|
Original: frikinjay/let-me-despawn
|
||||||
|
Copyright (C) 2023 frikinjay
|
||||||
|
|
||||||
|
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||||
|
index 3a365d7efd439cb8ddb99381bd714fb48896f4d2..b6d27332eb151bdf408909b241c493da54841c8e 100644
|
||||||
|
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
||||||
|
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||||
|
@@ -885,7 +885,7 @@ public abstract class Mob extends LivingEntity implements Targeting {
|
||||||
|
public void checkDespawn() {
|
||||||
|
if (this.level.getDifficulty() == Difficulty.PEACEFUL && this.shouldDespawnInPeaceful()) {
|
||||||
|
this.discard();
|
||||||
|
- } else if (!this.isPersistenceRequired() && !this.requiresCustomPersistence()) {
|
||||||
|
+ } else if ((this.level.plazmaLevelConfiguration().letMeDespawn.enabled || !this.isPersistenceRequired()) && !this.requiresCustomPersistence()) {
|
||||||
|
// Paper start - optimise checkDespawn
|
||||||
|
Player entityhuman = this.level.findNearbyPlayer(this, level.paperConfig().entities.spawning.despawnRanges.get(this.getType().getCategory()).hard() + 1, EntitySelector.PLAYER_AFFECTS_SPAWNING); // Paper
|
||||||
|
if (entityhuman == null) {
|
||||||
|
@@ -899,14 +899,14 @@ public abstract class Mob extends LivingEntity implements Targeting {
|
||||||
|
int j = i * i;
|
||||||
|
|
||||||
|
if (d0 > (double) j && this.removeWhenFarAway(d0)) {
|
||||||
|
- this.discard();
|
||||||
|
+ this.dropEquipmentOnDespawn(); this.discard(); // Plazma - Let Me Despawn
|
||||||
|
}
|
||||||
|
|
||||||
|
int k = this.level.paperConfig().entities.spawning.despawnRanges.get(this.getType().getCategory()).soft(); // Paper - custom despawn distances
|
||||||
|
int l = k * k;
|
||||||
|
|
||||||
|
if (this.noActionTime > 600 && this.random.nextInt(800) == 0 && d0 > (double) l && this.removeWhenFarAway(d0)) {
|
||||||
|
- this.discard();
|
||||||
|
+ this.dropEquipmentOnDespawn(); this.discard(); // Plazma - Let Me Despawn
|
||||||
|
} else if (d0 < (double) l) {
|
||||||
|
this.noActionTime = 0;
|
||||||
|
}
|
||||||
|
@@ -917,6 +917,19 @@ public abstract class Mob extends LivingEntity implements Targeting {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
+ // Plazma start - Let Me Despawn
|
||||||
|
+ private void dropEquipmentOnDespawn() {
|
||||||
|
+ if (!this.level.plazmaLevelConfiguration().letMeDespawn.dropPickedUpItem()) return;
|
||||||
|
+ for (EquipmentSlot equipmentSlot : EquipmentSlot.values()) {
|
||||||
|
+ ItemStack itemStack = this.getItemBySlot(equipmentSlot);
|
||||||
|
+ if (!itemStack.isEmpty() && !EnchantmentHelper.hasVanishingCurse(itemStack)) {
|
||||||
|
+ this.spawnAtLocation(itemStack);
|
||||||
|
+ this.setItemSlot(equipmentSlot, ItemStack.EMPTY);
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ // Plazma end
|
||||||
|
+
|
||||||
|
@Override
|
||||||
|
protected final void serverAiStep() {
|
||||||
|
++this.noActionTime;
|
||||||
|
diff --git a/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java b/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java
|
||||||
|
index 116384c1fe27a868bcbe1d21f0b2723c73b9170c..97ffcd1c0e50ab21756404a483fa8d1f4b6579b1 100644
|
||||||
|
--- a/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java
|
||||||
|
+++ b/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java
|
||||||
|
@@ -136,6 +136,11 @@ public class LevelConfigurations extends ConfigurationPart {
|
||||||
|
public class LetMeDespawn extends ConfigurationPart {
|
||||||
|
|
||||||
|
public boolean enabled = false;
|
||||||
|
+ boolean dropPickedUpItem = true;
|
||||||
|
+
|
||||||
|
+ public boolean dropPickedUpItem() {
|
||||||
|
+ return enabled && dropPickedUpItem;
|
||||||
|
+ }
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
1235
patches/server/0040-Reduce-allocations.patch
Normal file
1235
patches/server/0040-Reduce-allocations.patch
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user