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

@ -203,8 +203,8 @@ public class WorldEditBinding {
@BindingMatch(type = {BaseBlock.class, BlockState.class, BlockStateHolder.class},
behavior = BindingBehavior.CONSUMES,
consumedCount = 1)
public BaseBlock getBaseBlock(ArgumentStack context) throws ParameterException, WorldEditException {
return new BaseBlock(getBlockState(context));
public BaseBlock getBaseBlock(ArgumentStack context) throws ParameterException, WorldEditException {
return getBlockState(context).toBaseBlock();
}
/**

View File

@ -153,6 +153,6 @@ public class ServerCUIHandler {
structureTag.put("id", new StringTag(BlockTypes.STRUCTURE_BLOCK.getId()));
// return BlockTypes.STRUCTURE_BLOCK.getDefaultState().toBaseBlock(new CompoundTag(structureTag));
return new BaseBlock(BlockTypes.STRUCTURE_BLOCK.getDefaultState(), new CompoundTag(structureTag));
return BlockTypes.STRUCTURE_BLOCK.getDefaultState().toBaseBlock(new CompoundTag(structureTag));
}
}