13
0
geforkt von Mirrors/Paper

Updated Upstream (Bukkit/CraftBukkit)

Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
fe0cadf0 Add BlockShearEntityEvent for Dispensers shearing Sheep
90e5cca3 SPIGOT-4892: Allow to set the currently viewed page of a book on a lectern inventory
a30337f7 SPIGOT-4887: Villager level minimum is 1
d88d828c SPIGOT-4886: Villager type SNOWY should be named SNOW

CraftBukkit Changes:
6ceffb0d SPIGOT-4895: Bed doesn't explode in Nether and The End
ee881847 SPIGOT-4888: setSleepingIgnored resets the night even when there is no one in a bed
15e02b40 SPIGOT-4890: EntityDeathEvent fires twice when breaking an armor stand in survival mode
b38a3c33 Add BlockShearEntityEvent for Dispensers shearing Sheep
70ebefca SPIGOT-4891: LecternInventory.getType() should return InventoryType.LECTERN
0036d1b7 SPIGOT-4887: Villager level minimum is 1
Dieser Commit ist enthalten in:
Shane Freeder 2019-05-09 08:20:01 +01:00
Ursprung c0f92870ab
Commit a17bbb4560
9 geänderte Dateien mit 46 neuen und 33 gelöschten Zeilen

Datei anzeigen

@ -7,7 +7,7 @@ Not here to name and shame, only so server admins can be aware of which
plugins have and haven't been updated.
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
index 72c5501e..71da4a79 100644
index 72c5501e..9e96e12c 100644
--- a/src/main/java/org/bukkit/UnsafeValues.java
+++ b/src/main/java/org/bukkit/UnsafeValues.java
@@ -0,0 +0,0 @@ public interface UnsafeValues {
@ -16,7 +16,7 @@ index 72c5501e..71da4a79 100644
String getTimingsServerName();
+
+ static boolean isLegacyPlugin(org.bukkit.plugin.Plugin plugin) {
+ return !"1.13".equals(plugin.getDescription().getAPIVersion()) && !"1.14".equals(plugin.getDescription().getAPIVersion());
+ return !("1.13".equals(plugin.getDescription().getAPIVersion()));
+ }
// Paper end
}

Datei anzeigen

