Migrating to BCLib (WIP)

This commit is contained in:
Aleksey 2021-06-11 15:47:04 +03:00
parent 61d4a33cf6
commit 3668a4694a
184 changed files with 802 additions and 4348 deletions

View file

@ -1,17 +1,17 @@
package ru.betterend.world.features;
import java.util.Random;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.world.level.WorldGenLevel;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.block.state.properties.BlockStateProperties;
import ru.bclib.blocks.BaseAttachedBlock;
import ru.bclib.util.BlocksHelper;
import ru.betterend.blocks.basis.AttachedBlock;
import ru.betterend.blocks.basis.EndWallPlantBlock;
import java.util.Random;
public class WallPlantFeature extends WallScatterFeature {
private final Block block;
@ -26,7 +26,7 @@ public class WallPlantFeature extends WallScatterFeature {
BlockState state = block.defaultBlockState().setValue(EndWallPlantBlock.FACING, dir);
return block.canSurvive(state, world, pos);
}
else if (block instanceof AttachedBlock) {
else if (block instanceof BaseAttachedBlock) {
BlockState state = block.defaultBlockState().setValue(BlockStateProperties.FACING, dir);
return block.canSurvive(state, world, pos);
}
@ -39,7 +39,7 @@ public class WallPlantFeature extends WallScatterFeature {
if (block instanceof EndWallPlantBlock) {
state = state.setValue(EndWallPlantBlock.FACING, dir);
}
else if (block instanceof AttachedBlock) {
else if (block instanceof BaseAttachedBlock) {
state = state.setValue(BlockStateProperties.FACING, dir);
}
BlocksHelper.setWithoutUpdate(world, pos, state);