Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 04:20:04 +01:00
Remove KeyedObject interface (#7680)
Dieser Commit ist enthalten in:
Ursprung
d3c102373f
Commit
7f47b9b7f8
@ -7,7 +7,7 @@ Loads each yml file for early init too so it can be used for early options
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperCommand.java b/src/main/java/com/destroystokyo/paper/PaperCommand.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..bee2fa2bfbb61209381f24ed6508d3d1c73a344a
|
||||
index 0000000000000000000000000000000000000000..a7182a4c64980aa19b8493ac9c2bb762603e615b
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperCommand.java
|
||||
@@ -0,0 +1,285 @@
|
||||
@ -220,7 +220,7 @@ index 0000000000000000000000000000000000000000..bee2fa2bfbb61209381f24ed6508d3d1
|
||||
+ ServerChunkCache chunkProviderServer = world.getChunkSource();
|
||||
+
|
||||
+ world.getAllEntities().forEach(e -> {
|
||||
+ ResourceLocation key = new ResourceLocation(""); // TODO: update in next patch
|
||||
+ ResourceLocation key = EntityType.getKey(e.getType());
|
||||
+
|
||||
+ MutablePair<Integer, Map<ChunkPos, Integer>> info = list.computeIfAbsent(key, k -> MutablePair.of(0, Maps.newHashMap()));
|
||||
+ ChunkPos chunk = e.chunkPosition();
|
||||
|
@ -1,124 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Wed, 4 Jul 2018 01:40:13 -0400
|
||||
Subject: [PATCH] Add MinecraftKey Information to Objects
|
||||
|
||||
Stores the reference to the objects respective MinecraftKey
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperCommand.java b/src/main/java/com/destroystokyo/paper/PaperCommand.java
|
||||
index bee2fa2bfbb61209381f24ed6508d3d1c73a344a..1fa190e098079522e0fe3593fa261c1b7ad4e24b 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperCommand.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperCommand.java
|
||||
@@ -207,7 +207,7 @@ public class PaperCommand extends Command {
|
||||
ServerChunkCache chunkProviderServer = world.getChunkSource();
|
||||
|
||||
world.getAllEntities().forEach(e -> {
|
||||
- ResourceLocation key = new ResourceLocation(""); // TODO: update in next patch
|
||||
+ ResourceLocation key = e.getMinecraftKey();
|
||||
|
||||
MutablePair<Integer, Map<ChunkPos, Integer>> info = list.computeIfAbsent(key, k -> MutablePair.of(0, Maps.newHashMap()));
|
||||
ChunkPos chunk = e.chunkPosition();
|
||||
diff --git a/src/main/java/io/papermc/paper/util/KeyedObject.java b/src/main/java/io/papermc/paper/util/KeyedObject.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..9f0c7fd903f085e70db1785fb8bcdb5456e6ca51
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/io/papermc/paper/util/KeyedObject.java
|
||||
@@ -0,0 +1,11 @@
|
||||
+package io.papermc.paper.util;
|
||||
+
|
||||
+import net.minecraft.resources.ResourceLocation;
|
||||
+
|
||||
+public interface KeyedObject {
|
||||
+ ResourceLocation getMinecraftKey();
|
||||
+ default String getMinecraftKeyString() {
|
||||
+ ResourceLocation key = getMinecraftKey();
|
||||
+ return key != null ? key.toString() : null;
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index e778f4da8b3e33b6fc9bbe21a7cbc1f185130e69..e191f080e781473481712e27763ab80c04fe60ab 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -148,7 +148,7 @@ import org.bukkit.event.player.PlayerTeleportEvent;
|
||||
import org.bukkit.plugin.PluginManager;
|
||||
// CraftBukkit end
|
||||
|
||||
-public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
+public abstract class Entity implements Nameable, EntityAccess, CommandSource, io.papermc.paper.util.KeyedObject { // Paper
|
||||
|
||||
// CraftBukkit start
|
||||
private static final int CURRENT_LEVEL = 2;
|
||||
@@ -1968,12 +1968,32 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
return true;
|
||||
}
|
||||
|
||||
+ // Paper start
|
||||
+ private ResourceLocation entityKey;
|
||||
+ private String entityKeyString;
|
||||
+
|
||||
+ @Override
|
||||
+ public ResourceLocation getMinecraftKey() {
|
||||
+ if (entityKey == null) {
|
||||
+ this.entityKey = EntityType.getKey(this.getType());
|
||||
+ this.entityKeyString = this.entityKey != null ? this.entityKey.toString() : null;
|
||||
+ }
|
||||
+ return entityKey;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public String getMinecraftKeyString() {
|
||||
+ getMinecraftKey(); // Try to load if it doesn't exists. see: https://github.com/PaperMC/Paper/issues/1280
|
||||
+ return entityKeyString;
|
||||
+ }
|
||||
+
|
||||
@Nullable
|
||||
public final String getEncodeId() {
|
||||
EntityType<?> entitytypes = this.getType();
|
||||
ResourceLocation minecraftkey = EntityType.getKey(entitytypes);
|
||||
|
||||
- return entitytypes.canSerialize() && minecraftkey != null ? minecraftkey.toString() : null;
|
||||
+ return entitytypes != null && entitytypes.canSerialize() ? getMinecraftKeyString() : null;
|
||||
+ // Paper end
|
||||
}
|
||||
|
||||
protected abstract void readAdditionalSaveData(CompoundTag nbt);
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
|
||||
index dec38e58e30c84887e9d29436c0f76c70c0a627d..53a8e9a63b2ea5f698acbd80b2eca9e3e3cfedb8 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
|
||||
@@ -23,7 +23,7 @@ import org.bukkit.inventory.InventoryHolder;
|
||||
|
||||
import org.spigotmc.CustomTimingsHandler; // Spigot
|
||||
|
||||
-public abstract class BlockEntity {
|
||||
+public abstract class BlockEntity implements io.papermc.paper.util.KeyedObject { // Paper
|
||||
|
||||
public CustomTimingsHandler tickTimer = org.bukkit.craftbukkit.SpigotTimings.getTileEntityTimings(this); // Spigot
|
||||
// CraftBukkit start - data containers
|
||||
@@ -48,6 +48,26 @@ public abstract class BlockEntity {
|
||||
return new BlockPos(nbt.getInt("x"), nbt.getInt("y"), nbt.getInt("z"));
|
||||
}
|
||||
|
||||
+ // Paper start
|
||||
+ private String tileEntityKeyString = null;
|
||||
+ private ResourceLocation tileEntityKey = null;
|
||||
+
|
||||
+ @Override
|
||||
+ public ResourceLocation getMinecraftKey() {
|
||||
+ if (tileEntityKey == null) {
|
||||
+ tileEntityKey = BlockEntityType.getKey(this.type);
|
||||
+ tileEntityKeyString = tileEntityKey != null ? tileEntityKey.toString() : null;
|
||||
+ }
|
||||
+ return tileEntityKey;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public String getMinecraftKeyString() {
|
||||
+ getMinecraftKey(); // Try to load if it doesn't exists.
|
||||
+ return tileEntityKeyString;
|
||||
+ }
|
||||
+ // Paper end
|
||||
+
|
||||
@Nullable
|
||||
public Level getLevel() {
|
||||
return this.level;
|
@ -1405,7 +1405,7 @@ index be9a29f01d59584a1492d925248f0947610ce9d0..bfec1beb0af39e2af6be7c6423bf1eaa
|
||||
|
||||
public UserWhiteList getWhiteList() {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index e191f080e781473481712e27763ab80c04fe60ab..04692fe4e7f2107ffc8c48cebdf88e18e58f4ce9 100644
|
||||
index e778f4da8b3e33b6fc9bbe21a7cbc1f185130e69..55ff800e5882841d5512901c883e308c9426e5de 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -128,7 +128,6 @@ import org.bukkit.craftbukkit.event.CraftPortalEvent;
|
||||
@ -1416,7 +1416,7 @@ index e191f080e781473481712e27763ab80c04fe60ab..04692fe4e7f2107ffc8c48cebdf88e18
|
||||
import org.bukkit.event.entity.EntityCombustByEntityEvent;
|
||||
import org.bukkit.event.hanging.HangingBreakByEntityEvent;
|
||||
import org.bukkit.event.vehicle.VehicleBlockCollisionEvent;
|
||||
@@ -295,7 +294,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i
|
||||
@@ -295,7 +294,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
public boolean lastDamageCancelled; // SPIGOT-5339, SPIGOT-6252, SPIGOT-6777: Keep track if the event was canceled
|
||||
public boolean persistentInvisibility = false;
|
||||
public BlockPos lastLavaContact;
|
||||
@ -1424,7 +1424,7 @@ index e191f080e781473481712e27763ab80c04fe60ab..04692fe4e7f2107ffc8c48cebdf88e18
|
||||
// Spigot start
|
||||
public final org.spigotmc.ActivationRange.ActivationType activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this);
|
||||
public final boolean defaultActivationState;
|
||||
@@ -744,7 +742,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i
|
||||
@@ -744,7 +742,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
}
|
||||
|
||||
public void move(MoverType movementType, Vec3 movement) {
|
||||
@ -1432,7 +1432,7 @@ index e191f080e781473481712e27763ab80c04fe60ab..04692fe4e7f2107ffc8c48cebdf88e18
|
||||
if (this.noPhysics) {
|
||||
this.setPos(this.getX() + movement.x, this.getY() + movement.y, this.getZ() + movement.z);
|
||||
} else {
|
||||
@@ -906,7 +903,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i
|
||||
@@ -906,7 +903,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
this.level.getProfiler().pop();
|
||||
}
|
||||
}
|
||||
@ -1642,7 +1642,7 @@ index e72f44910f7390da9e2d78c5bb8f14d5abf9562b..54125cf5957f8165551e077c47d02b7d
|
||||
private String descriptionId;
|
||||
@Nullable
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
|
||||
index 53a8e9a63b2ea5f698acbd80b2eca9e3e3cfedb8..a35e3f54cbec83e8c691b6f61d4e1ac1ece6156d 100644
|
||||
index dec38e58e30c84887e9d29436c0f76c70c0a627d..be08224c8107aab3e9a3645a20977dd14bfff782 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
|
||||
@@ -22,10 +22,12 @@ import org.bukkit.inventory.InventoryHolder;
|
||||
@ -1652,7 +1652,7 @@ index 53a8e9a63b2ea5f698acbd80b2eca9e3e3cfedb8..a35e3f54cbec83e8c691b6f61d4e1ac1
|
||||
+import co.aikar.timings.MinecraftTimings; // Paper
|
||||
+import co.aikar.timings.Timing; // Paper
|
||||
|
||||
public abstract class BlockEntity implements io.papermc.paper.util.KeyedObject { // Paper
|
||||
public abstract class BlockEntity {
|
||||
|
||||
- public CustomTimingsHandler tickTimer = org.bukkit.craftbukkit.SpigotTimings.getTileEntityTimings(this); // Spigot
|
||||
+ public Timing tickTimer = MinecraftTimings.getTileEntityTimings(this); // Paper
|
@ -7,7 +7,7 @@ Subject: [PATCH] Add command line option to load extra plugin jars not in the
|
||||
ex: java -jar paperclip.jar nogui -add-plugin=/path/to/plugin.jar -add-plugin=/path/to/another/plugin_jar.jar
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 0f1784e2cdde46f2213e540f1959a9c42d5db0c0..ba53a17a8730344882502995245171190b2de5ee 100644
|
||||
index fe5454f9e2507824c78cab3e31428608bf229ce1..d2c5221f7d0ed3cb04f160a9e77d9aba6ec206a4 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -398,10 +398,15 @@ public final class CraftServer implements Server {
|
||||
@ -66,7 +66,7 @@ index 0f1784e2cdde46f2213e540f1959a9c42d5db0c0..ba53a17a873034488250299524517119
|
||||
if (type == PluginLoadOrder.STARTUP) {
|
||||
this.helpMap.clear();
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
index 1039517ead86512a34e07b44b131981c1dea7b00..7e5fc58f43836edab3696b9644264434c5a95a2f 100644
|
||||
index aff3116c77277dcb4d3825d33f40a0b17258a0ba..ae4dc96da9e50ce8645e1b5da13e29085e916e98 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -142,6 +142,12 @@ public class Main {
|
@ -22,7 +22,7 @@ index ec3fb557fa31b153de20c4990066182a774dd489..5896b4e4646d722db5622a424fa26f42
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
|
||||
index 67fe1a436ca7b0069fabc3a1bfd0206babf07b8a..24192a91d9f5c890a316ec150d4aec84073cb61a 100644
|
||||
index 1fe9c591fdb1b8c3d457964a6877a91b56470016..34ee9c22ed5bca2406588a4b6a045bbc51c64920 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
|
||||
@@ -85,6 +85,10 @@ public class FishingHook extends Projectile {
|
@ -19,10 +19,10 @@ index 5896b4e4646d722db5622a424fa26f42d3f8d9ff..0a6e98ca5534430540044a32c280e568
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 04692fe4e7f2107ffc8c48cebdf88e18e58f4ce9..8a4f4582a6bd69016a36d611f9c4ac2262f7f3ec 100644
|
||||
index 55ff800e5882841d5512901c883e308c9426e5de..89a0fe6695f70c726b5a39b8990ed7e7ce451a92 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -1278,6 +1278,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i
|
||||
@@ -1278,6 +1278,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
return this.isInWater() || this.isInRain();
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ index d2c5221f7d0ed3cb04f160a9e77d9aba6ec206a4..bb304601b3795349dd45d94c53f082a3
|
||||
private final String bukkitVersion = Versioning.getBukkitVersion();
|
||||
private final Logger logger = Logger.getLogger("Minecraft");
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
index 52b13926ac40d61162b9da818fe6dc2c32cbae06..cd96196c8744596b95fd2a87bbbb9765f27c8be4 100644
|
||||
index ae4dc96da9e50ce8645e1b5da13e29085e916e98..a0ac6ba17a46bac4c5363a32e078ab89b260bac8 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -216,12 +216,25 @@ public class Main {
|
@ -47,7 +47,7 @@ index 6eaedfabf70b604705ad9a772a2e602c8590b500..97c2c1647fa12650e5963c7c1c746fec
|
||||
return false;
|
||||
}
|
||||
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 612de4e8c26fd41d300ac09eb59d1ceac248778e..71610fa70cdaf3c5a54250a5814809013a6d228e 100644
|
||||
index 1d4d3d6fc8affde249fb7cda8a3a488b6689130a..067513b240db88b818bd26d74c31fb5f8ee80f5d 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -175,6 +175,9 @@ public abstract class Player extends LivingEntity {
|
@ -25,10 +25,10 @@ index 0750cf27c1b2cac723d68d0e6c2204cbb5795571..0eb0229125fd027025b6b44dfceddf62
|
||||
|
||||
public void onTrackingEnd(Entity entity) {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 8a4f4582a6bd69016a36d611f9c4ac2262f7f3ec..a4cd7088113b60fd10e79359e5749fd15dacebe8 100644
|
||||
index 89a0fe6695f70c726b5a39b8990ed7e7ce451a92..ac540cacc1858697b54950e86e84efbff54e07a1 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -300,7 +300,27 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i
|
||||
@@ -300,7 +300,27 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
public long activatedTick = Integer.MIN_VALUE;
|
||||
public void inactiveTick() { }
|
||||
// Spigot end
|
||||
@ -56,7 +56,7 @@ index 8a4f4582a6bd69016a36d611f9c4ac2262f7f3ec..a4cd7088113b60fd10e79359e5749fd1
|
||||
public float getBukkitYaw() {
|
||||
return this.yRot;
|
||||
}
|
||||
@@ -1822,6 +1842,15 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i
|
||||
@@ -1822,6 +1842,15 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
this.bukkitEntity.storeBukkitValues(nbt);
|
||||
}
|
||||
// CraftBukkit end
|
||||
@ -72,7 +72,7 @@ index 8a4f4582a6bd69016a36d611f9c4ac2262f7f3ec..a4cd7088113b60fd10e79359e5749fd1
|
||||
return nbt;
|
||||
} catch (Throwable throwable) {
|
||||
CrashReport crashreport = CrashReport.forThrowable(throwable, "Saving entity NBT");
|
||||
@@ -1952,6 +1981,20 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i
|
||||
@@ -1952,6 +1981,20 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
@ -26,10 +26,10 @@ index 1cb128fb60636016db826ab3120d586346d88cec..8653fa072825c024e0fb620bdada4adc
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
|
||||
index a35e3f54cbec83e8c691b6f61d4e1ac1ece6156d..5c2ac7a1de96d9b4830955c2ff108c0881b5949b 100644
|
||||
index be08224c8107aab3e9a3645a20977dd14bfff782..c518704386f14cd033307dd976455c35760d7236 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
|
||||
@@ -233,7 +233,12 @@ public abstract class BlockEntity implements io.papermc.paper.util.KeyedObject {
|
||||
@@ -213,7 +213,12 @@ public abstract class BlockEntity {
|
||||
return minecraftkey + " // " + this.getClass().getCanonicalName();
|
||||
});
|
||||
if (this.level != null) {
|
@ -29,10 +29,10 @@ index 6dec1bb96d695f28aae6517e4d78249169d2351a..1b090f2e38a8857ef74403e1f3db8c2b
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index a4cd7088113b60fd10e79359e5749fd15dacebe8..d5307003e50251f3c52a7d395aaea07891c83bf8 100644
|
||||
index ac540cacc1858697b54950e86e84efbff54e07a1..e9b8d4add28a8ba11eae057740c0cf057e414da2 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -648,7 +648,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i
|
||||
@@ -648,7 +648,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
}
|
||||
|
||||
public void checkOutOfWorld() {
|
@ -19,7 +19,7 @@ index 5cae4a5caf9aba8c0e99f1cb6badc5e8374862c8..1a9b4b08ea906adbfa25c3963a463487
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 54416a9327ecb02627537306678122ae77da1239..b8942266379e5e513b1a814906db3b7f96c4284f 100644
|
||||
index 0eb0229125fd027025b6b44dfceddf626fc05399..9383ba7a6bc91fa73a235e3d94de8a5332ba2924 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -561,7 +561,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@ -19,7 +19,7 @@ index 1a9b4b08ea906adbfa25c3963a4634871d7ca2f6..ceb1602afb90fc0a23d6cc8d22fc85fa
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index b8942266379e5e513b1a814906db3b7f96c4284f..5c6ba29dfd786098528d7e118c3059c9d75a9c42 100644
|
||||
index 9383ba7a6bc91fa73a235e3d94de8a5332ba2924..e330fc198705ff2a4d8503f8710e6424afc9fbbf 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -585,7 +585,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@ -18,7 +18,7 @@ index bb2a788d3687977a0607b83150ad1bf1eb8803f2..42e69a8e3e93e2da9f4ee576900795b8
|
||||
+ public final int getViewDistance() { return this.getLevel().getChunkSource().chunkMap.viewDistance - 1; } // Paper - placeholder
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 5963fa56e7dcd61336a14fa1035c6c14143989ad..4c2aad1db5a4f82e5fa5c187cb58e8c675b4d697 100644
|
||||
index 305d5cb3581764b4d89c1f2220acb5786eb8faef..1b16d5d4823086d41f00bf0ccba4e21265f51886 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -1832,6 +1832,37 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
@ -23,10 +23,10 @@ index 1e3c39f0eeeb07f8d49e3651b18a152db9ccba7b..c248b66486044150c64eaddbef85fa66
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index d5307003e50251f3c52a7d395aaea07891c83bf8..413de81d30fe4ee6cf7aba88805e0e536f498565 100644
|
||||
index e9b8d4add28a8ba11eae057740c0cf057e414da2..d10ae40d5999e3ea24df55465248004a1b98a287 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -2937,7 +2937,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i
|
||||
@@ -2917,7 +2917,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
double d0 = DimensionType.getTeleportationScale(this.level.dimensionType(), destination.dimensionType());
|
||||
BlockPos blockposition = worldborder.clampToBounds(this.getX() * d0, this.getY(), this.getZ() * d0);
|
||||
// CraftBukkit start
|
@ -25,10 +25,10 @@ index ada624b5f58381122e59568c2087cf38fd2baf3e..5b55fce59db9ac3ab6030ebe8374c514
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 413de81d30fe4ee6cf7aba88805e0e536f498565..78fd9e84e24b163b4918ba0580abca18806f4988 100644
|
||||
index d10ae40d5999e3ea24df55465248004a1b98a287..68a1756e5a259fd1165d51835890127e0416dfd6 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -2577,6 +2577,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i
|
||||
@@ -2557,6 +2557,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
|
||||
@Nullable
|
||||
public Team getTeam() {
|
@ -203,7 +203,7 @@ index e88df908377450964ae5b6ff97ee97bd2f09c05f..ba70ac49222c517a38e20e86cee1fd38
|
||||
|
||||
static Map<Enchantment, Integer> getEnchantments(net.minecraft.world.item.ItemStack item) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||
index 39d2cd4acbce96cd7b9bd76bddf85b9b8729855a..51d37a8963a2f8f5381bf802e28e5dfcdcc27eaa 100644
|
||||
index 911a732065a908545ac6a7c10262980a59bd157e..3f34d3989df1fedf625dc2bd767794067d8a0c06 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||
@@ -6,6 +6,7 @@ import com.google.common.collect.ImmutableList;
|
@ -6,7 +6,7 @@ Subject: [PATCH] Add World Util Methods
|
||||
Methods that can be used for other patches to help improve logic.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 5c6ba29dfd786098528d7e118c3059c9d75a9c42..0507e0fdbc2aae621a8078a939ad10b5dab33f64 100644
|
||||
index e330fc198705ff2a4d8503f8710e6424afc9fbbf..780afec80f90473beb4ea585f514ea7727344b9f 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -209,7 +209,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@ -6,10 +6,10 @@ Subject: [PATCH] Use a Shared Random for Entities
|
||||
Reduces memory usage and provides ensures more randomness, Especially since a lot of garbage entity objects get created.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 78fd9e84e24b163b4918ba0580abca18806f4988..8e746391d6e3393a19e0f0cb3b28b6722df55510 100644
|
||||
index 68a1756e5a259fd1165d51835890127e0416dfd6..d400b612557cfc976e9644a740be94757e0d20bb 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -155,6 +155,21 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i
|
||||
@@ -155,6 +155,21 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
return tag.contains("Bukkit.updateLevel") && tag.getInt("Bukkit.updateLevel") >= level;
|
||||
}
|
||||
|
||||
@ -31,7 +31,7 @@ index 78fd9e84e24b163b4918ba0580abca18806f4988..8e746391d6e3393a19e0f0cb3b28b672
|
||||
private CraftEntity bukkitEntity;
|
||||
|
||||
public CraftEntity getBukkitEntity() {
|
||||
@@ -342,7 +357,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i
|
||||
@@ -342,7 +357,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
this.bb = Entity.INITIAL_AABB;
|
||||
this.stuckSpeedMultiplier = Vec3.ZERO;
|
||||
this.nextStep = 1.0F;
|
@ -22,7 +22,7 @@ index 71c672eafdce3547eaeb8e31fddcb142ad213094..aa8cd5965632626e4cbd4952acf9b349
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 0507e0fdbc2aae621a8078a939ad10b5dab33f64..04816aea9c3a9e999851694fc8485ead586520f8 100644
|
||||
index 780afec80f90473beb4ea585f514ea7727344b9f..f70b70eb0505aa1efb115e0e5a45a068244fc755 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -565,7 +565,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@ -18,7 +18,7 @@ index 400a59336300b189a1b86621b53817940f9a599e..16dbd40ab7394450fd97ced74954ae15
|
||||
this.profiler.push(() -> {
|
||||
return worldserver + " " + worldserver.dimension().location();
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 04816aea9c3a9e999851694fc8485ead586520f8..06c182e04e1e046d8e5623d5422a2732cbfec78b 100644
|
||||
index f70b70eb0505aa1efb115e0e5a45a068244fc755..93c967efbcdbc44f3729d7a70e90847212daa647 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -208,6 +208,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@ -515,10 +515,10 @@ index 0000000000000000000000000000000000000000..3377b86c337d0234bbb9b0349e4034a7
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 8e746391d6e3393a19e0f0cb3b28b6722df55510..6436ab09944ba1bec7f9ae011078898ac4d55f9e 100644
|
||||
index d400b612557cfc976e9644a740be94757e0d20bb..5a6aa26ee937a456ede56a9b18cf3bf58aba892d 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -170,6 +170,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i
|
||||
@@ -170,6 +170,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
};
|
||||
// Paper end
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add server-name parameter
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
index 1ea304aaf85ada7737f62248f7b8cd44c800505e..ff36d930a5fade32942a11f378d1c187f8f9f01a 100644
|
||||
index a0ac6ba17a46bac4c5363a32e078ab89b260bac8..b3d62affc6558d2c3082a75793ebd8b521eb1df6 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -149,6 +149,14 @@ public class Main {
|
@ -9,10 +9,10 @@ Subject: [PATCH] Fix Old Sign Conversion
|
||||
This causes Igloos and such to render broken signs. We fix this by ignoring sign conversion for Defined Structures
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
|
||||
index 5c2ac7a1de96d9b4830955c2ff108c0881b5949b..32a2fbf4a11a84d5a55e02d3ba21e6f4430379c0 100644
|
||||
index c518704386f14cd033307dd976455c35760d7236..148e79ae4e24fe16dbbb17550c3f258d4362c266 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
|
||||
@@ -32,6 +32,7 @@ public abstract class BlockEntity implements io.papermc.paper.util.KeyedObject {
|
||||
@@ -32,6 +32,7 @@ public abstract class BlockEntity {
|
||||
private static final CraftPersistentDataTypeRegistry DATA_TYPE_REGISTRY = new CraftPersistentDataTypeRegistry();
|
||||
public CraftPersistentDataContainer persistentDataContainer;
|
||||
// CraftBukkit end
|
@ -5,7 +5,7 @@ Subject: [PATCH] Don't lookup game profiles that have no UUID and no name
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/GameProfileCache.java b/src/main/java/net/minecraft/server/players/GameProfileCache.java
|
||||
index 981845707f47a674a912bf84509397a42b973e74..920a1ded577aa1c265137dd72a6f3d13a431d5c8 100644
|
||||
index fdf2557ed19c6ba9c64eddd2876b2434925dcf36..d8acbce8c2f0cc9a93fff044b25629021bf90f75 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/GameProfileCache.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/GameProfileCache.java
|
||||
@@ -101,7 +101,7 @@ public class GameProfileCache {
|
@ -21,7 +21,7 @@ index 081761cd2177bd3cea5a489a85e7088c46d12725..6f36c7a233ec0335d713523e87a28ba9
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 350a8194ef52242be6a70a16d2692e17216178fb..47d8ae1eb7edea51a81ddfaef3cd1c4b06ad12a3 100644
|
||||
index 66fa0c05da7b5ca6a9a89b45bd796b50afe55a39..2259f6d9be2390aaa8ffc43b3c2e37b0036b43ac 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -300,7 +300,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden Mehr anzeigen
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren