mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-05 20:36:42 +00:00
Remove stub injector methods
This commit is contained in:
@ -127,13 +127,13 @@ public class NullWorld extends AbstractWorld {
|
||||
}
|
||||
|
||||
@Override
|
||||
public LazyBlock getLazyBlock(Vector position) {
|
||||
return new LazyBlock(getBlock(position), this, position);
|
||||
public BlockState getLazyBlock(Vector position) {
|
||||
return getBlock(position);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BaseBlock getFullBlock(Vector position) {
|
||||
return new BaseBlock(getBlock(position));
|
||||
public BlockState getFullBlock(Vector position) {
|
||||
return getBlock(position);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -86,7 +86,5 @@ public class BaseBiome {
|
||||
}
|
||||
|
||||
|
||||
public static Class<?> inject() {
|
||||
return BaseBiome.class;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -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