mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-30 14:33:56 +01:00
Fix accidental reversion of patches, oops
This commit is contained in:
parent
7f9b65035a
commit
a72509fbe1
@ -1,4 +1,4 @@
|
|||||||
From 7d25bb0ecc3aabf4ae91d312e4dbdd10639f862e Mon Sep 17 00:00:00 2001
|
From 3a8d4c91477d6a37245f9de40cc06933b187a23d Mon Sep 17 00:00:00 2001
|
||||||
From: Zach Brown <zach.brown@destroystokyo.com>
|
From: Zach Brown <zach.brown@destroystokyo.com>
|
||||||
Date: Mon, 29 Feb 2016 21:02:09 -0600
|
Date: Mon, 29 Feb 2016 21:02:09 -0600
|
||||||
Subject: [PATCH] Paper config files
|
Subject: [PATCH] Paper config files
|
||||||
@ -6,7 +6,7 @@ Subject: [PATCH] Paper config files
|
|||||||
|
|
||||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperCommand.java b/src/main/java/com/destroystokyo/paper/PaperCommand.java
|
diff --git a/src/main/java/com/destroystokyo/paper/PaperCommand.java b/src/main/java/com/destroystokyo/paper/PaperCommand.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 000000000..841edd010
|
index 000000000..b5f318c00
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/com/destroystokyo/paper/PaperCommand.java
|
+++ b/src/main/java/com/destroystokyo/paper/PaperCommand.java
|
||||||
@@ -0,0 +1,241 @@
|
@@ -0,0 +1,241 @@
|
||||||
@ -185,7 +185,7 @@ index 000000000..841edd010
|
|||||||
+ }
|
+ }
|
||||||
+ WorldServer world = ((CraftWorld) Bukkit.getWorld(worldName)).getHandle();
|
+ WorldServer world = ((CraftWorld) Bukkit.getWorld(worldName)).getHandle();
|
||||||
+
|
+
|
||||||
+ List<Entity> entities = world.globalEntityList;
|
+ Collection<Entity> entities = world.entitiesById.values();
|
||||||
+ entities.forEach(e -> {
|
+ entities.forEach(e -> {
|
||||||
+ MinecraftKey key = new MinecraftKey(""); // TODO: update in next patch
|
+ MinecraftKey key = new MinecraftKey(""); // TODO: update in next patch
|
||||||
+
|
+
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From 07c7a3d3c3d22facfc87700a4e70ba5a763336a5 Mon Sep 17 00:00:00 2001
|
From 1ef3557e3a967ef452810c2fb8424c6d07775689 Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Wed, 4 Jul 2018 01:40:13 -0400
|
Date: Wed, 4 Jul 2018 01:40:13 -0400
|
||||||
Subject: [PATCH] Add MinecraftKey Information to Objects
|
Subject: [PATCH] Add MinecraftKey Information to Objects
|
||||||
@ -6,12 +6,12 @@ Subject: [PATCH] Add MinecraftKey Information to Objects
|
|||||||
Stores the reference to the objects respective MinecraftKey
|
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
|
diff --git a/src/main/java/com/destroystokyo/paper/PaperCommand.java b/src/main/java/com/destroystokyo/paper/PaperCommand.java
|
||||||
index 841edd010..3354fdd60 100644
|
index b5f318c00..ce190d88d 100644
|
||||||
--- a/src/main/java/com/destroystokyo/paper/PaperCommand.java
|
--- a/src/main/java/com/destroystokyo/paper/PaperCommand.java
|
||||||
+++ b/src/main/java/com/destroystokyo/paper/PaperCommand.java
|
+++ b/src/main/java/com/destroystokyo/paper/PaperCommand.java
|
||||||
@@ -175,7 +175,7 @@ public class PaperCommand extends Command {
|
@@ -175,7 +175,7 @@ public class PaperCommand extends Command {
|
||||||
|
|
||||||
List<Entity> entities = world.globalEntityList;
|
Collection<Entity> entities = world.entitiesById.values();
|
||||||
entities.forEach(e -> {
|
entities.forEach(e -> {
|
||||||
- MinecraftKey key = new MinecraftKey(""); // TODO: update in next patch
|
- MinecraftKey key = new MinecraftKey(""); // TODO: update in next patch
|
||||||
+ MinecraftKey key = e.getMinecraftKey();
|
+ MinecraftKey key = e.getMinecraftKey();
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From 2c7c11780055e40e42eae8b6d6a5ab2f578bc92a Mon Sep 17 00:00:00 2001
|
From dab337d54a7e298d406f11354171e4adb12f51ad Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Sat, 7 Jan 2017 15:24:46 -0500
|
Date: Sat, 7 Jan 2017 15:24:46 -0500
|
||||||
Subject: [PATCH] Provide E/TE/Chunk count stat methods
|
Subject: [PATCH] Provide E/TE/Chunk count stat methods
|
||||||
@ -6,21 +6,8 @@ Subject: [PATCH] Provide E/TE/Chunk count stat methods
|
|||||||
Provides counts without the ineffeciency of using .getEntities().size()
|
Provides counts without the ineffeciency of using .getEntities().size()
|
||||||
which creates copy of the collections.
|
which creates copy of the collections.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
|
||||||
index ff75bb3c6..5ed0fbe5a 100644
|
|
||||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
|
||||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
|
||||||
@@ -51,7 +51,7 @@ import org.bukkit.event.weather.LightningStrikeEvent;
|
|
||||||
public class WorldServer extends World {
|
|
||||||
|
|
||||||
private static final Logger LOGGER = LogManager.getLogger();
|
|
||||||
- private final List<Entity> globalEntityList = Lists.newArrayList();
|
|
||||||
+ public final List<Entity> globalEntityList = Lists.newArrayList(); // Paper - private -> public
|
|
||||||
public final Int2ObjectMap<Entity> entitiesById = new Int2ObjectLinkedOpenHashMap();
|
|
||||||
private final Map<UUID, Entity> entitiesByUUID = Maps.newHashMap();
|
|
||||||
private final Queue<Entity> entitiesToAdd = Queues.newArrayDeque();
|
|
||||||
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 b8de76007..c79b0f42a 100644
|
index b8de76007..b3a77ec3c 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
|
||||||
@@ -265,6 +265,35 @@ public class CraftWorld implements World {
|
@@ -265,6 +265,35 @@ public class CraftWorld implements World {
|
||||||
@ -30,7 +17,7 @@ index b8de76007..c79b0f42a 100644
|
|||||||
+ // Paper start - Provide fast information methods
|
+ // Paper start - Provide fast information methods
|
||||||
+ // TODO review these changes
|
+ // TODO review these changes
|
||||||
+ public int getEntityCount() {
|
+ public int getEntityCount() {
|
||||||
+ return world.globalEntityList.size();
|
+ return world.entitiesById.size();
|
||||||
+ }
|
+ }
|
||||||
+ public int getTileEntityCount() {
|
+ public int getTileEntityCount() {
|
||||||
+ // We don't use the full world tile entity list, so we must iterate chunks
|
+ // We don't use the full world tile entity list, so we must iterate chunks
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From c7413121c172b4ff0a9da568223125f9f12bf5fb Mon Sep 17 00:00:00 2001
|
From e7ae681c20ded420a550293046b69554796a6f8e Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Sat, 28 Jul 2018 12:18:27 -0400
|
Date: Sat, 28 Jul 2018 12:18:27 -0400
|
||||||
Subject: [PATCH] Ignore Dead Entities in entityList iteration
|
Subject: [PATCH] Ignore Dead Entities in entityList iteration
|
||||||
@ -11,11 +11,11 @@ This will ensure that dead entities are skipped from iteration since
|
|||||||
they shouldn't of been in the list in the first place.
|
they shouldn't of been in the list in the first place.
|
||||||
|
|
||||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperCommand.java b/src/main/java/com/destroystokyo/paper/PaperCommand.java
|
diff --git a/src/main/java/com/destroystokyo/paper/PaperCommand.java b/src/main/java/com/destroystokyo/paper/PaperCommand.java
|
||||||
index 3354fdd60..ab0910454 100644
|
index ce190d88d..352a39dcb 100644
|
||||||
--- a/src/main/java/com/destroystokyo/paper/PaperCommand.java
|
--- a/src/main/java/com/destroystokyo/paper/PaperCommand.java
|
||||||
+++ b/src/main/java/com/destroystokyo/paper/PaperCommand.java
|
+++ b/src/main/java/com/destroystokyo/paper/PaperCommand.java
|
||||||
@@ -176,6 +176,7 @@ public class PaperCommand extends Command {
|
@@ -176,6 +176,7 @@ public class PaperCommand extends Command {
|
||||||
List<Entity> entities = world.globalEntityList;
|
Collection<Entity> entities = world.entitiesById.values();
|
||||||
entities.forEach(e -> {
|
entities.forEach(e -> {
|
||||||
MinecraftKey key = e.getMinecraftKey();
|
MinecraftKey key = e.getMinecraftKey();
|
||||||
+ if (e.shouldBeRemoved) return; // Paper
|
+ if (e.shouldBeRemoved) return; // Paper
|
||||||
@ -63,7 +63,7 @@ index f8e837fae..aac0146fd 100644
|
|||||||
private float av;
|
private float av;
|
||||||
private float aw;
|
private float aw;
|
||||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||||
index 402aac677..219c71ff6 100644
|
index 0a57f9f2b..d17c2eeb7 100644
|
||||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||||
@@ -843,6 +843,7 @@ public class WorldServer extends World {
|
@@ -843,6 +843,7 @@ public class WorldServer extends World {
|
||||||
@ -91,7 +91,7 @@ index 402aac677..219c71ff6 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
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 209e72648..3b0f9c86f 100644
|
index 19fa15d79..79a5adf48 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
|
||||||
@@ -864,6 +864,7 @@ public class CraftWorld implements World {
|
@@ -864,6 +864,7 @@ public class CraftWorld implements World {
|
||||||
|
Loading…
Reference in New Issue
Block a user