mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-04 03:56:41 +00:00
Remove stub injector methods
This commit is contained in:
@ -36,6 +36,6 @@ public interface Chunk {
|
||||
* @return block the block
|
||||
* @throws DataException thrown on data error
|
||||
*/
|
||||
BaseBlock getBlock(Vector position) throws DataException;
|
||||
BlockState getBlock(Vector position) throws DataException;
|
||||
|
||||
}
|
||||
|
@ -155,8 +155,8 @@ public class OldChunk implements Chunk {
|
||||
}
|
||||
|
||||
@Override
|
||||
public BaseBlock getBlock(Vector position) throws DataException {
|
||||
if(position.getBlockY() >= 128) new BaseBlock(BlockTypes.AIR);
|
||||
public BlockState getBlock(Vector position) throws DataException {
|
||||
if(position.getBlockY() >= 128) return BlockTypes.AIR.getDefaultState();
|
||||
int id, dataVal;
|
||||
|
||||
int x = position.getBlockX() - rootX * 16;
|
||||
@ -183,9 +183,11 @@ public class OldChunk implements Chunk {
|
||||
}
|
||||
|
||||
BlockState state = LegacyMapper.getInstance().getBlockFromLegacy(id, dataVal);
|
||||
CompoundTag tileEntity = getBlockTileEntity(position);
|
||||
|
||||
return new BaseBlock(state, tileEntity);
|
||||
if (state.getBlockType().getMaterial().hasContainer()) {
|
||||
CompoundTag tileEntity = getBlockTileEntity(position);
|
||||
if (tileEntity != null) return new BaseBlock(state, tileEntity);
|
||||
}
|
||||
return state;
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user