Drop projectile despawn rates patch in favor of pufferfish's

Fixes elBukkit/MagicPlugin#1042
Fixes elBukkit/MagicPlugin#816
This commit is contained in:
BillyGalbreath
2022-06-13 10:46:27 -05:00
parent c5dbf9cf10
commit 146750b2de
193 changed files with 978 additions and 1244 deletions

View File

@@ -5,7 +5,7 @@ Subject: [PATCH] Config for skipping night
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 156bac4f1c6d4577a424e773cb175a2f737b99cf..8696f8035508a26497a0715e47593d92f184337d 100644
index 5dff48719ff166990a3d5668a50d8531e59f092b..7f6488296b064f09d8b5f01e5950012158833183 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -625,7 +625,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -18,10 +18,10 @@ index 156bac4f1c6d4577a424e773cb175a2f737b99cf..8696f8035508a26497a0715e47593d92
j = this.levelData.getDayTime() + 24000L;
TimeSkipEvent event = new TimeSkipEvent(this.getWorld(), TimeSkipEvent.SkipReason.NIGHT_SKIP, (j - j % 24000L) - this.getDayTime());
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index 92ee2a41275c5b308b90c2e67b3802861d1f7438..f07c2a1a3cfa05e500e581297e663c7e00dc7496 100644
index 365863c0c97508bcff36df19999b9a8357ff2425..8bb0fb83ac3e8d75f469dbb9b617ef654eb3e946 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -348,6 +348,7 @@ public class PurpurWorldConfig {
@@ -351,6 +351,7 @@ public class PurpurWorldConfig {
public boolean playerFixStuckPortal = false;
public boolean creativeOnePunch = false;
public boolean playerSleepNearMonsters = false;
@@ -29,11 +29,11 @@ index 92ee2a41275c5b308b90c2e67b3802861d1f7438..f07c2a1a3cfa05e500e581297e663c7e
private void playerSettings() {
if (PurpurConfig.version < 19) {
boolean oldVal = getBoolean("gameplay-mechanics.player.idle-timeout.mods-target", idleTimeoutTargetPlayer);
@@ -368,6 +369,7 @@ public class PurpurWorldConfig {
@@ -371,6 +372,7 @@ public class PurpurWorldConfig {
playerFixStuckPortal = getBoolean("gameplay-mechanics.player.fix-stuck-in-portal", playerFixStuckPortal);
creativeOnePunch = getBoolean("gameplay-mechanics.player.one-punch-in-creative", creativeOnePunch);
playerSleepNearMonsters = getBoolean("gameplay-mechanics.player.sleep-ignore-nearby-mobs", playerSleepNearMonsters);
+ playersSkipNight = getBoolean("gameplay-mechanics.player.can-skip-night", playersSkipNight);
}
public int snowballDamage = -1;
private static boolean projectileDespawnRateSettingsMigrated = false;