BlockUtil replacement

This commit is contained in:
paulevsGitch 2021-06-06 11:54:11 +03:00
parent c8cef8e055
commit 0b336febd8
114 changed files with 421 additions and 546 deletions

View file

@ -27,8 +27,9 @@ import net.minecraft.world.level.block.state.properties.BlockStateProperties;
import net.minecraft.world.phys.shapes.CollisionContext;
import net.minecraft.world.phys.shapes.VoxelShape;
import ru.bclib.api.TagAPI;
import ru.bclib.util.BlocksHelper;
import ru.betterend.blocks.BlockProperties;
import ru.betterend.registry.EndBlocks;
import ru.betterend.util.BlocksHelper;
import ru.betterend.world.generator.GeneratorOptions;
@Mixin(value = ChorusFlowerBlock.class, priority = 100)
@ -61,7 +62,7 @@ public abstract class ChorusFlowerBlockMixin extends Block {
if (i < 5) {
this.placeGrownFlower(world, up, i + 1);
if (GeneratorOptions.changeChorusPlant()) {
BlocksHelper.setWithoutUpdate(world, pos, plant.defaultBlockState().setValue(ChorusPlantBlock.UP, true).setValue(ChorusPlantBlock.DOWN, true).setValue(BlocksHelper.ROOTS, true));
BlocksHelper.setWithoutUpdate(world, pos, plant.defaultBlockState().setValue(ChorusPlantBlock.UP, true).setValue(ChorusPlantBlock.DOWN, true).setValue(BlockProperties.ROOTS, true));
}
else {
BlocksHelper.setWithoutUpdate(world, pos, plant.defaultBlockState().setValue(ChorusPlantBlock.UP, true).setValue(ChorusPlantBlock.DOWN, true));
@ -76,7 +77,7 @@ public abstract class ChorusFlowerBlockMixin extends Block {
private static void be_generatePlant(LevelAccessor world, BlockPos pos, Random random, int size, CallbackInfo info) {
BlockState state = world.getBlockState(pos);
if (GeneratorOptions.changeChorusPlant() && state.is(Blocks.CHORUS_PLANT)) {
BlocksHelper.setWithoutUpdate(world, pos, state.setValue(BlocksHelper.ROOTS, true));
BlocksHelper.setWithoutUpdate(world, pos, state.setValue(BlockProperties.ROOTS, true));
}
}