Migrating to BCLib (WIP)
This commit is contained in:
parent
61d4a33cf6
commit
3668a4694a
184 changed files with 802 additions and 4348 deletions
|
@ -1,13 +1,13 @@
|
|||
package ru.betterend.world.features;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.world.level.WorldGenLevel;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import ru.bclib.blocks.BaseDoublePlantBlock;
|
||||
import ru.bclib.util.BlocksHelper;
|
||||
import ru.betterend.blocks.basis.DoublePlantBlock;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
public class UnderwaterPlantFeature extends UnderwaterPlantScatter {
|
||||
private final Block plant;
|
||||
|
@ -24,11 +24,11 @@ public class UnderwaterPlantFeature extends UnderwaterPlantScatter {
|
|||
|
||||
@Override
|
||||
public void generate(WorldGenLevel world, Random random, BlockPos blockPos) {
|
||||
if (plant instanceof DoublePlantBlock) {
|
||||
if (plant instanceof BaseDoublePlantBlock) {
|
||||
int rot = random.nextInt(4);
|
||||
BlockState state = plant.defaultBlockState().setValue(DoublePlantBlock.ROTATION, rot);
|
||||
BlockState state = plant.defaultBlockState().setValue(BaseDoublePlantBlock.ROTATION, rot);
|
||||
BlocksHelper.setWithoutUpdate(world, blockPos, state);
|
||||
BlocksHelper.setWithoutUpdate(world, blockPos.above(), state.setValue(DoublePlantBlock.TOP, true));
|
||||
BlocksHelper.setWithoutUpdate(world, blockPos.above(), state.setValue(BaseDoublePlantBlock.TOP, true));
|
||||
}
|
||||
else {
|
||||
BlocksHelper.setWithoutUpdate(world, blockPos, plant);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue