Tag migration

This commit is contained in:
paulevsGitch 2021-07-21 16:04:24 +03:00
parent 92a392cffe
commit a390486d5b
76 changed files with 224 additions and 164 deletions

View file

@ -54,7 +54,7 @@ public abstract class ChorusFlowerBlockMixin extends Block {
@Inject(method = "randomTick", at = @At("HEAD"), cancellable = true)
private void be_randomTick(BlockState state, ServerLevel world, BlockPos pos, Random random, CallbackInfo info) {
if (world.getBlockState(pos.below()).is(TagAPI.END_GROUND)) {
if (world.getBlockState(pos.below()).is(TagAPI.BLOCK_END_GROUND)) {
BlockPos up = pos.above();
if (world.isEmptyBlock(up) && up.getY() < 256) {
int i = state.getValue(ChorusFlowerBlock.AGE);
@ -119,7 +119,7 @@ public abstract class ChorusFlowerBlockMixin extends Block {
@Inject(method = "placeDeadFlower", at = @At("HEAD"), cancellable = true)
private void be_placeDeadFlower(Level world, BlockPos pos, CallbackInfo info) {
BlockState down = world.getBlockState(pos.below());
if (down.is(Blocks.CHORUS_PLANT) || down.is(TagAPI.GEN_TERRAIN)) {
if (down.is(Blocks.CHORUS_PLANT) || down.is(TagAPI.BLOCK_GEN_TERRAIN)) {
world.setBlock(pos, this.defaultBlockState().setValue(BlockStateProperties.AGE_5, 5), 2);
world.levelEvent(1034, pos, 0);
}