Merge branch 'master' into pre/1.13
* master: Relookup Entity Save ID if was null during precache
Dieser Commit ist enthalten in:
Commit
857ed67709
@ -1,4 +1,4 @@
|
|||||||
From 98687afc6aeac6f87995e5b56eef3a7d35398cd8 Mon Sep 17 00:00:00 2001
|
From ebfddc6099547fa117ae7b4b508dd64f51d3c1cd 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
|
||||||
@ -19,7 +19,7 @@ index e8f7b7292d..7ff8e70b24 100644
|
|||||||
MutablePair<Integer, Map<ChunkCoordIntPair, Integer>> info = list.computeIfAbsent(key, k -> MutablePair.of(0, Maps.newHashMap()));
|
MutablePair<Integer, Map<ChunkCoordIntPair, Integer>> info = list.computeIfAbsent(key, k -> MutablePair.of(0, Maps.newHashMap()));
|
||||||
ChunkCoordIntPair chunk = new ChunkCoordIntPair(e.getChunkX(), e.getChunkZ());
|
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
|
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||||
index 29c7043c86..1a7d78a5c3 100644
|
index 29c7043c86..628fda8e7c 100644
|
||||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||||
@@ -45,7 +45,7 @@ import org.bukkit.event.entity.EntityPortalEvent;
|
@@ -45,7 +45,7 @@ import org.bukkit.event.entity.EntityPortalEvent;
|
||||||
@ -40,32 +40,26 @@ index 29c7043c86..1a7d78a5c3 100644
|
|||||||
private int id;
|
private int id;
|
||||||
public boolean j;
|
public boolean j;
|
||||||
public final List<Entity> passengers;
|
public final List<Entity> passengers;
|
||||||
@@ -197,6 +197,10 @@ public abstract class Entity implements INamableTileEntity, ICommandListener {
|
@@ -1781,12 +1781,29 @@ public abstract class Entity implements INamableTileEntity, ICommandListener {
|
||||||
} else {
|
|
||||||
this.defaultActivationState = false;
|
|
||||||
}
|
|
||||||
+ // Paper start
|
|
||||||
+ this.entityKey = EntityTypes.getName(entitytypes);
|
|
||||||
+ this.entityKeyString = this.entityKey != null ? this.entityKey.toString() : null;
|
|
||||||
+ // Paper end
|
|
||||||
// Spigot end
|
|
||||||
|
|
||||||
this.datawatcher = new DataWatcher(this);
|
|
||||||
@@ -1781,12 +1785,24 @@ public abstract class Entity implements INamableTileEntity, ICommandListener {
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
+ public final MinecraftKey entityKey;
|
+ private MinecraftKey entityKey;
|
||||||
+ public final String entityKeyString;
|
+ private String entityKeyString;
|
||||||
+
|
+
|
||||||
+ @Override
|
+ @Override
|
||||||
+ public MinecraftKey getMinecraftKey() {
|
+ public MinecraftKey getMinecraftKey() {
|
||||||
|
+ if (entityKey == null) {
|
||||||
|
+ this.entityKey = EntityTypes.getName(this.getEntityType());
|
||||||
|
+ this.entityKeyString = this.entityKey != null ? this.entityKey.toString() : null;
|
||||||
|
+ }
|
||||||
+ return entityKey;
|
+ return entityKey;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ @Override
|
+ @Override
|
||||||
+ public String getMinecraftKeyString() {
|
+ public String getMinecraftKeyString() {
|
||||||
|
+ getMinecraftKey(); // Try to load if it doesn't exists. see: https://github.com/PaperMC/Paper/issues/1280
|
||||||
+ return entityKeyString;
|
+ return entityKeyString;
|
||||||
+ }
|
+ }
|
||||||
@Nullable
|
@Nullable
|
||||||
@ -75,7 +69,7 @@ index 29c7043c86..1a7d78a5c3 100644
|
|||||||
-
|
-
|
||||||
- return entitytypes.a() && minecraftkey != null ? minecraftkey.toString() : null;
|
- return entitytypes.a() && minecraftkey != null ? minecraftkey.toString() : null;
|
||||||
+ EntityTypes type = this.getEntityType();
|
+ EntityTypes type = this.getEntityType();
|
||||||
+ return type != null && type.isPersistable() ? entityKeyString : null;
|
+ return type != null && type.isPersistable() ? getMinecraftKeyString() : null;
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -94,20 +88,21 @@ index 9a513b4e3a..fa268f3543 100644
|
|||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/KeyedObject.java b/src/main/java/net/minecraft/server/KeyedObject.java
|
diff --git a/src/main/java/net/minecraft/server/KeyedObject.java b/src/main/java/net/minecraft/server/KeyedObject.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000000..61c2b993c9
|
index 0000000000..743142d030
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/net/minecraft/server/KeyedObject.java
|
+++ b/src/main/java/net/minecraft/server/KeyedObject.java
|
||||||
@@ -0,0 +1,8 @@
|
@@ -0,0 +1,9 @@
|
||||||
+package net.minecraft.server;
|
+package net.minecraft.server;
|
||||||
+
|
+
|
||||||
+public interface KeyedObject {
|
+public interface KeyedObject {
|
||||||
+ MinecraftKey getMinecraftKey();
|
+ MinecraftKey getMinecraftKey();
|
||||||
+ default String getMinecraftKeyString() {
|
+ default String getMinecraftKeyString() {
|
||||||
+ return getMinecraftKey().toString();
|
+ MinecraftKey key = getMinecraftKey();
|
||||||
|
+ return key != null ? key.toString() : null;
|
||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
|
diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
|
||||||
index 8a0453245d..257dd1da9c 100644
|
index 8a0453245d..5ca7fef518 100644
|
||||||
--- a/src/main/java/net/minecraft/server/TileEntity.java
|
--- a/src/main/java/net/minecraft/server/TileEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/server/TileEntity.java
|
+++ b/src/main/java/net/minecraft/server/TileEntity.java
|
||||||
@@ -7,11 +7,11 @@ import org.apache.logging.log4j.Logger;
|
@@ -7,11 +7,11 @@ import org.apache.logging.log4j.Logger;
|
||||||
@ -115,7 +110,7 @@ index 8a0453245d..257dd1da9c 100644
|
|||||||
import org.bukkit.inventory.InventoryHolder; // CraftBukkit
|
import org.bukkit.inventory.InventoryHolder; // CraftBukkit
|
||||||
|
|
||||||
-public abstract class TileEntity {
|
-public abstract class TileEntity {
|
||||||
+public abstract class TileEntity implements KeyedObject {
|
+public abstract class TileEntity implements KeyedObject { // Paper
|
||||||
|
|
||||||
public CustomTimingsHandler tickTimer = org.bukkit.craftbukkit.SpigotTimings.getTileEntityTimings(this); // Spigot
|
public CustomTimingsHandler tickTimer = org.bukkit.craftbukkit.SpigotTimings.getTileEntityTimings(this); // Spigot
|
||||||
private static final Logger a = LogManager.getLogger();
|
private static final Logger a = LogManager.getLogger();
|
||||||
@ -124,25 +119,26 @@ index 8a0453245d..257dd1da9c 100644
|
|||||||
protected World world;
|
protected World world;
|
||||||
protected BlockPosition position;
|
protected BlockPosition position;
|
||||||
protected boolean d;
|
protected boolean d;
|
||||||
@@ -21,8 +21,25 @@ public abstract class TileEntity {
|
@@ -23,6 +23,26 @@ public abstract class TileEntity {
|
||||||
public TileEntity(TileEntityTypes<?> tileentitytypes) {
|
|
||||||
this.position = BlockPosition.ZERO;
|
|
||||||
this.e = tileentitytypes;
|
this.e = tileentitytypes;
|
||||||
+ // Paper start
|
|
||||||
+ this.tileEntityKey = TileEntityTypes.a(tileentitytypes);
|
|
||||||
+ this.tileEntityKeyString = tileEntityKey != null ? tileEntityKey.toString() : null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
+ public final MinecraftKey tileEntityKey;
|
+ // Paper start
|
||||||
+ public final String tileEntityKeyString;
|
+ private String tileEntityKeyString = null;
|
||||||
|
+ private MinecraftKey tileEntityKey = null;
|
||||||
+
|
+
|
||||||
+ @Override
|
+ @Override
|
||||||
+ public MinecraftKey getMinecraftKey() {
|
+ public MinecraftKey getMinecraftKey() {
|
||||||
|
+ if (tileEntityKey == null) {
|
||||||
|
+ tileEntityKey = TileEntityTypes.a(this.getTileEntityType());
|
||||||
|
+ tileEntityKeyString = tileEntityKey != null ? tileEntityKey.toString() : null;
|
||||||
|
+ }
|
||||||
+ return tileEntityKey;
|
+ return tileEntityKey;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ @Override
|
+ @Override
|
||||||
+ public String getMinecraftKeyString() {
|
+ public String getMinecraftKeyString() {
|
||||||
|
+ getMinecraftKey(); // Try to load if it doesn't exists.
|
||||||
+ return tileEntityKeyString;
|
+ return tileEntityKeyString;
|
||||||
+ }
|
+ }
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From 241415266671ef0d001deac110827cb2cd1e46bb Mon Sep 17 00:00:00 2001
|
From f4d51258d98a1bb3dbcb677a296fb9d132b6c159 Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Wed, 4 Jul 2018 02:10:36 -0400
|
Date: Wed, 4 Jul 2018 02:10:36 -0400
|
||||||
Subject: [PATCH] Store reference to current Chunk for Entity and Block
|
Subject: [PATCH] Store reference to current Chunk for Entity and Block
|
||||||
@ -8,7 +8,7 @@ This enables us a fast reference to the entities current chunk instead
|
|||||||
of having to look it up by hashmap lookups.
|
of having to look it up by hashmap lookups.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||||
index cd4fbee0c..7837f1024 100644
|
index cd4fbee0ca..7837f1024c 100644
|
||||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||||
@@ -33,7 +33,7 @@ public class Chunk implements IChunkAccess {
|
@@ -33,7 +33,7 @@ public class Chunk implements IChunkAccess {
|
||||||
@ -86,14 +86,13 @@ index cd4fbee0c..7837f1024 100644
|
|||||||
|
|
||||||
public boolean c(BlockPosition blockposition) {
|
public boolean c(BlockPosition blockposition) {
|
||||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||||
index e65558f7a..36cc0c18d 100644
|
index 628fda8e7c..17bcef97e0 100644
|
||||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||||
@@ -1786,6 +1786,40 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
@@ -1782,6 +1782,39 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||||
}
|
}
|
||||||
|
|
||||||
// Paper start
|
// Paper start
|
||||||
+
|
|
||||||
+ private java.lang.ref.WeakReference<Chunk> currentChunk = null;
|
+ private java.lang.ref.WeakReference<Chunk> currentChunk = null;
|
||||||
+
|
+
|
||||||
+ public void setCurrentChunk(Chunk chunk) {
|
+ public void setCurrentChunk(Chunk chunk) {
|
||||||
@ -127,21 +126,21 @@ index e65558f7a..36cc0c18d 100644
|
|||||||
+ return getCurrentChunkAt((int)Math.floor(locX) >> 4, (int)Math.floor(locZ) >> 4);
|
+ return getCurrentChunkAt((int)Math.floor(locX) >> 4, (int)Math.floor(locZ) >> 4);
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
public final MinecraftKey entityKey;
|
private MinecraftKey entityKey;
|
||||||
public final String entityKeyString;
|
private String entityKeyString;
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
|
diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
|
||||||
index 257dd1da9..cffbcb8f7 100644
|
index 5ca7fef518..9361667c3b 100644
|
||||||
--- a/src/main/java/net/minecraft/server/TileEntity.java
|
--- a/src/main/java/net/minecraft/server/TileEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/server/TileEntity.java
|
+++ b/src/main/java/net/minecraft/server/TileEntity.java
|
||||||
@@ -38,6 +38,15 @@ public abstract class TileEntity implements KeyedObject {
|
@@ -41,6 +41,15 @@ public abstract class TileEntity implements KeyedObject { // Paper
|
||||||
public String getMinecraftKeyString() {
|
getMinecraftKey(); // Try to load if it doesn't exists.
|
||||||
return tileEntityKeyString;
|
return tileEntityKeyString;
|
||||||
}
|
}
|
||||||
+
|
+
|
||||||
+ private java.lang.ref.WeakReference<Chunk> currentChunk = null;
|
+ private java.lang.ref.WeakReference<Chunk> currentChunk = null;
|
||||||
+ public Chunk getCurrentChunk() {
|
+ public Chunk getCurrentChunk() {
|
||||||
+ final Chunk chunk = currentChunk != null ? currentChunk.get() : world.getChunkIfLoaded(position.getX() >> 4, position.getZ() >> 4);
|
+ final Chunk chunk = currentChunk != null ? currentChunk.get() : null;
|
||||||
+ return chunk != null && chunk.isLoaded() ? chunk : null;
|
+ return chunk != null && chunk.isLoaded() ? chunk : null;
|
||||||
+ }
|
+ }
|
||||||
+ public void setCurrentChunk(Chunk chunk) {
|
+ public void setCurrentChunk(Chunk chunk) {
|
||||||
@ -151,7 +150,7 @@ index 257dd1da9..cffbcb8f7 100644
|
|||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||||
index 72164e11a..f09251eec 100644
|
index 72164e11af..f09251eec8 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||||
@@ -9,6 +9,7 @@ import java.util.UUID;
|
@@ -9,6 +9,7 @@ import java.util.UUID;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From 54bc9c613540e749baf2c4582f5000d0ea7f9ae9 Mon Sep 17 00:00:00 2001
|
From cfcc186292e5c96e42aa2588663c3e9ff49c0e34 Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Wed, 4 Jul 2018 02:13:59 -0400
|
Date: Wed, 4 Jul 2018 02:13:59 -0400
|
||||||
Subject: [PATCH] Store counts for each Entity/Block Entity Type
|
Subject: [PATCH] Store counts for each Entity/Block Entity Type
|
||||||
@ -6,7 +6,7 @@ Subject: [PATCH] Store counts for each Entity/Block Entity Type
|
|||||||
Opens door for future patches to optimize performance
|
Opens door for future patches to optimize performance
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||||
index 7837f1024..0a0d04cf6 100644
|
index 7837f1024c..24a2ec4b4a 100644
|
||||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||||
@@ -64,15 +64,19 @@ public class Chunk implements IChunkAccess {
|
@@ -64,15 +64,19 @@ public class Chunk implements IChunkAccess {
|
||||||
@ -21,11 +21,11 @@ index 7837f1024..0a0d04cf6 100644
|
|||||||
TileEntity replaced = super.put(key, value);
|
TileEntity replaced = super.put(key, value);
|
||||||
if (replaced != null) {
|
if (replaced != null) {
|
||||||
replaced.setCurrentChunk(null);
|
replaced.setCurrentChunk(null);
|
||||||
+ tileEntityCounts.decrement(replaced.tileEntityKeyString);
|
+ tileEntityCounts.decrement(replaced.getMinecraftKeyString());
|
||||||
}
|
}
|
||||||
if (value != null) {
|
if (value != null) {
|
||||||
value.setCurrentChunk(Chunk.this);
|
value.setCurrentChunk(Chunk.this);
|
||||||
+ tileEntityCounts.increment(value.tileEntityKeyString);
|
+ tileEntityCounts.increment(value.getMinecraftKeyString());
|
||||||
}
|
}
|
||||||
return replaced;
|
return replaced;
|
||||||
}
|
}
|
||||||
@ -33,7 +33,7 @@ index 7837f1024..0a0d04cf6 100644
|
|||||||
TileEntity removed = super.remove(key);
|
TileEntity removed = super.remove(key);
|
||||||
if (removed != null) {
|
if (removed != null) {
|
||||||
removed.setCurrentChunk(null);
|
removed.setCurrentChunk(null);
|
||||||
+ tileEntityCounts.decrement(removed.tileEntityKeyString);
|
+ tileEntityCounts.decrement(removed.getMinecraftKeyString());
|
||||||
}
|
}
|
||||||
return removed;
|
return removed;
|
||||||
}
|
}
|
||||||
@ -41,7 +41,7 @@ index 7837f1024..0a0d04cf6 100644
|
|||||||
this.entitySlices[k].add(entity);
|
this.entitySlices[k].add(entity);
|
||||||
// Paper start
|
// Paper start
|
||||||
entity.setCurrentChunk(this);
|
entity.setCurrentChunk(this);
|
||||||
+ entityCounts.increment(entity.entityKeyString);
|
+ entityCounts.increment(entity.getMinecraftKeyString());
|
||||||
// Paper end
|
// Paper end
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -49,7 +49,7 @@ index 7837f1024..0a0d04cf6 100644
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
entity.setCurrentChunk(null);
|
entity.setCurrentChunk(null);
|
||||||
+ entityCounts.decrement(entity.entityKeyString);
|
+ entityCounts.decrement(entity.getMinecraftKeyString());
|
||||||
// Paper end
|
// Paper end
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From d84504147fb808dbe850614b40541d1f8b4dafb5 Mon Sep 17 00:00:00 2001
|
From ddd572cdcea3624d4d5fc369a29deab27c6511b1 Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Thu, 3 Mar 2016 04:00:11 -0600
|
Date: Thu, 3 Mar 2016 04:00:11 -0600
|
||||||
Subject: [PATCH] Timings v2
|
Subject: [PATCH] Timings v2
|
||||||
@ -660,7 +660,7 @@ index 3706e44a34..bf1fffcfee 100644
|
|||||||
return waitable.get();
|
return waitable.get();
|
||||||
} catch (java.util.concurrent.ExecutionException e) {
|
} catch (java.util.concurrent.ExecutionException e) {
|
||||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||||
index e67c5dc90b..f1e71de42a 100644
|
index 17bcef97e0..5590919dd6 100644
|
||||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||||
@@ -29,7 +29,8 @@ import org.bukkit.command.CommandSender;
|
@@ -29,7 +29,8 @@ import org.bukkit.command.CommandSender;
|
||||||
@ -682,7 +682,7 @@ index e67c5dc90b..f1e71de42a 100644
|
|||||||
// Spigot start
|
// Spigot start
|
||||||
public final byte activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this);
|
public final byte activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this);
|
||||||
public final boolean defaultActivationState;
|
public final boolean defaultActivationState;
|
||||||
@@ -543,7 +544,6 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
@@ -539,7 +540,6 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||||
}
|
}
|
||||||
|
|
||||||
public void move(EnumMoveType enummovetype, double d0, double d1, double d2) {
|
public void move(EnumMoveType enummovetype, double d0, double d1, double d2) {
|
||||||
@ -690,7 +690,7 @@ index e67c5dc90b..f1e71de42a 100644
|
|||||||
if (this.noclip) {
|
if (this.noclip) {
|
||||||
this.a(this.getBoundingBox().d(d0, d1, d2));
|
this.a(this.getBoundingBox().d(d0, d1, d2));
|
||||||
this.recalcPosition();
|
this.recalcPosition();
|
||||||
@@ -912,7 +912,6 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
@@ -908,7 +908,6 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||||
|
|
||||||
this.world.methodProfiler.e();
|
this.world.methodProfiler.e();
|
||||||
}
|
}
|
||||||
@ -806,7 +806,7 @@ index ae31935c48..70c9b1f50c 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
index 71ee66a9bb..1839bf7d24 100644
|
index d453d0c421..83a73b86ea 100644
|
||||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
@@ -1,5 +1,6 @@
|
@@ -1,5 +1,6 @@
|
||||||
@ -1194,7 +1194,7 @@ index a07895935e..ee5c2421bb 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
|
diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
|
||||||
index cffbcb8f71..6b8a1c8c8b 100644
|
index 9361667c3b..0d54513a44 100644
|
||||||
--- a/src/main/java/net/minecraft/server/TileEntity.java
|
--- a/src/main/java/net/minecraft/server/TileEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/server/TileEntity.java
|
+++ b/src/main/java/net/minecraft/server/TileEntity.java
|
||||||
@@ -4,12 +4,13 @@ import javax.annotation.Nullable;
|
@@ -4,12 +4,13 @@ import javax.annotation.Nullable;
|
||||||
@ -1206,7 +1206,7 @@ index cffbcb8f71..6b8a1c8c8b 100644
|
|||||||
+import co.aikar.timings.Timing; // Paper
|
+import co.aikar.timings.Timing; // Paper
|
||||||
import org.bukkit.inventory.InventoryHolder; // CraftBukkit
|
import org.bukkit.inventory.InventoryHolder; // CraftBukkit
|
||||||
|
|
||||||
public abstract class TileEntity implements KeyedObject {
|
public abstract class TileEntity implements KeyedObject { // Paper
|
||||||
|
|
||||||
- public CustomTimingsHandler tickTimer = org.bukkit.craftbukkit.SpigotTimings.getTileEntityTimings(this); // Spigot
|
- public CustomTimingsHandler tickTimer = org.bukkit.craftbukkit.SpigotTimings.getTileEntityTimings(this); // Spigot
|
||||||
+ public Timing tickTimer = MinecraftTimings.getTileEntityTimings(this); // Paper
|
+ public Timing tickTimer = MinecraftTimings.getTileEntityTimings(this); // Paper
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
From e1421e0812ad47128d28ec5b99ebd0c2ae5d65ca Mon Sep 17 00:00:00 2001
|
From d8bb3e196523a1649e6051920f32cc397b7653d9 Mon Sep 17 00:00:00 2001
|
||||||
From: Byteflux <byte@byteflux.net>
|
From: Byteflux <byte@byteflux.net>
|
||||||
Date: Tue, 1 Mar 2016 23:45:08 -0600
|
Date: Tue, 1 Mar 2016 23:45:08 -0600
|
||||||
Subject: [PATCH] Entity Origin API
|
Subject: [PATCH] Entity Origin API
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||||
index 20248de7e..6bb4cf48e 100644
|
index 04674c39d5..5ba537bab2 100644
|
||||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||||
@@ -160,6 +160,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
@@ -160,6 +160,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||||
@ -16,7 +16,7 @@ index 20248de7e..6bb4cf48e 100644
|
|||||||
// Spigot start
|
// Spigot start
|
||||||
public final byte activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this);
|
public final byte activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this);
|
||||||
public final boolean defaultActivationState;
|
public final boolean defaultActivationState;
|
||||||
@@ -1629,6 +1630,11 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
@@ -1625,6 +1626,11 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -28,7 +28,7 @@ index 20248de7e..6bb4cf48e 100644
|
|||||||
return nbttagcompound;
|
return nbttagcompound;
|
||||||
} catch (Throwable throwable) {
|
} catch (Throwable throwable) {
|
||||||
CrashReport crashreport = CrashReport.a(throwable, "Saving entity NBT");
|
CrashReport crashreport = CrashReport.a(throwable, "Saving entity NBT");
|
||||||
@@ -1771,6 +1777,13 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
@@ -1767,6 +1773,13 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
@ -51,7 +51,7 @@ index 20248de7e..6bb4cf48e 100644
|
|||||||
NBTTagList nbttaglist = new NBTTagList();
|
NBTTagList nbttaglist = new NBTTagList();
|
||||||
double[] adouble1 = adouble;
|
double[] adouble1 = adouble;
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityFallingBlock.java b/src/main/java/net/minecraft/server/EntityFallingBlock.java
|
diff --git a/src/main/java/net/minecraft/server/EntityFallingBlock.java b/src/main/java/net/minecraft/server/EntityFallingBlock.java
|
||||||
index 8d47b58c9..7e5a2775a 100644
|
index 5e01aa0f85..33bc46b054 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityFallingBlock.java
|
--- a/src/main/java/net/minecraft/server/EntityFallingBlock.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityFallingBlock.java
|
+++ b/src/main/java/net/minecraft/server/EntityFallingBlock.java
|
||||||
@@ -249,6 +249,14 @@ public class EntityFallingBlock extends Entity {
|
@@ -249,6 +249,14 @@ public class EntityFallingBlock extends Entity {
|
||||||
@ -70,7 +70,7 @@ index 8d47b58c9..7e5a2775a 100644
|
|||||||
|
|
||||||
public void a(boolean flag) {
|
public void a(boolean flag) {
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityTNTPrimed.java b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
|
diff --git a/src/main/java/net/minecraft/server/EntityTNTPrimed.java b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
|
||||||
index 5ceb3f206..87f3205f8 100644
|
index 5ceb3f2068..87f3205f82 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityTNTPrimed.java
|
--- a/src/main/java/net/minecraft/server/EntityTNTPrimed.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
|
+++ b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
|
||||||
@@ -109,6 +109,14 @@ public class EntityTNTPrimed extends Entity {
|
@@ -109,6 +109,14 @@ public class EntityTNTPrimed extends Entity {
|
||||||
@ -89,7 +89,7 @@ index 5ceb3f206..87f3205f8 100644
|
|||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
diff --git a/src/main/java/net/minecraft/server/NBTTagList.java b/src/main/java/net/minecraft/server/NBTTagList.java
|
diff --git a/src/main/java/net/minecraft/server/NBTTagList.java b/src/main/java/net/minecraft/server/NBTTagList.java
|
||||||
index a8280acf9..38dd8f17a 100644
|
index a8280acf94..38dd8f17a6 100644
|
||||||
--- a/src/main/java/net/minecraft/server/NBTTagList.java
|
--- a/src/main/java/net/minecraft/server/NBTTagList.java
|
||||||
+++ b/src/main/java/net/minecraft/server/NBTTagList.java
|
+++ b/src/main/java/net/minecraft/server/NBTTagList.java
|
||||||
@@ -182,6 +182,7 @@ public class NBTTagList extends NBTList<NBTBase> {
|
@@ -182,6 +182,7 @@ public class NBTTagList extends NBTList<NBTBase> {
|
||||||
@ -101,7 +101,7 @@ index a8280acf9..38dd8f17a 100644
|
|||||||
if (i >= 0 && i < this.list.size()) {
|
if (i >= 0 && i < this.list.size()) {
|
||||||
NBTBase nbtbase = (NBTBase) this.list.get(i);
|
NBTBase nbtbase = (NBTBase) this.list.get(i);
|
||||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||||
index fd64b75ed..3f0b6ac26 100644
|
index ae11c2e431..e3c56a7506 100644
|
||||||
--- a/src/main/java/net/minecraft/server/World.java
|
--- a/src/main/java/net/minecraft/server/World.java
|
||||||
+++ b/src/main/java/net/minecraft/server/World.java
|
+++ b/src/main/java/net/minecraft/server/World.java
|
||||||
@@ -940,6 +940,12 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
@@ -940,6 +940,12 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
||||||
@ -118,7 +118,7 @@ index fd64b75ed..3f0b6ac26 100644
|
|||||||
flag = true;
|
flag = true;
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||||
index f09251eec..34246369c 100644
|
index f09251eec8..34246369c5 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||||
@@ -777,4 +777,12 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
@@ -777,4 +777,12 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
From 258c176a476363f322e5c45f1e9a9e2cb9e9530e Mon Sep 17 00:00:00 2001
|
From 3056ae052dbb99ba08b30e2c597b4303aab4d977 Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Tue, 1 Mar 2016 23:52:34 -0600
|
Date: Tue, 1 Mar 2016 23:52:34 -0600
|
||||||
Subject: [PATCH] Prevent tile entity and entity crashes
|
Subject: [PATCH] Prevent tile entity and entity crashes
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
|
diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
|
||||||
index 6b8a1c8c8..e03965fc7 100644
|
index 0d54513a44..d8d519143e 100644
|
||||||
--- a/src/main/java/net/minecraft/server/TileEntity.java
|
--- a/src/main/java/net/minecraft/server/TileEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/server/TileEntity.java
|
+++ b/src/main/java/net/minecraft/server/TileEntity.java
|
||||||
@@ -175,7 +175,12 @@ public abstract class TileEntity implements KeyedObject {
|
@@ -178,7 +178,12 @@ public abstract class TileEntity implements KeyedObject { // Paper
|
||||||
return TileEntityTypes.a.b(this.C()) + " // " + this.getClass().getCanonicalName();
|
return TileEntityTypes.a.b(this.C()) + " // " + this.getClass().getCanonicalName();
|
||||||
});
|
});
|
||||||
if (this.world != null) {
|
if (this.world != null) {
|
||||||
@ -23,7 +23,7 @@ index 6b8a1c8c8..e03965fc7 100644
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||||
index e3c56a750..bfe09a205 100644
|
index e3c56a7506..bfe09a2055 100644
|
||||||
--- a/src/main/java/net/minecraft/server/World.java
|
--- a/src/main/java/net/minecraft/server/World.java
|
||||||
+++ b/src/main/java/net/minecraft/server/World.java
|
+++ b/src/main/java/net/minecraft/server/World.java
|
||||||
@@ -1166,10 +1166,12 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
@@ -1166,10 +1166,12 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
From 45fbad5474fc22989af2dac59e41e035ff3ea414 Mon Sep 17 00:00:00 2001
|
From de8f58f64cbe8823e170a5dfaa5393c4d88e8e6f Mon Sep 17 00:00:00 2001
|
||||||
From: Zach Brown <zach.brown@destroystokyo.com>
|
From: Zach Brown <zach.brown@destroystokyo.com>
|
||||||
Date: Tue, 1 Mar 2016 23:58:50 -0600
|
Date: Tue, 1 Mar 2016 23:58:50 -0600
|
||||||
Subject: [PATCH] Configurable top of nether void damage
|
Subject: [PATCH] Configurable top of nether void damage
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||||
index 38a697e1b..68898d624 100644
|
index 38a697e1b7..68898d624f 100644
|
||||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||||
@@ -124,4 +124,10 @@ public class PaperWorldConfig {
|
@@ -124,4 +124,10 @@ public class PaperWorldConfig {
|
||||||
@ -20,10 +20,10 @@ index 38a697e1b..68898d624 100644
|
|||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||||
index 778b8d440..1870930f6 100644
|
index 5ba537bab2..f95024cba5 100644
|
||||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||||
@@ -464,9 +464,15 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
@@ -460,9 +460,15 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||||
this.fallDistance *= 0.5F;
|
this.fallDistance *= 0.5F;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -39,7 +39,7 @@ index 778b8d440..1870930f6 100644
|
|||||||
|
|
||||||
if (!this.world.isClientSide) {
|
if (!this.world.isClientSide) {
|
||||||
this.setFlag(0, this.fireTicks > 0);
|
this.setFlag(0, this.fireTicks > 0);
|
||||||
@@ -476,6 +482,14 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
@@ -472,6 +478,14 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||||
this.world.methodProfiler.e();
|
this.world.methodProfiler.e();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -54,7 +54,7 @@ index 778b8d440..1870930f6 100644
|
|||||||
protected void E() {
|
protected void E() {
|
||||||
if (this.portalCooldown > 0) {
|
if (this.portalCooldown > 0) {
|
||||||
--this.portalCooldown;
|
--this.portalCooldown;
|
||||||
@@ -532,6 +546,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
@@ -528,6 +542,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||||
this.fireTicks = 0;
|
this.fireTicks = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -63,7 +63,7 @@ index 778b8d440..1870930f6 100644
|
|||||||
this.die();
|
this.die();
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityMinecartAbstract.java b/src/main/java/net/minecraft/server/EntityMinecartAbstract.java
|
diff --git a/src/main/java/net/minecraft/server/EntityMinecartAbstract.java b/src/main/java/net/minecraft/server/EntityMinecartAbstract.java
|
||||||
index 6e48cf475..4644d7efe 100644
|
index 6e48cf4751..4644d7efe3 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityMinecartAbstract.java
|
--- a/src/main/java/net/minecraft/server/EntityMinecartAbstract.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityMinecartAbstract.java
|
+++ b/src/main/java/net/minecraft/server/EntityMinecartAbstract.java
|
||||||
@@ -201,9 +201,15 @@ public abstract class EntityMinecartAbstract extends Entity implements INamableT
|
@@ -201,9 +201,15 @@ public abstract class EntityMinecartAbstract extends Entity implements INamableT
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From 95ed822af92f103ee523e42be376d2136d663b7b Mon Sep 17 00:00:00 2001
|
From 65217eb509331593bef12e5c2a710df06d993889 Mon Sep 17 00:00:00 2001
|
||||||
From: CullanP <cullanpage@gmail.com>
|
From: CullanP <cullanpage@gmail.com>
|
||||||
Date: Thu, 3 Mar 2016 02:13:38 -0600
|
Date: Thu, 3 Mar 2016 02:13:38 -0600
|
||||||
Subject: [PATCH] Avoid hopper searches if there are no items
|
Subject: [PATCH] Avoid hopper searches if there are no items
|
||||||
@ -14,7 +14,7 @@ And since minecart hoppers are used _very_ rarely near we can avoid alot of sear
|
|||||||
Combined, this adds up a lot.
|
Combined, this adds up a lot.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||||
index eb7a41977..0d80d811a 100644
|
index 39aeabff74..ea7d82f099 100644
|
||||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||||
@@ -92,6 +92,10 @@ public class Chunk implements IChunkAccess {
|
@@ -92,6 +92,10 @@ public class Chunk implements IChunkAccess {
|
||||||
@ -38,7 +38,7 @@ index eb7a41977..0d80d811a 100644
|
|||||||
+ inventoryEntityCounts[k]++;
|
+ inventoryEntityCounts[k]++;
|
||||||
+ }
|
+ }
|
||||||
entity.setCurrentChunk(this);
|
entity.setCurrentChunk(this);
|
||||||
entityCounts.increment(entity.entityKeyString);
|
entityCounts.increment(entity.getMinecraftKeyString());
|
||||||
// Paper end
|
// Paper end
|
||||||
@@ -710,6 +719,11 @@ public class Chunk implements IChunkAccess {
|
@@ -710,6 +719,11 @@ public class Chunk implements IChunkAccess {
|
||||||
if (!this.entitySlices[i].remove(entity)) {
|
if (!this.entitySlices[i].remove(entity)) {
|
||||||
@ -50,7 +50,7 @@ index eb7a41977..0d80d811a 100644
|
|||||||
+ inventoryEntityCounts[i]--;
|
+ inventoryEntityCounts[i]--;
|
||||||
+ }
|
+ }
|
||||||
entity.setCurrentChunk(null);
|
entity.setCurrentChunk(null);
|
||||||
entityCounts.decrement(entity.entityKeyString);
|
entityCounts.decrement(entity.getMinecraftKeyString());
|
||||||
// Paper end
|
// Paper end
|
||||||
@@ -898,6 +912,15 @@ public class Chunk implements IChunkAccess {
|
@@ -898,6 +912,15 @@ public class Chunk implements IChunkAccess {
|
||||||
if (!this.entitySlices[k].isEmpty()) {
|
if (!this.entitySlices[k].isEmpty()) {
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
From 30789a3c8edc5f4e26a7320e5cd9f1e5bdf5a056 Mon Sep 17 00:00:00 2001
|
From 2db9bc4cb7cbdc0975948534bb83eef4ce4bdc6d Mon Sep 17 00:00:00 2001
|
||||||
From: Zach Brown <zach.brown@destroystokyo.com>
|
From: Zach Brown <zach.brown@destroystokyo.com>
|
||||||
Date: Sun, 22 May 2016 20:20:55 -0500
|
Date: Sun, 22 May 2016 20:20:55 -0500
|
||||||
Subject: [PATCH] Optional TNT doesn't move in water
|
Subject: [PATCH] Optional TNT doesn't move in water
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||||
index a3823408c..41e73b340 100644
|
index a3823408ca..41e73b3409 100644
|
||||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||||
@@ -2,7 +2,6 @@ package com.destroystokyo.paper;
|
@@ -2,7 +2,6 @@ package com.destroystokyo.paper;
|
||||||
@ -32,10 +32,10 @@ index a3823408c..41e73b340 100644
|
|||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||||
index 93df154b1..e56f458ca 100644
|
index 1f41c1ded1..d35c0437f3 100644
|
||||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||||
@@ -1195,6 +1195,12 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
@@ -1191,6 +1191,12 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean aq() {
|
public boolean aq() {
|
||||||
@ -61,7 +61,7 @@ index 93df154b1..e56f458ca 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityTNTPrimed.java b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
|
diff --git a/src/main/java/net/minecraft/server/EntityTNTPrimed.java b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
|
||||||
index 87f3205f8..8c1d25979 100644
|
index 87f3205f82..8c1d25979f 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityTNTPrimed.java
|
--- a/src/main/java/net/minecraft/server/EntityTNTPrimed.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
|
+++ b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
|
||||||
@@ -147,4 +147,49 @@ public class EntityTNTPrimed extends Entity {
|
@@ -147,4 +147,49 @@ public class EntityTNTPrimed extends Entity {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From 597a59550c1b3edf942a5b9d3fbe9f5d4400c285 Mon Sep 17 00:00:00 2001
|
From 0a7286e77c225d7801d81c1e635f632c6a125693 Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Fri, 17 Jun 2016 20:50:11 -0400
|
Date: Fri, 17 Jun 2016 20:50:11 -0400
|
||||||
Subject: [PATCH] Fix Old Sign Conversion
|
Subject: [PATCH] Fix Old Sign Conversion
|
||||||
@ -25,11 +25,11 @@ index 785a1a2184..528db8704e 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
|
diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
|
||||||
index e03965fc7c..9ad14417e3 100644
|
index d8d519143e..6021a3401f 100644
|
||||||
--- a/src/main/java/net/minecraft/server/TileEntity.java
|
--- a/src/main/java/net/minecraft/server/TileEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/server/TileEntity.java
|
+++ b/src/main/java/net/minecraft/server/TileEntity.java
|
||||||
@@ -11,6 +11,7 @@ import org.bukkit.inventory.InventoryHolder; // CraftBukkit
|
@@ -11,6 +11,7 @@ import org.bukkit.inventory.InventoryHolder; // CraftBukkit
|
||||||
public abstract class TileEntity implements KeyedObject {
|
public abstract class TileEntity implements KeyedObject { // Paper
|
||||||
|
|
||||||
public Timing tickTimer = MinecraftTimings.getTileEntityTimings(this); // Paper
|
public Timing tickTimer = MinecraftTimings.getTileEntityTimings(this); // Paper
|
||||||
+ boolean isLoadingStructure = false; // Paper
|
+ boolean isLoadingStructure = false; // Paper
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
From 6947e3fbbe3d9138b66a298d2b5f5f68c810d7d8 Mon Sep 17 00:00:00 2001
|
From 337b86fc7de9fa7fa2cdd3f1af4d0b01577661e9 Mon Sep 17 00:00:00 2001
|
||||||
From: BillyGalbreath <Blake.Galbreath@GMail.com>
|
From: BillyGalbreath <Blake.Galbreath@GMail.com>
|
||||||
Date: Sun, 18 Jun 2017 18:17:05 -0500
|
Date: Sun, 18 Jun 2017 18:17:05 -0500
|
||||||
Subject: [PATCH] Entity#fromMobSpawner()
|
Subject: [PATCH] Entity#fromMobSpawner()
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||||
index 6db20aa75c..bd232b31e4 100644
|
index f79295052a..034169140b 100644
|
||||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||||
@@ -181,6 +181,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
@@ -181,6 +181,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||||
@ -16,7 +16,7 @@ index 6db20aa75c..bd232b31e4 100644
|
|||||||
protected int numCollisions = 0; // Paper
|
protected int numCollisions = 0; // Paper
|
||||||
public void inactiveTick() { }
|
public void inactiveTick() { }
|
||||||
// Spigot end
|
// Spigot end
|
||||||
@@ -1671,6 +1672,10 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
@@ -1667,6 +1668,10 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||||
if (origin != null) {
|
if (origin != null) {
|
||||||
nbttagcompound.set("Paper.Origin", this.createList(origin.getX(), origin.getY(), origin.getZ()));
|
nbttagcompound.set("Paper.Origin", this.createList(origin.getX(), origin.getY(), origin.getZ()));
|
||||||
}
|
}
|
||||||
@ -27,7 +27,7 @@ index 6db20aa75c..bd232b31e4 100644
|
|||||||
// Paper end
|
// Paper end
|
||||||
return nbttagcompound;
|
return nbttagcompound;
|
||||||
} catch (Throwable throwable) {
|
} catch (Throwable throwable) {
|
||||||
@@ -1819,6 +1824,8 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
@@ -1815,6 +1820,8 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||||
if (!originTag.isEmpty()) {
|
if (!originTag.isEmpty()) {
|
||||||
origin = new Location(world.getWorld(), originTag.getDoubleAt(0), originTag.getDoubleAt(1), originTag.getDoubleAt(2));
|
origin = new Location(world.getWorld(), originTag.getDoubleAt(0), originTag.getDoubleAt(1), originTag.getDoubleAt(2));
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From 3654a5a2fdfc4d68c9055b22d9913a1d250f6130 Mon Sep 17 00:00:00 2001
|
From c193383e12907fb2df80cbef83d0368fa99829d0 Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Mon, 6 Nov 2017 21:08:22 -0500
|
Date: Mon, 6 Nov 2017 21:08:22 -0500
|
||||||
Subject: [PATCH] API to get a BlockState without a snapshot
|
Subject: [PATCH] API to get a BlockState without a snapshot
|
||||||
@ -13,10 +13,10 @@ also Avoid NPE during CraftBlockEntityState load if could not get TE
|
|||||||
If Tile Entity was null, correct Sign to return empty lines instead of null
|
If Tile Entity was null, correct Sign to return empty lines instead of null
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
|
diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
|
||||||
index 9ad14417e3..3e9b357c87 100644
|
index 6021a3401f..536fd37254 100644
|
||||||
--- a/src/main/java/net/minecraft/server/TileEntity.java
|
--- a/src/main/java/net/minecraft/server/TileEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/server/TileEntity.java
|
+++ b/src/main/java/net/minecraft/server/TileEntity.java
|
||||||
@@ -203,7 +203,12 @@ public abstract class TileEntity implements KeyedObject {
|
@@ -206,7 +206,12 @@ public abstract class TileEntity implements KeyedObject { // Paper
|
||||||
}
|
}
|
||||||
|
|
||||||
// CraftBukkit start - add method
|
// CraftBukkit start - add method
|
||||||
@ -29,7 +29,7 @@ index 9ad14417e3..3e9b357c87 100644
|
|||||||
if (world == null) return null;
|
if (world == null) return null;
|
||||||
// Spigot start
|
// Spigot start
|
||||||
org.bukkit.block.Block block = world.getWorld().getBlockAt(position.getX(), position.getY(), position.getZ());
|
org.bukkit.block.Block block = world.getWorld().getBlockAt(position.getX(), position.getY(), position.getZ());
|
||||||
@@ -212,7 +217,7 @@ public abstract class TileEntity implements KeyedObject {
|
@@ -215,7 +220,7 @@ public abstract class TileEntity implements KeyedObject { // Paper
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
// Spigot end
|
// Spigot end
|
||||||
@ -39,7 +39,7 @@ index 9ad14417e3..3e9b357c87 100644
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
||||||
index 698d044a8d..9514968b07 100644
|
index d6e4adf147..8cb08c5584 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
||||||
@@ -263,6 +263,20 @@ public class CraftBlock implements Block {
|
@@ -263,6 +263,20 @@ public class CraftBlock implements Block {
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren