SPIGOT-3320: Apply tile entity fixer to more types
Dieser Commit ist enthalten in:
Ursprung
ed8c725d19
Commit
639aa0cf48
@ -88,7 +88,7 @@
|
||||
this.getWorldBorder().setCenter(this.worldData.B(), this.worldData.C());
|
||||
this.getWorldBorder().setDamageAmount(this.worldData.H());
|
||||
this.getWorldBorder().setDamageBuffer(this.worldData.G());
|
||||
@@ -88,9 +121,98 @@
|
||||
@@ -88,9 +121,146 @@
|
||||
this.getWorldBorder().setSize(this.worldData.D());
|
||||
}
|
||||
|
||||
@ -155,6 +155,54 @@
|
||||
+ if (!(result instanceof TileEntityHopper)) {
|
||||
+ result = fixTileEntity(pos, type, result);
|
||||
+ }
|
||||
+ } else if (type == Blocks.ENCHANTING_TABLE) {
|
||||
+ if (!(result instanceof TileEntityEnchantTable)) {
|
||||
+ result = fixTileEntity(pos, type, result);
|
||||
+ }
|
||||
+ } else if (type == Blocks.END_PORTAL) {
|
||||
+ if (!(result instanceof TileEntityEndGateway)) {
|
||||
+ result = fixTileEntity(pos, type, result);
|
||||
+ }
|
||||
+ } else if (type == Blocks.SKULL) {
|
||||
+ if (!(result instanceof TileEntitySkull)) {
|
||||
+ result = fixTileEntity(pos, type, result);
|
||||
+ }
|
||||
+ } else if (type == Blocks.DAYLIGHT_DETECTOR || type == Blocks.DAYLIGHT_DETECTOR_INVERTED) {
|
||||
+ if (!(result instanceof TileEntityLightDetector)) {
|
||||
+ result = fixTileEntity(pos, type, result);
|
||||
+ }
|
||||
+ } else if (type == Blocks.POWERED_COMPARATOR || type == Blocks.UNPOWERED_COMPARATOR) {
|
||||
+ if (!(result instanceof TileEntityComparator)) {
|
||||
+ result = fixTileEntity(pos, type, result);
|
||||
+ }
|
||||
+ } else if (type == Blocks.FLOWER_POT) {
|
||||
+ if (!(result instanceof TileEntityFlowerPot)) {
|
||||
+ result = fixTileEntity(pos, type, result);
|
||||
+ }
|
||||
+ } else if (type == Blocks.STANDING_BANNER || type == Blocks.WALL_BANNER) {
|
||||
+ if (!(result instanceof TileEntityBanner)) {
|
||||
+ result = fixTileEntity(pos, type, result);
|
||||
+ }
|
||||
+ } else if (type == Blocks.STRUCTURE_BLOCK) {
|
||||
+ if (!(result instanceof TileEntityStructure)) {
|
||||
+ result = fixTileEntity(pos, type, result);
|
||||
+ }
|
||||
+ } else if (type == Blocks.END_PORTAL) {
|
||||
+ if (!(result instanceof TileEntityEndGateway)) {
|
||||
+ result = fixTileEntity(pos, type, result);
|
||||
+ }
|
||||
+ } else if (type == Blocks.COMMAND_BLOCK) {
|
||||
+ if (!(result instanceof TileEntityCommand)) {
|
||||
+ result = fixTileEntity(pos, type, result);
|
||||
+ }
|
||||
+ } else if (type == Blocks.STRUCTURE_BLOCK) {
|
||||
+ if (!(result instanceof TileEntityStructure)) {
|
||||
+ result = fixTileEntity(pos, type, result);
|
||||
+ }
|
||||
+ } else if (type == Blocks.BED) {
|
||||
+ if (!(result instanceof TileEntityBed)) {
|
||||
+ result = fixTileEntity(pos, type, result);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return result;
|
||||
@ -187,7 +235,7 @@
|
||||
public void doTick() {
|
||||
super.doTick();
|
||||
if (this.getWorldData().isHardcore() && this.getDifficulty() != EnumDifficulty.HARD) {
|
||||
@@ -109,8 +231,11 @@
|
||||
@@ -109,8 +279,11 @@
|
||||
}
|
||||
|
||||
this.methodProfiler.a("mobSpawner");
|
||||
@ -201,7 +249,7 @@
|
||||
}
|
||||
|
||||
this.methodProfiler.c("chunkSource");
|
||||
@@ -139,6 +264,8 @@
|
||||
@@ -139,6 +312,8 @@
|
||||
this.portalTravelAgent.a(this.getTime());
|
||||
this.methodProfiler.b();
|
||||
this.aq();
|
||||
@ -210,7 +258,7 @@
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@@ -166,7 +293,7 @@
|
||||
@@ -166,7 +341,7 @@
|
||||
|
||||
if (entityhuman.isSpectator()) {
|
||||
++i;
|
||||
@ -219,7 +267,7 @@
|
||||
++j;
|
||||
}
|
||||
}
|
||||
@@ -195,25 +322,46 @@
|
||||
@@ -195,25 +370,46 @@
|
||||
}
|
||||
|
||||
private void c() {
|
||||
@ -270,7 +318,7 @@
|
||||
|
||||
return false;
|
||||
} else {
|
||||
@@ -283,7 +431,7 @@
|
||||
@@ -283,7 +479,7 @@
|
||||
entityhorseskeleton.p(true);
|
||||
entityhorseskeleton.setAgeRaw(0);
|
||||
entityhorseskeleton.setPosition((double) blockposition.getX(), (double) blockposition.getY(), (double) blockposition.getZ());
|
||||
@ -279,7 +327,7 @@
|
||||
this.strikeLightning(new EntityLightning(this, (double) blockposition.getX(), (double) blockposition.getY(), (double) blockposition.getZ(), true));
|
||||
} else {
|
||||
this.strikeLightning(new EntityLightning(this, (double) blockposition.getX(), (double) blockposition.getY(), (double) blockposition.getZ(), false));
|
||||
@@ -299,11 +447,11 @@
|
||||
@@ -299,11 +495,11 @@
|
||||
BlockPosition blockposition1 = blockposition.down();
|
||||
|
||||
if (this.v(blockposition1)) {
|
||||
@ -293,7 +341,7 @@
|
||||
}
|
||||
|
||||
if (flag && this.getBiome(blockposition1).d()) {
|
||||
@@ -378,7 +526,7 @@
|
||||
@@ -378,7 +574,7 @@
|
||||
public boolean b(BlockPosition blockposition, Block block) {
|
||||
NextTickListEntry nextticklistentry = new NextTickListEntry(blockposition, block);
|
||||
|
||||
@ -302,7 +350,7 @@
|
||||
}
|
||||
|
||||
public void a(BlockPosition blockposition, Block block, int i) {
|
||||
@@ -412,8 +560,8 @@
|
||||
@@ -412,8 +608,8 @@
|
||||
nextticklistentry.a(j);
|
||||
}
|
||||
|
||||
@ -313,7 +361,7 @@
|
||||
this.nextTickList.add(nextticklistentry);
|
||||
}
|
||||
}
|
||||
@@ -430,15 +578,15 @@
|
||||
@@ -430,15 +626,15 @@
|
||||
nextticklistentry.a((long) i + this.worldData.getTime());
|
||||
}
|
||||
|
||||
@ -332,7 +380,7 @@
|
||||
if (this.emptyTime++ >= 300) {
|
||||
return;
|
||||
}
|
||||
@@ -508,11 +656,17 @@
|
||||
@@ -508,11 +704,17 @@
|
||||
} else {
|
||||
int i = this.nextTickList.size();
|
||||
|
||||
@ -352,7 +400,7 @@
|
||||
}
|
||||
|
||||
this.methodProfiler.a("cleaning");
|
||||
@@ -525,8 +679,9 @@
|
||||
@@ -525,8 +727,9 @@
|
||||
break;
|
||||
}
|
||||
|
||||
@ -363,7 +411,7 @@
|
||||
this.W.add(nextticklistentry);
|
||||
}
|
||||
|
||||
@@ -596,7 +751,7 @@
|
||||
@@ -596,7 +799,7 @@
|
||||
if (blockposition.getX() >= structureboundingbox.a && blockposition.getX() < structureboundingbox.d && blockposition.getZ() >= structureboundingbox.c && blockposition.getZ() < structureboundingbox.f) {
|
||||
if (flag) {
|
||||
if (i == 0) {
|
||||
@ -372,7 +420,7 @@
|
||||
}
|
||||
|
||||
iterator.remove();
|
||||
@@ -614,6 +769,7 @@
|
||||
@@ -614,6 +817,7 @@
|
||||
return arraylist;
|
||||
}
|
||||
|
||||
@ -380,7 +428,7 @@
|
||||
public void entityJoinedWorld(Entity entity, boolean flag) {
|
||||
if (!this.getSpawnAnimals() && (entity instanceof EntityAnimal || entity instanceof EntityWaterAnimal)) {
|
||||
entity.die();
|
||||
@@ -625,6 +781,7 @@
|
||||
@@ -625,6 +829,7 @@
|
||||
|
||||
super.entityJoinedWorld(entity, flag);
|
||||
}
|
||||
@ -388,7 +436,7 @@
|
||||
|
||||
private boolean getSpawnNPCs() {
|
||||
return this.server.getSpawnNPCs();
|
||||
@@ -637,7 +794,54 @@
|
||||
@@ -637,7 +842,54 @@
|
||||
protected IChunkProvider n() {
|
||||
IChunkLoader ichunkloader = this.dataManager.createChunkLoader(this.worldProvider);
|
||||
|
||||
@ -444,7 +492,7 @@
|
||||
}
|
||||
|
||||
public boolean a(EntityHuman entityhuman, BlockPosition blockposition) {
|
||||
@@ -699,6 +903,23 @@
|
||||
@@ -699,6 +951,23 @@
|
||||
int j = this.worldProvider.getSeaLevel();
|
||||
int k = 8;
|
||||
|
||||
@ -468,7 +516,7 @@
|
||||
if (blockposition != null) {
|
||||
i = blockposition.getX();
|
||||
k = blockposition.getZ();
|
||||
@@ -708,7 +929,7 @@
|
||||
@@ -708,7 +977,7 @@
|
||||
|
||||
int l = 0;
|
||||
|
||||
@ -477,7 +525,7 @@
|
||||
i += random.nextInt(64) - random.nextInt(64);
|
||||
k += random.nextInt(64) - random.nextInt(64);
|
||||
++l;
|
||||
@@ -750,6 +971,7 @@
|
||||
@@ -750,6 +1019,7 @@
|
||||
ChunkProviderServer chunkproviderserver = this.getChunkProviderServer();
|
||||
|
||||
if (chunkproviderserver.e()) {
|
||||
@ -485,7 +533,7 @@
|
||||
if (iprogressupdate != null) {
|
||||
iprogressupdate.a("Saving level");
|
||||
}
|
||||
@@ -760,7 +982,8 @@
|
||||
@@ -760,7 +1030,8 @@
|
||||
}
|
||||
|
||||
chunkproviderserver.a(flag);
|
||||
@ -495,7 +543,7 @@
|
||||
Iterator iterator = arraylist.iterator();
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
@@ -795,6 +1018,12 @@
|
||||
@@ -795,6 +1066,12 @@
|
||||
}
|
||||
}
|
||||
|
||||
@ -508,7 +556,7 @@
|
||||
this.worldData.a(this.getWorldBorder().getSize());
|
||||
this.worldData.d(this.getWorldBorder().getCenterX());
|
||||
this.worldData.c(this.getWorldBorder().getCenterZ());
|
||||
@@ -808,9 +1037,13 @@
|
||||
@@ -808,9 +1085,13 @@
|
||||
this.worldMaps.a();
|
||||
}
|
||||
|
||||
@ -524,7 +572,7 @@
|
||||
|
||||
public void a(Collection<Entity> collection) {
|
||||
ArrayList arraylist = Lists.newArrayList(collection);
|
||||
@@ -829,7 +1062,7 @@
|
||||
@@ -829,7 +1110,7 @@
|
||||
|
||||
private boolean j(Entity entity) {
|
||||
if (entity.dead) {
|
||||
@ -533,7 +581,7 @@
|
||||
return false;
|
||||
} else {
|
||||
UUID uuid = entity.getUniqueID();
|
||||
@@ -841,7 +1074,7 @@
|
||||
@@ -841,7 +1122,7 @@
|
||||
this.f.remove(entity1);
|
||||
} else {
|
||||
if (!(entity instanceof EntityHuman)) {
|
||||
@ -542,7 +590,7 @@
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -894,8 +1127,16 @@
|
||||
@@ -894,8 +1175,16 @@
|
||||
}
|
||||
|
||||
public boolean strikeLightning(Entity entity) {
|
||||
@ -560,7 +608,7 @@
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
@@ -911,10 +1152,20 @@
|
||||
@@ -911,10 +1200,20 @@
|
||||
}
|
||||
|
||||
public Explosion createExplosion(@Nullable Entity entity, double d0, double d1, double d2, float f, boolean flag, boolean flag1) {
|
||||
@ -581,7 +629,7 @@
|
||||
if (!flag1) {
|
||||
explosion.clearBlocks();
|
||||
}
|
||||
@@ -960,7 +1211,8 @@
|
||||
@@ -960,7 +1259,8 @@
|
||||
BlockActionData blockactiondata = (BlockActionData) iterator.next();
|
||||
|
||||
if (this.a(blockactiondata)) {
|
||||
@ -591,7 +639,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -983,6 +1235,7 @@
|
||||
@@ -983,6 +1283,7 @@
|
||||
boolean flag = this.isRaining();
|
||||
|
||||
super.t();
|
||||
@ -599,7 +647,7 @@
|
||||
if (this.n != this.o) {
|
||||
this.server.getPlayerList().a((Packet) (new PacketPlayOutGameStateChange(7, this.o)), this.worldProvider.getDimensionManager().getDimensionID());
|
||||
}
|
||||
@@ -1001,6 +1254,21 @@
|
||||
@@ -1001,6 +1302,21 @@
|
||||
this.server.getPlayerList().sendAll(new PacketPlayOutGameStateChange(7, this.o));
|
||||
this.server.getPlayerList().sendAll(new PacketPlayOutGameStateChange(8, this.q));
|
||||
}
|
||||
@ -621,7 +669,7 @@
|
||||
|
||||
}
|
||||
|
||||
@@ -1030,10 +1298,20 @@
|
||||
@@ -1030,10 +1346,20 @@
|
||||
}
|
||||
|
||||
public void a(EnumParticle enumparticle, boolean flag, double d0, double d1, double d2, int i, double d3, double d4, double d5, double d6, int... aint) {
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren