mirror of
https://github.com/PaperMC/Paper.git
synced 2025-02-27 14:34:57 +01:00
Don't create tile entity when block placement fails. Fixes BUKKIT-2924
End portals can only be placed in the end during the dragon's death. Attempts to place them outside of this window causes the block to remove itself. However, we still create the tile entity for the portal which leads to exceptions spamming the console about a tile entity existing without the appropriate block. In these cases we should not place the tile entity at all.
This commit is contained in:
parent
d21c5f3871
commit
9add7d3000
1 changed files with 6 additions and 0 deletions
|
@ -437,6 +437,12 @@ public class Chunk {
|
|||
}
|
||||
|
||||
if (Block.byId[l] instanceof BlockContainer) {
|
||||
// CraftBukkit start - don't create tile entity if placement failed
|
||||
if (this.getTypeId(i, j, k) != l) {
|
||||
return false;
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
tileentity = this.e(i, j, k);
|
||||
if (tileentity == null) {
|
||||
tileentity = ((BlockContainer) Block.byId[l]).a(this.world);
|
||||
|
|
Loading…
Add table
Reference in a new issue