SPIGOT-711: Correctly init captured tile entities
Dieser Commit ist enthalten in:
Ursprung
6fe6b3842c
Commit
22ee419816
@ -1,5 +1,5 @@
|
|||||||
--- /home/matt/mc-dev-private//net/minecraft/server/World.java 2015-03-16 09:47:41.491221758 +0000
|
--- /home/matt/mc-dev-private//net/minecraft/server/World.java 2015-03-16 15:55:03.450982504 +0000
|
||||||
+++ src/main/java/net/minecraft/server/World.java 2015-03-16 09:47:41.499221758 +0000
|
+++ src/main/java/net/minecraft/server/World.java 2015-03-16 15:55:03.454982504 +0000
|
||||||
@@ -13,6 +13,25 @@
|
@@ -13,6 +13,25 @@
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import java.util.concurrent.Callable;
|
import java.util.concurrent.Callable;
|
||||||
@ -475,12 +475,14 @@
|
|||||||
TileEntity tileentity = null;
|
TileEntity tileentity = null;
|
||||||
int i;
|
int i;
|
||||||
TileEntity tileentity1;
|
TileEntity tileentity1;
|
||||||
@@ -1517,6 +1770,12 @@
|
@@ -1517,6 +1770,14 @@
|
||||||
|
|
||||||
public void setTileEntity(BlockPosition blockposition, TileEntity tileentity) {
|
public void setTileEntity(BlockPosition blockposition, TileEntity tileentity) {
|
||||||
if (tileentity != null && !tileentity.x()) {
|
if (tileentity != null && !tileentity.x()) {
|
||||||
+ // CraftBukkit start
|
+ // CraftBukkit start
|
||||||
+ if (captureBlockStates) {
|
+ if (captureBlockStates) {
|
||||||
|
+ tileentity.a(this);
|
||||||
|
+ tileentity.a(blockposition);
|
||||||
+ capturedTileEntities.put(blockposition, tileentity);
|
+ capturedTileEntities.put(blockposition, tileentity);
|
||||||
+ return;
|
+ return;
|
||||||
+ }
|
+ }
|
||||||
@ -488,7 +490,7 @@
|
|||||||
if (this.M) {
|
if (this.M) {
|
||||||
tileentity.a(blockposition);
|
tileentity.a(blockposition);
|
||||||
Iterator iterator = this.b.iterator();
|
Iterator iterator = this.b.iterator();
|
||||||
@@ -1679,12 +1938,20 @@
|
@@ -1679,12 +1940,20 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
this.p = MathHelper.a(this.p, 0.0F, 1.0F);
|
this.p = MathHelper.a(this.p, 0.0F, 1.0F);
|
||||||
@ -510,7 +512,7 @@
|
|||||||
this.methodProfiler.a("buildList");
|
this.methodProfiler.a("buildList");
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
@@ -1701,7 +1968,7 @@
|
@@ -1701,7 +1970,7 @@
|
||||||
|
|
||||||
for (int i1 = -l; i1 <= l; ++i1) {
|
for (int i1 = -l; i1 <= l; ++i1) {
|
||||||
for (int j1 = -l; j1 <= l; ++j1) {
|
for (int j1 = -l; j1 <= l; ++j1) {
|
||||||
@ -519,7 +521,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1879,7 +2146,10 @@
|
@@ -1879,7 +2148,10 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean c(EnumSkyBlock enumskyblock, BlockPosition blockposition) {
|
public boolean c(EnumSkyBlock enumskyblock, BlockPosition blockposition) {
|
||||||
@ -531,7 +533,7 @@
|
|||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
int i = 0;
|
int i = 0;
|
||||||
@@ -2024,6 +2294,13 @@
|
@@ -2024,6 +2296,13 @@
|
||||||
int k = MathHelper.floor((axisalignedbb.c - 2.0D) / 16.0D);
|
int k = MathHelper.floor((axisalignedbb.c - 2.0D) / 16.0D);
|
||||||
int l = MathHelper.floor((axisalignedbb.f + 2.0D) / 16.0D);
|
int l = MathHelper.floor((axisalignedbb.f + 2.0D) / 16.0D);
|
||||||
|
|
||||||
@ -545,7 +547,7 @@
|
|||||||
for (int i1 = i; i1 <= j; ++i1) {
|
for (int i1 = i; i1 <= j; ++i1) {
|
||||||
for (int j1 = k; j1 <= l; ++j1) {
|
for (int j1 = k; j1 <= l; ++j1) {
|
||||||
if (this.isChunkLoaded(i1, j1, true)) {
|
if (this.isChunkLoaded(i1, j1, true)) {
|
||||||
@@ -2042,7 +2319,7 @@
|
@@ -2042,7 +2321,7 @@
|
||||||
while (iterator.hasNext()) {
|
while (iterator.hasNext()) {
|
||||||
Entity entity = (Entity) iterator.next();
|
Entity entity = (Entity) iterator.next();
|
||||||
|
|
||||||
@ -554,7 +556,7 @@
|
|||||||
arraylist.add(entity);
|
arraylist.add(entity);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2057,7 +2334,7 @@
|
@@ -2057,7 +2336,7 @@
|
||||||
while (iterator.hasNext()) {
|
while (iterator.hasNext()) {
|
||||||
Entity entity = (Entity) iterator.next();
|
Entity entity = (Entity) iterator.next();
|
||||||
|
|
||||||
@ -563,7 +565,7 @@
|
|||||||
arraylist.add(entity);
|
arraylist.add(entity);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2105,7 +2382,7 @@
|
@@ -2105,7 +2384,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -572,7 +574,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Entity a(int i) {
|
public Entity a(int i) {
|
||||||
@@ -2125,8 +2402,17 @@
|
@@ -2125,8 +2404,17 @@
|
||||||
|
|
||||||
while (iterator.hasNext()) {
|
while (iterator.hasNext()) {
|
||||||
Entity entity = (Entity) iterator.next();
|
Entity entity = (Entity) iterator.next();
|
||||||
@ -592,7 +594,7 @@
|
|||||||
++i;
|
++i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2135,12 +2421,18 @@
|
@@ -2135,12 +2423,18 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
public void b(Collection<Entity> collection) {
|
public void b(Collection<Entity> collection) {
|
||||||
@ -612,7 +614,7 @@
|
|||||||
this.a(entity);
|
this.a(entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2154,7 +2446,13 @@
|
@@ -2154,7 +2448,13 @@
|
||||||
Block block1 = this.getType(blockposition).getBlock();
|
Block block1 = this.getType(blockposition).getBlock();
|
||||||
AxisAlignedBB axisalignedbb = flag ? null : block.a(this, blockposition, block.getBlockData());
|
AxisAlignedBB axisalignedbb = flag ? null : block.a(this, blockposition, block.getBlockData());
|
||||||
|
|
||||||
@ -627,7 +629,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
public int F() {
|
public int F() {
|
||||||
@@ -2253,6 +2551,11 @@
|
@@ -2253,6 +2553,11 @@
|
||||||
|
|
||||||
for (int i = 0; i < this.players.size(); ++i) {
|
for (int i = 0; i < this.players.size(); ++i) {
|
||||||
EntityHuman entityhuman1 = (EntityHuman) this.players.get(i);
|
EntityHuman entityhuman1 = (EntityHuman) this.players.get(i);
|
||||||
@ -639,7 +641,7 @@
|
|||||||
|
|
||||||
if (IEntitySelector.d.apply(entityhuman1)) {
|
if (IEntitySelector.d.apply(entityhuman1)) {
|
||||||
double d5 = entityhuman1.e(d0, d1, d2);
|
double d5 = entityhuman1.e(d0, d1, d2);
|
||||||
@@ -2369,6 +2672,16 @@
|
@@ -2369,6 +2674,16 @@
|
||||||
|
|
||||||
public void everyoneSleeping() {}
|
public void everyoneSleeping() {}
|
||||||
|
|
||||||
@ -656,7 +658,7 @@
|
|||||||
public float h(float f) {
|
public float h(float f) {
|
||||||
return (this.q + (this.r - this.q) * f) * this.j(f);
|
return (this.q + (this.r - this.q) * f) * this.j(f);
|
||||||
}
|
}
|
||||||
@@ -2592,6 +2905,6 @@
|
@@ -2592,6 +2907,6 @@
|
||||||
int l = j * 16 + 8 - blockposition.getZ();
|
int l = j * 16 + 8 - blockposition.getZ();
|
||||||
short short0 = 128;
|
short short0 = 128;
|
||||||
|
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren