Chorus plant shape fix

This commit is contained in:
paulevsGitch 2021-03-29 08:52:22 +03:00
parent cee5c914f9
commit 5e1b661905

View file

@ -90,9 +90,14 @@ public abstract class ChorusFlowerBlockMixin extends Block {
private void die(World world, BlockPos pos) {} private void die(World world, BlockPos pos) {}
@Override @Override
public VoxelShape getOutlineShape(BlockState state, BlockView view, BlockPos pos, ShapeContext ePos) { public VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) {
if (GeneratorOptions.changeChorusPlant()) {
return state.get(ChorusFlowerBlock.AGE) == 5 ? SHAPE_HALF : SHAPE_FULL; return state.get(ChorusFlowerBlock.AGE) == 5 ? SHAPE_HALF : SHAPE_FULL;
} }
else {
return super.getOutlineShape(state, world, pos, context);
}
}
@Inject(method = "die", at = @At("HEAD"), cancellable = true) @Inject(method = "die", at = @At("HEAD"), cancellable = true)
private void beOnDie(World world, BlockPos pos, CallbackInfo info) { private void beOnDie(World world, BlockPos pos, CallbackInfo info) {