Don't construct new BaseBlock

This commit is contained in:
Jesse Boyd
2019-04-06 01:12:57 +11:00
parent 99db2d557a
commit 144215c813
12 changed files with 15 additions and 18 deletions

View File

@ -245,7 +245,7 @@ public class AnvilChunk13 implements Chunk {
BlockState state = sectionBlocks != null ? sectionBlocks[(yIndex << 8) | (z << 4) | x] : BlockTypes.AIR.getDefaultState();
if (state.getMaterial().hasContainer()) {
CompoundTag tileEntity = getBlockTileEntity(position);
if (tileEntity != null) return new BaseBlock(state, tileEntity);
return state.toBaseBlock(tileEntity);
}
return state.toBaseBlock();