mirror of
https://github.com/BX-Team/DivineMC.git
synced 2025-12-21 15:59:23 +00:00
Updated Upstream (Purpur)
Upstream has released updates that appear to apply and compile correctly Purpur Changes: PurpurMC/Purpur@70a76c4 Updated Upstream (Paper) PurpurMC/Purpur@770fbe6 clean up damage type code for stonecutter and scissor patches
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
group = gq.bxteam.divinemc
|
group = space.bxteam.divinemc
|
||||||
|
|
||||||
version = 1.20.4-R0.1-SNAPSHOT
|
version = 1.20.4-R0.1-SNAPSHOT
|
||||||
purpurRef = 425889dc45858bac9b67ecbb4f41b16c1f5c6342
|
purpurRef = 770fbe66e095ee36ca4a5c0d3ea8b26a0eb5efab
|
||||||
|
|
||||||
org.gradle.caching = true
|
org.gradle.caching = true
|
||||||
org.gradle.parallel = true
|
org.gradle.parallel = true
|
||||||
|
|||||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Divine Configuration
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||||
index 529fb1beadefc79ce6bf5755d5223301b9933152..29a8f52d648b878e0f06176a20de5168f87d9897 100644
|
index be0e4c789a02d67160287c39cf6bdf8ef2229afc..5862bc702684eacaf7e20bd943d304c75e9f80af 100644
|
||||||
--- a/src/main/java/org/bukkit/Server.java
|
--- a/src/main/java/org/bukkit/Server.java
|
||||||
+++ b/src/main/java/org/bukkit/Server.java
|
+++ b/src/main/java/org/bukkit/Server.java
|
||||||
@@ -2210,6 +2210,13 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
@@ -2226,6 +2226,13 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||||
}
|
}
|
||||||
// Purpur end
|
// Purpur end
|
||||||
|
|
||||||
|
|||||||
@@ -185,10 +185,10 @@ index 7f07ffab0835d45d4d170fe171d7fa996d5913d9..fde3e7ef352474566e7259555a5f8ffb
|
|||||||
servergui.runFinalizers();
|
servergui.runFinalizers();
|
||||||
}
|
}
|
||||||
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 08b622c733e4275e70c984d938f4376dd0416b33..9d93b0e2d9ce9b761f7ed392952d3136cd65596a 100644
|
index 0a5867b01c1ebf21d9add1d4a2843d15b8e1acb7..1afacdb9fa77564ed55622c248e0579255ed1a07 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
|
||||||
@@ -264,7 +264,7 @@ import javax.annotation.Nullable; // Paper
|
@@ -266,7 +266,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 {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ Subject: [PATCH] Divine Configuration
|
|||||||
This is modified config file by PurpurMC
|
This is modified config file by PurpurMC
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||||
index 7fb9c88f7a1b68e5006e1b6509720ef00bb8bf79..2bb3735d650c5cb379f5a52cb9ae2e7d5df3803d 100644
|
index 3a57462e7945fd55e00448f6625d287d97cc93ec..94471492d8279daf402633d7a6a7924e4058cff6 100644
|
||||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||||
@@ -1,20 +1,15 @@
|
@@ -1,20 +1,15 @@
|
||||||
@@ -135,7 +135,7 @@ index bc797f1872f86b59a8aae3e70823249c9b8d8922..d2f483308d4a49fbd349e0008bbcdda2
|
|||||||
this.generator = gen;
|
this.generator = gen;
|
||||||
this.world = new CraftWorld((ServerLevel) this, gen, biomeProvider, env);
|
this.world = new CraftWorld((ServerLevel) this, gen, biomeProvider, env);
|
||||||
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 9d93b0e2d9ce9b761f7ed392952d3136cd65596a..71637661a07837c470b754190600adc64dfb83cb 100644
|
index 1afacdb9fa77564ed55622c248e0579255ed1a07..37d8ce3bb1678780b99dd2c3a02b608c782687e2 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
|
||||||
@@ -14,6 +14,7 @@ import com.mojang.brigadier.tree.CommandNode;
|
@@ -14,6 +14,7 @@ import com.mojang.brigadier.tree.CommandNode;
|
||||||
@@ -146,7 +146,7 @@ index 9d93b0e2d9ce9b761f7ed392952d3136cd65596a..71637661a07837c470b754190600adc6
|
|||||||
import it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap;
|
import it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap;
|
||||||
import java.awt.image.BufferedImage;
|
import java.awt.image.BufferedImage;
|
||||||
import java.io.ByteArrayOutputStream;
|
import java.io.ByteArrayOutputStream;
|
||||||
@@ -243,7 +244,6 @@ import org.bukkit.plugin.PluginManager;
|
@@ -245,7 +246,6 @@ import org.bukkit.plugin.PluginManager;
|
||||||
import org.bukkit.plugin.ServicesManager;
|
import org.bukkit.plugin.ServicesManager;
|
||||||
import org.bukkit.plugin.SimplePluginManager;
|
import org.bukkit.plugin.SimplePluginManager;
|
||||||
import org.bukkit.plugin.SimpleServicesManager;
|
import org.bukkit.plugin.SimpleServicesManager;
|
||||||
@@ -154,7 +154,7 @@ index 9d93b0e2d9ce9b761f7ed392952d3136cd65596a..71637661a07837c470b754190600adc6
|
|||||||
import org.bukkit.plugin.messaging.Messenger;
|
import org.bukkit.plugin.messaging.Messenger;
|
||||||
import org.bukkit.plugin.messaging.StandardMessenger;
|
import org.bukkit.plugin.messaging.StandardMessenger;
|
||||||
import org.bukkit.potion.Potion;
|
import org.bukkit.potion.Potion;
|
||||||
@@ -1057,6 +1057,7 @@ public final class CraftServer implements Server {
|
@@ -1069,6 +1069,7 @@ public final class CraftServer implements Server {
|
||||||
org.spigotmc.SpigotConfig.init((File) this.console.options.valueOf("spigot-settings")); // Spigot
|
org.spigotmc.SpigotConfig.init((File) this.console.options.valueOf("spigot-settings")); // Spigot
|
||||||
this.console.paperConfigurations.reloadConfigs(this.console);
|
this.console.paperConfigurations.reloadConfigs(this.console);
|
||||||
org.purpurmc.purpur.PurpurConfig.init((File) console.options.valueOf("purpur-settings")); // Purpur
|
org.purpurmc.purpur.PurpurConfig.init((File) console.options.valueOf("purpur-settings")); // Purpur
|
||||||
@@ -162,7 +162,7 @@ index 9d93b0e2d9ce9b761f7ed392952d3136cd65596a..71637661a07837c470b754190600adc6
|
|||||||
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))
|
||||||
@@ -1073,6 +1074,7 @@ public final class CraftServer implements Server {
|
@@ -1085,6 +1086,7 @@ public final class CraftServer implements Server {
|
||||||
}
|
}
|
||||||
world.spigotConfig.init(); // Spigot
|
world.spigotConfig.init(); // Spigot
|
||||||
world.purpurConfig.init(); // Purpur
|
world.purpurConfig.init(); // Purpur
|
||||||
@@ -170,7 +170,7 @@ index 9d93b0e2d9ce9b761f7ed392952d3136cd65596a..71637661a07837c470b754190600adc6
|
|||||||
}
|
}
|
||||||
|
|
||||||
Plugin[] pluginClone = pluginManager.getPlugins().clone(); // Paper
|
Plugin[] pluginClone = pluginManager.getPlugins().clone(); // Paper
|
||||||
@@ -1089,6 +1091,7 @@ public final class CraftServer implements Server {
|
@@ -1101,6 +1103,7 @@ public final class CraftServer implements Server {
|
||||||
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
|
||||||
org.purpurmc.purpur.PurpurConfig.registerCommands(); // Purpur
|
org.purpurmc.purpur.PurpurConfig.registerCommands(); // Purpur
|
||||||
@@ -178,7 +178,7 @@ index 9d93b0e2d9ce9b761f7ed392952d3136cd65596a..71637661a07837c470b754190600adc6
|
|||||||
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");
|
||||||
|
|
||||||
@@ -3084,6 +3087,13 @@ public final class CraftServer implements Server {
|
@@ -3096,6 +3099,13 @@ public final class CraftServer implements Server {
|
||||||
}
|
}
|
||||||
// Purpur end
|
// Purpur end
|
||||||
|
|
||||||
|
|||||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Fix entity serialization
|
|||||||
|
|
||||||
|
|
||||||
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 a83a6cd64345ff0d14e4dfad01566d8dc86c8416..fb2e589c1e7affbb9dfe07ccc5b80f7c96c8fce5 100644
|
index f6c9bff8ef4e370dcb351490294181282ad156e3..bc0abec15b6d8e1299a0d8c86265027e74c705d1 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
|
||||||
@@ -2339,15 +2339,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
@@ -2343,15 +2343,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -25,10 +25,10 @@ index a83a6cd64345ff0d14e4dfad01566d8dc86c8416..fb2e589c1e7affbb9dfe07ccc5b80f7c
|
|||||||
return this.isPassenger() ? false : this.saveAsPassenger(nbt);
|
return this.isPassenger() ? false : this.saveAsPassenger(nbt);
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
index dd9ae7cc51386550ec2c30698b55babd87615a9b..be100b5008015c97e13278b942f584fd7b6a5cd4 100644
|
index d5f642e4b1c1ede7e9d2dea072aa5f22c73b5c23..11110398ebd42e4049e36a90d5677bdd8a7d550c 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
@@ -508,8 +508,13 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
@@ -523,8 +523,13 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||||
Preconditions.checkNotNull(entity, "null cannot be serialized");
|
Preconditions.checkNotNull(entity, "null cannot be serialized");
|
||||||
Preconditions.checkArgument(entity instanceof org.bukkit.craftbukkit.entity.CraftEntity, "only CraftEntities can be serialized");
|
Preconditions.checkArgument(entity instanceof org.bukkit.craftbukkit.entity.CraftEntity, "only CraftEntities can be serialized");
|
||||||
|
|
||||||
|
|||||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Don't save Fireworks
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java b/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java b/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java
|
||||||
index b2f08889139dc447f7071f1c81456035bf8de31e..3c364f5c4cafba917edb605de017aca2445b3d6f 100644
|
index 7005b3a26e9b5d79064981a4a41bee21b65a9fc3..1dfe386460d1de7034b4e9416b120f07875261bb 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java
|
--- a/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java
|
+++ b/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java
|
||||||
@@ -357,4 +357,11 @@ public class FireworkRocketEntity extends Projectile implements ItemSupplier {
|
@@ -352,4 +352,11 @@ public class FireworkRocketEntity extends Projectile implements ItemSupplier {
|
||||||
public boolean isAttackable() {
|
public boolean isAttackable() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Fix MC-31819
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||||
index dfc73cd1b4fd9a2572a71b653e6e3d9133ec634c..2726f34d88aecf92f90396f760f6a333fbe5bebf 100644
|
index a334e2f83905be450514a9c26e945f6d5076060b..c92242c6acd9da906aa332c84ad8a2f6d98f6f63 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||||
@@ -1905,6 +1905,11 @@ public abstract class Player extends LivingEntity {
|
@@ -1906,6 +1906,11 @@ public abstract class Player extends LivingEntity {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void causeFoodExhaustion(float f, EntityExhaustionEvent.ExhaustionReason reason) {
|
public void causeFoodExhaustion(float f, EntityExhaustionEvent.ExhaustionReason reason) {
|
||||||
|
|||||||
@@ -7,10 +7,10 @@ Original project: Bloom-host/Petal
|
|||||||
Link: https://github.com/Bloom-host/Petal
|
Link: https://github.com/Bloom-host/Petal
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
index 3b1c09f8afe1a008df4b75b605a796bfb1bf3899..2170ee480cd1498219d2c5d87de7d176524d31a1 100644
|
index cc490788b18209d27b339a8557084049002cff09..34e80ae2a8cb4d2cebb7b5a739917aa19e8e1ca0 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
@@ -1037,20 +1037,19 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
@@ -1038,20 +1038,19 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (entity != null) {
|
if (entity != null) {
|
||||||
|
|||||||
@@ -1,25 +0,0 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
||||||
From: NONPLAYT <76615486+NONPLAYT@users.noreply.github.com>
|
|
||||||
Date: Sun, 11 Jun 2023 23:37:00 +0300
|
|
||||||
Subject: [PATCH] Do not drop items from Give command
|
|
||||||
|
|
||||||
Original project: starlis/empirecraft
|
|
||||||
Link: https://github.com/starlis/empirecraft/blob/master/patches/server/0050-Do-not-drop-items-from-Give-command.patch
|
|
||||||
This is a permanent change. Some players who have /give perms may abuse this to create lags on server
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/commands/GiveCommand.java b/src/main/java/net/minecraft/server/commands/GiveCommand.java
|
|
||||||
index 599172b994d75484f7c7e0ce6d3d3d771c1c44d0..3a92072ded969bbdfd0c57b665770b5ada47ab39 100644
|
|
||||||
--- a/src/main/java/net/minecraft/server/commands/GiveCommand.java
|
|
||||||
+++ b/src/main/java/net/minecraft/server/commands/GiveCommand.java
|
|
||||||
@@ -57,6 +57,11 @@ public class GiveCommand {
|
|
||||||
l -= i1;
|
|
||||||
ItemStack itemstack1 = item.createItemStack(i1, false);
|
|
||||||
boolean flag = entityplayer.getInventory().add(itemstack1);
|
|
||||||
+ // DivineMC start - EMC - never drop items
|
|
||||||
+ if (true) {
|
|
||||||
+ continue;
|
|
||||||
+ }
|
|
||||||
+ // DivineMC end
|
|
||||||
ItemEntity entityitem;
|
|
||||||
|
|
||||||
if (org.purpurmc.purpur.PurpurConfig.disableGiveCommandDrops) continue; // Purpur - add config option for toggling give command dropping
|
|
||||||
@@ -6,10 +6,10 @@ Subject: [PATCH] Fix MC-172801
|
|||||||
Original post on Mojira: https://bugs.mojang.com/browse/MC-172801
|
Original post on Mojira: https://bugs.mojang.com/browse/MC-172801
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
index 70d1481c42322f7307e83b2c7bb10aec663227c9..0718835e59470963be907b7f613a162942097eb5 100644
|
index 34e80ae2a8cb4d2cebb7b5a739917aa19e8e1ca0..c3fbd275f0471c64bf0c7e22d796f4ad8178de79 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
@@ -3074,7 +3074,13 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
@@ -3086,7 +3086,13 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected float getFlyingSpeed() {
|
protected float getFlyingSpeed() {
|
||||||
@@ -7,10 +7,10 @@ Original post on Mojira: https://bugs.mojang.com/browse/MC-2025
|
|||||||
Fix taken from Reddit: https://redd.it/8pgd4q
|
Fix taken from Reddit: https://redd.it/8pgd4q
|
||||||
|
|
||||||
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 fb2e589c1e7affbb9dfe07ccc5b80f7c96c8fce5..819505f651f86d32f279a7a4f2b7d4642959187e 100644
|
index bc0abec15b6d8e1299a0d8c86265027e74c705d1..b342801c8d336b51edccd84f15e6e1e8c7237e5d 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
|
||||||
@@ -2502,6 +2502,17 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
@@ -2506,6 +2506,17 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||||
nbttagcompound.putBoolean("Purpur.FireImmune", immuneToFire);
|
nbttagcompound.putBoolean("Purpur.FireImmune", immuneToFire);
|
||||||
}
|
}
|
||||||
// Purpur end
|
// Purpur end
|
||||||
@@ -28,7 +28,7 @@ index fb2e589c1e7affbb9dfe07ccc5b80f7c96c8fce5..819505f651f86d32f279a7a4f2b7d464
|
|||||||
return nbttagcompound;
|
return nbttagcompound;
|
||||||
} catch (Throwable throwable) {
|
} catch (Throwable throwable) {
|
||||||
CrashReport crashreport = CrashReport.forThrowable(throwable, "Saving entity NBT");
|
CrashReport crashreport = CrashReport.forThrowable(throwable, "Saving entity NBT");
|
||||||
@@ -2579,6 +2590,14 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
@@ -2583,6 +2594,14 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||||
this.reapplyPosition();
|
this.reapplyPosition();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -883,7 +883,7 @@ index 4aac1979cf57300825a999c876fcf24d3170e68e..76d81ecc29cd3483974b2c47048e10f5
|
|||||||
this.factory = factory;
|
this.factory = factory;
|
||||||
this.fixerUpper = dataFixer;
|
this.fixerUpper = dataFixer;
|
||||||
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 9f2d1e3bc19ef541550e4d088343d10ea641cd23..5a3366fd35d253066a826db595a5d4d7beab458e 100644
|
index 69f0c853ed7287c5a93b0a67e266255090e2a9ca..7f7f09e46225e8402a016e0dace034c26dac00bc 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
|
||||||
@@ -5,7 +5,7 @@ import com.google.common.base.Predicates;
|
@@ -5,7 +5,7 @@ import com.google.common.base.Predicates;
|
||||||
@@ -903,7 +903,7 @@ index 9f2d1e3bc19ef541550e4d088343d10ea641cd23..5a3366fd35d253066a826db595a5d4d7
|
|||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
import java.util.function.Predicate;
|
import java.util.function.Predicate;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
@@ -120,7 +119,6 @@ import org.bukkit.entity.TippedArrow;
|
@@ -124,7 +123,6 @@ import org.bukkit.entity.TippedArrow;
|
||||||
import org.bukkit.entity.Trident;
|
import org.bukkit.entity.Trident;
|
||||||
import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason;
|
import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason;
|
||||||
import org.bukkit.event.weather.LightningStrikeEvent;
|
import org.bukkit.event.weather.LightningStrikeEvent;
|
||||||
@@ -911,7 +911,7 @@ index 9f2d1e3bc19ef541550e4d088343d10ea641cd23..5a3366fd35d253066a826db595a5d4d7
|
|||||||
import org.bukkit.event.world.TimeSkipEvent;
|
import org.bukkit.event.world.TimeSkipEvent;
|
||||||
import org.bukkit.generator.BiomeProvider;
|
import org.bukkit.generator.BiomeProvider;
|
||||||
import org.bukkit.generator.BlockPopulator;
|
import org.bukkit.generator.BlockPopulator;
|
||||||
@@ -567,7 +565,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
@@ -573,7 +571,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||||
world.getChunk(x, z); // make sure we're at ticket level 32 or lower
|
world.getChunk(x, z); // make sure we're at ticket level 32 or lower
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,10 +6,10 @@ Subject: [PATCH] Optimize CraftServer.getWorld(UUID)
|
|||||||
Original code by MultiPaper - https://github.com/MultiPaper/MultiPaper
|
Original code by MultiPaper - https://github.com/MultiPaper/MultiPaper
|
||||||
|
|
||||||
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 71637661a07837c470b754190600adc64dfb83cb..b54f5918562b73e96ed25d708a10a47d3248d2cd 100644
|
index 37d8ce3bb1678780b99dd2c3a02b608c782687e2..e2e80af743a05f232361630ed9cd28cd797589d5 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
|
||||||
@@ -263,6 +263,8 @@ import net.md_5.bungee.api.chat.BaseComponent; // Spigot
|
@@ -265,6 +265,8 @@ import net.md_5.bungee.api.chat.BaseComponent; // Spigot
|
||||||
import javax.annotation.Nullable; // Paper
|
import javax.annotation.Nullable; // Paper
|
||||||
import javax.annotation.Nonnull; // Paper
|
import javax.annotation.Nonnull; // Paper
|
||||||
|
|
||||||
@@ -18,7 +18,7 @@ index 71637661a07837c470b754190600adc64dfb83cb..b54f5918562b73e96ed25d708a10a47d
|
|||||||
public final class CraftServer implements Server {
|
public final class CraftServer implements Server {
|
||||||
private final String serverName = "DivineMC"; // Paper // Pufferfish // Purpur // DivineMC
|
private final String serverName = "DivineMC"; // Paper // Pufferfish // Purpur // DivineMC
|
||||||
private final String serverVersion;
|
private final String serverVersion;
|
||||||
@@ -279,6 +281,7 @@ public final class CraftServer implements Server {
|
@@ -281,6 +283,7 @@ public final class CraftServer implements Server {
|
||||||
protected final DedicatedServer console;
|
protected final DedicatedServer console;
|
||||||
protected final DedicatedPlayerList playerList;
|
protected final DedicatedPlayerList playerList;
|
||||||
private final Map<String, World> worlds = new LinkedHashMap<String, World>();
|
private final Map<String, World> worlds = new LinkedHashMap<String, World>();
|
||||||
@@ -26,7 +26,7 @@ index 71637661a07837c470b754190600adc64dfb83cb..b54f5918562b73e96ed25d708a10a47d
|
|||||||
private final Map<Class<?>, Registry<?>> registries = new HashMap<>();
|
private final Map<Class<?>, Registry<?>> registries = new HashMap<>();
|
||||||
private YamlConfiguration configuration;
|
private YamlConfiguration configuration;
|
||||||
private YamlConfiguration commandsConfiguration;
|
private YamlConfiguration commandsConfiguration;
|
||||||
@@ -1469,6 +1472,7 @@ public final class CraftServer implements Server {
|
@@ -1481,6 +1484,7 @@ public final class CraftServer implements Server {
|
||||||
this.getLogger().log(Level.SEVERE, null, ex);
|
this.getLogger().log(Level.SEVERE, null, ex);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -34,7 +34,7 @@ index 71637661a07837c470b754190600adc64dfb83cb..b54f5918562b73e96ed25d708a10a47d
|
|||||||
this.worlds.remove(world.getName().toLowerCase(java.util.Locale.ENGLISH));
|
this.worlds.remove(world.getName().toLowerCase(java.util.Locale.ENGLISH));
|
||||||
this.console.removeLevel(handle);
|
this.console.removeLevel(handle);
|
||||||
return true;
|
return true;
|
||||||
@@ -1487,6 +1491,7 @@ public final class CraftServer implements Server {
|
@@ -1499,6 +1503,7 @@ public final class CraftServer implements Server {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public World getWorld(UUID uid) {
|
public World getWorld(UUID uid) {
|
||||||
@@ -42,7 +42,7 @@ index 71637661a07837c470b754190600adc64dfb83cb..b54f5918562b73e96ed25d708a10a47d
|
|||||||
for (World world : this.worlds.values()) {
|
for (World world : this.worlds.values()) {
|
||||||
if (world.getUID().equals(uid)) {
|
if (world.getUID().equals(uid)) {
|
||||||
return world;
|
return world;
|
||||||
@@ -1510,6 +1515,7 @@ public final class CraftServer implements Server {
|
@@ -1522,6 +1527,7 @@ public final class CraftServer implements Server {
|
||||||
System.out.println("World " + world.getName() + " is a duplicate of another world and has been prevented from loading. Please delete the uid.dat file from " + world.getName() + "'s world directory if you want to be able to load the duplicate world.");
|
System.out.println("World " + world.getName() + " is a duplicate of another world and has been prevented from loading. Please delete the uid.dat file from " + world.getName() + "'s world directory if you want to be able to load the duplicate world.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,18 +7,18 @@ Original code by CaffeineMC, licensed under LGPL v3
|
|||||||
You can find the original code on https://github.com/CaffeineMC/lithium-fabric (Yarn mappings)
|
You can find the original code on https://github.com/CaffeineMC/lithium-fabric (Yarn mappings)
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/GameRules.java b/src/main/java/net/minecraft/world/level/GameRules.java
|
diff --git a/src/main/java/net/minecraft/world/level/GameRules.java b/src/main/java/net/minecraft/world/level/GameRules.java
|
||||||
index a9be16e53a9df34af3495048aa9af7b1a3efea4a..0c360ca01bec47c738ef80d74986599af70373da 100644
|
index 4a340bd1f1859e43bb58e68aee4018fdb4ca7a5a..7f9345b195fe34129b28dd6c486abe9a1582364c 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/GameRules.java
|
--- a/src/main/java/net/minecraft/world/level/GameRules.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/GameRules.java
|
+++ b/src/main/java/net/minecraft/world/level/GameRules.java
|
||||||
@@ -27,6 +27,7 @@ import net.minecraft.network.protocol.game.ClientboundGameEventPacket;
|
@@ -28,6 +28,7 @@ import net.minecraft.server.MinecraftServer;
|
||||||
import net.minecraft.server.MinecraftServer;
|
import net.minecraft.server.level.ServerLevel;
|
||||||
import net.minecraft.server.level.ServerPlayer;
|
import net.minecraft.server.level.ServerPlayer;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
+import it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap;
|
+import it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap;
|
||||||
|
|
||||||
public class GameRules {
|
public class GameRules {
|
||||||
|
|
||||||
@@ -141,7 +142,7 @@ public class GameRules {
|
@@ -142,7 +143,7 @@ public class GameRules {
|
||||||
}
|
}
|
||||||
|
|
||||||
private GameRules(Map<GameRules.Key<?>, GameRules.Value<?>> rules) {
|
private GameRules(Map<GameRules.Key<?>, GameRules.Value<?>> rules) {
|
||||||
|
|||||||
@@ -7,10 +7,10 @@ Original code by CaffeineMC, licensed under LGPL v3
|
|||||||
You can find the original code on https://github.com/CaffeineMC/lithium-fabric (Yarn mappings)
|
You can find the original code on https://github.com/CaffeineMC/lithium-fabric (Yarn mappings)
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
index 594826f06fc142e3e1255d3eaef15ced9935e262..70d1481c42322f7307e83b2c7bb10aec663227c9 100644
|
index c3fbd275f0471c64bf0c7e22d796f4ad8178de79..c23b12b47d461cf9615ccc4004c6dd77202d213d 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
@@ -2602,6 +2602,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
@@ -2615,6 +2615,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void updateSwingTime() {
|
protected void updateSwingTime() {
|
||||||
@@ -18,7 +18,7 @@ index 594826f06fc142e3e1255d3eaef15ced9935e262..70d1481c42322f7307e83b2c7bb10aec
|
|||||||
int i = this.getCurrentSwingDuration();
|
int i = this.getCurrentSwingDuration();
|
||||||
|
|
||||||
if (this.swinging) {
|
if (this.swinging) {
|
||||||
@@ -3633,6 +3634,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
@@ -3652,6 +3653,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateFallFlying() {
|
private void updateFallFlying() {
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ Original code by RelativityMC, licensed under MIT
|
|||||||
You can find the original code on https://github.com/RelativityMC/VMP-fabric (Yarn mappings)
|
You can find the original code on https://github.com/RelativityMC/VMP-fabric (Yarn mappings)
|
||||||
|
|
||||||
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 8c605b522f0d452238d9aad8adc875c98235d63d..ac609d0483ca2f6b6eaf96ee48991f48bd774725 100644
|
index b342801c8d336b51edccd84f15e6e1e8c7237e5d..b8f43a8b588d44988ce1fe94aa8550b862093743 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
|
||||||
@@ -316,6 +316,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
@@ -316,6 +316,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||||
@@ -18,7 +18,7 @@ index 8c605b522f0d452238d9aad8adc875c98235d63d..ac609d0483ca2f6b6eaf96ee48991f48
|
|||||||
public boolean onGround;
|
public boolean onGround;
|
||||||
public boolean horizontalCollision;
|
public boolean horizontalCollision;
|
||||||
public boolean verticalCollision;
|
public boolean verticalCollision;
|
||||||
@@ -1107,6 +1108,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
@@ -1106,6 +1107,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||||
// Paper end - detailed watchdog information
|
// Paper end - detailed watchdog information
|
||||||
|
|
||||||
public void move(MoverType movementType, Vec3 movement) {
|
public void move(MoverType movementType, Vec3 movement) {
|
||||||
@@ -31,7 +31,7 @@ index 8c605b522f0d452238d9aad8adc875c98235d63d..ac609d0483ca2f6b6eaf96ee48991f48
|
|||||||
final Vec3 originalMovement = movement; // Paper - Expose pre-collision velocity
|
final Vec3 originalMovement = movement; // Paper - Expose pre-collision velocity
|
||||||
// Paper start - detailed watchdog information
|
// Paper start - detailed watchdog information
|
||||||
io.papermc.paper.util.TickThread.ensureTickThread("Cannot move an entity off-main");
|
io.papermc.paper.util.TickThread.ensureTickThread("Cannot move an entity off-main");
|
||||||
@@ -4146,6 +4153,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
@@ -4149,6 +4156,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||||
}
|
}
|
||||||
|
|
||||||
public final void setBoundingBox(AABB boundingBox) {
|
public final void setBoundingBox(AABB boundingBox) {
|
||||||
|
|||||||
Reference in New Issue
Block a user