@ -6,12 +6,12 @@ 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 b5f318c00d..ce190d88d6 100644
index 841edd010..3354fdd60 100644
--- a/src/main/java/com/destroystokyo/paper/PaperCommand.java
+++ b/src/main/java/com/destroystokyo/paper/PaperCommand.java
@@ -0,0 +0,0 @@ public class PaperCommand extends Command {
Collection<Entity> entities = world.entitiesById.values();
List<Entity> entities = world.globalEntityList;
entities.forEach(e -> {
- MinecraftKey key = new MinecraftKey(""); // TODO: update in next patch
+ MinecraftKey key = e.getMinecraftKey();
@ -19,7 +19,7 @@ index b5f318c00d..ce190d88d6 100644
MutablePair<Integer, Map<ChunkCoordIntPair, Integer>> info = list.computeIfAbsent(key, k -> MutablePair.of(0, Maps.newHashMap()));
ChunkCoordIntPair chunk = new ChunkCoordIntPair(e.getChunkX(), e.getChunkZ());
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 77015bc06e..01e4863899 100644
index 77015bc06..01e486389 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -0,0 +0,0 @@ import org.bukkit.event.player.PlayerTeleportEvent;
@ -65,7 +65,7 @@ index 77015bc06e..01e4863899 100644
protected abstract void a(NBTTagCompound nbttagcompound);
diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java
index 3217a8ed18..c7fb8f513b 100644
index 3217a8ed1..c7fb8f513 100644
--- a/src/main/java/net/minecraft/server/EntityTypes.java
+++ b/src/main/java/net/minecraft/server/EntityTypes.java
@@ -0,0 +0,0 @@ public class EntityTypes<T extends Entity> {
@ -78,7 +78,7 @@ index 3217a8ed18..c7fb8f513b 100644
}
diff --git a/src/main/java/net/minecraft/server/KeyedObject.java b/src/main/java/net/minecraft/server/KeyedObject.java
new file mode 100644
index 0000000000..743142d030
index 000000000..743142d03
--- /dev/null
+++ b/src/main/java/net/minecraft/server/KeyedObject.java
@@ -0,0 +0,0 @@
@ -92,7 +92,7 @@ index 0000000000..743142d030
+ }
+}
diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
index 080fd819b6..77d77fcb8b 100644
index 080fd819b..77d77fcb8 100644
--- a/src/main/java/net/minecraft/server/TileEntity.java
+++ b/src/main/java/net/minecraft/server/TileEntity.java
@@ -0,0 +0,0 @@ import org.bukkit.inventory.InventoryHolder;

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Add source to PlayerExpChangeEvent
diff --git a/src/main/java/net/minecraft/server/EntityExperienceOrb.java b/src/main/java/net/minecraft/server/EntityExperienceOrb.java
index b20813be64..bfba08fb24 100644
index b20813be6..bfba08fb2 100644
--- a/src/main/java/net/minecraft/server/EntityExperienceOrb.java
+++ b/src/main/java/net/minecraft/server/EntityExperienceOrb.java
@@ -0,0 +0,0 @@ public class EntityExperienceOrb extends Entity {
@ -18,10 +18,10 @@ index b20813be64..bfba08fb24 100644
this.die();
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 1632969249..451d4f030c 100644
index e67b4cbac..0441afce9 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -0,0 +0,0 @@ import org.bukkit.entity.Projectile;
@@ -0,0 +0,0 @@ import org.bukkit.entity.Sheep;
import org.bukkit.entity.ThrownExpBottle;
import org.bukkit.entity.ThrownPotion;
import org.bukkit.entity.Vehicle;

Datei anzeigen

@ -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.
diff --git a/src/main/java/com/destroystokyo/paper/PaperCommand.java b/src/main/java/com/destroystokyo/paper/PaperCommand.java
index ce190d88d6..352a39dcb3 100644
index 3354fdd60..ab0910454 100644
--- a/src/main/java/com/destroystokyo/paper/PaperCommand.java
+++ b/src/main/java/com/destroystokyo/paper/PaperCommand.java
@@ -0,0 +0,0 @@ public class PaperCommand extends Command {
Collection<Entity> entities = world.entitiesById.values();
List<Entity> entities = world.globalEntityList;
entities.forEach(e -> {
MinecraftKey key = e.getMinecraftKey();
+ if (e.shouldBeRemoved) return; // Paper
@ -23,7 +23,7 @@ index ce190d88d6..352a39dcb3 100644
MutablePair<Integer, Map<ChunkCoordIntPair, Integer>> info = list.computeIfAbsent(key, k -> MutablePair.of(0, Maps.newHashMap()));
ChunkCoordIntPair chunk = new ChunkCoordIntPair(e.getChunkX(), e.getChunkZ());
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index d787a4ab30..d313b9b3ca 100644
index d787a4ab3..d313b9b3c 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -0,0 +0,0 @@ public class Chunk implements IChunkAccess {
@ -51,7 +51,7 @@ index d787a4ab30..d313b9b3ca 100644
if (oclass.isInstance(t0) && t0.getBoundingBox().c(axisalignedbb) && (predicate == null || predicate.test(t0))) { // Spigot - instance check
list.add(t0);
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index f8e837faec..aac0146fd2 100644
index f8e837fae..aac0146fd 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@ -63,7 +63,7 @@ index f8e837faec..aac0146fd2 100644
private float av;
private float aw;
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index d9f8223fec..fc04e736a4 100644
index 402aac677..219c71ff6 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -0,0 +0,0 @@ public class WorldServer extends World {
@ -91,7 +91,7 @@ index d9f8223fec..fc04e736a4 100644
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 19fa15d793..79a5adf482 100644
index 209e72648..3b0f9c86f 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -0,0 +0,0 @@ public class CraftWorld implements World {

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Inventory#removeItemAnySlot
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java
index 9fbedcede8..b7e08b55f9 100644
index 7e0a20d1d..c3516de7f 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java
@@ -0,0 +0,0 @@ public class CraftInventory implements Inventory {

Datei anzeigen

@ -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
new file mode 100644
index 0000000000..b5f318c00d
index 000000000..841edd010
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/PaperCommand.java
@@ -0,0 +0,0 @@
@ -185,7 +185,7 @@ index 0000000000..b5f318c00d
+ }
+ WorldServer world = ((CraftWorld) Bukkit.getWorld(worldName)).getHandle();
+
+ Collection<Entity> entities = world.entitiesById.values();
+ List<Entity> entities = world.globalEntityList;
+ entities.forEach(e -> {
+ MinecraftKey key = new MinecraftKey(""); // TODO: update in next patch
+
@ -253,7 +253,7 @@ index 0000000000..b5f318c00d
+}
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
new file mode 100644
index 0000000000..db79fe41b9
index 000000000..db79fe41b
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -0,0 +0,0 @@
@ -443,7 +443,7 @@ index 0000000000..db79fe41b9
+}
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
new file mode 100644
index 0000000000..a738657394
index 000000000..a73865739
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -0,0 +0,0 @@
@ -515,7 +515,7 @@ index 0000000000..a738657394
+ }
+}
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
index e1ba833f3e..b60956218d 100644
index e1ba833f3..b60956218 100644
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
@@ -0,0 +0,0 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
@ -535,7 +535,7 @@ index e1ba833f3e..b60956218d 100644
this.setSpawnAnimals(dedicatedserverproperties.spawnAnimals);
this.setSpawnNPCs(dedicatedserverproperties.spawnNpcs);
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index fd8397bd4d..77015bc06e 100644
index fd8397bd4..77015bc06 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener {
@ -552,7 +552,7 @@ index fd8397bd4d..77015bc06e 100644
public boolean impulse;
public int portalCooldown;
diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java
index ee43aa24d2..01d9ed69c5 100644
index ee43aa24d..01d9ed69c 100644
--- a/src/main/java/net/minecraft/server/EntityTypes.java
+++ b/src/main/java/net/minecraft/server/EntityTypes.java
@@ -0,0 +0,0 @@ import com.mojang.datafixers.DataFixUtils;
@ -575,7 +575,7 @@ index ee43aa24d2..01d9ed69c5 100644
+ // Paper end
}
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 84155573df..83fdea893c 100644
index 84155573d..83fdea893 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -0,0 +0,0 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
@ -596,7 +596,7 @@ index 84155573df..83fdea893c 100644
this.world = new CraftWorld((WorldServer) this, gen, env);
this.ticksPerAnimalSpawns = this.getServer().getTicksPerAnimalSpawns(); // CraftBukkit
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index be03fe24b8..5dc2bb1246 100644
index be03fe24b..5dc2bb124 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -0,0 +0,0 @@ public final class CraftServer implements Server {
@ -651,7 +651,7 @@ index be03fe24b8..5dc2bb1246 100644
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index e17d914185..f406464ef8 100644
index e17d91418..f406464ef 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -0,0 +0,0 @@ public class Main {
@ -670,7 +670,7 @@ index e17d914185..f406464ef8 100644
};
diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java
index 6bceeb120b..9a51c0ef7a 100644
index 6bceeb120..9a51c0ef7 100644
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java
+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java
@@ -0,0 +0,0 @@ public class SpigotWorldConfig

Datei anzeigen

@ -6,8 +6,21 @@ Subject: [PATCH] Provide E/TE/Chunk count stat methods
Provides counts without the ineffeciency of using .getEntities().size()
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
@@ -0,0 +0,0 @@ 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
index b8de760079..b3a77ec3c5 100644
index b8de76007..c79b0f42a 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -0,0 +0,0 @@ public class CraftWorld implements World {
@ -17,7 +30,7 @@ index b8de760079..b3a77ec3c5 100644
+ // Paper start - Provide fast information methods
+ // TODO review these changes
+ public int getEntityCount() {
+ return world.entitiesById.size();
+ return world.globalEntityList.size();
+ }
+ public int getTileEntityCount() {
+ // We don't use the full world tile entity list, so we must iterate chunks

@ -1 +1 @@
Subproject commit 91b0487aed3000a9db40120e8c7c5605c28d1d51
Subproject commit fe0cadf0559d68852de1122f4c5e31f9bd4d4cef

@ -1 +1 @@
Subproject commit d20328368cdc37b8b0ef563b97192e22a13126d1
Subproject commit 6ceffb0d2aa1d4118b70274c5b7603fb2e32ab35