mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-04 03:56:41 +00:00
Fixes #1112
This commit is contained in:
@ -28,8 +28,8 @@ import com.sk89q.jnbt.NBTUtils;
|
||||
import com.sk89q.jnbt.Tag;
|
||||
import com.sk89q.worldedit.BlockVector;
|
||||
import com.sk89q.worldedit.Vector;
|
||||
import com.sk89q.worldedit.blocks.BaseBlock;
|
||||
import com.sk89q.worldedit.registry.state.Property;
|
||||
import com.sk89q.worldedit.world.block.BaseBlock;
|
||||
import com.sk89q.worldedit.world.DataException;
|
||||
import com.sk89q.worldedit.world.block.BlockState;
|
||||
import com.sk89q.worldedit.world.block.BlockType;
|
||||
@ -230,7 +230,7 @@ public class AnvilChunk13 implements Chunk {
|
||||
}
|
||||
|
||||
@Override
|
||||
public BaseBlock getBlock(Vector position) throws DataException {
|
||||
public BlockState getBlock(Vector position) throws DataException {
|
||||
int x = position.getBlockX() - rootX * 16;
|
||||
int y = position.getBlockY();
|
||||
int z = position.getBlockZ() - rootZ * 16;
|
||||
@ -244,10 +244,11 @@ public class AnvilChunk13 implements Chunk {
|
||||
|
||||
BlockState[] sectionBlocks = blocks[section];
|
||||
BlockState state = sectionBlocks != null ? sectionBlocks[(yIndex << 8) | (z << 4) | x] : BlockTypes.AIR.getDefaultState();
|
||||
|
||||
CompoundTag tileEntity = getBlockTileEntity(position);
|
||||
|
||||
return state.toBaseBlock(tileEntity);
|
||||
if (state.getMaterial().hasContainer()) {
|
||||
CompoundTag tileEntity = getBlockTileEntity(position);
|
||||
if (tileEntity != null) return new BaseBlock(state, tileEntity);
|
||||
}
|
||||
return state;
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user