Feature fix
This commit is contained in:
parent
2d53cedb90
commit
d272597e87
7 changed files with 6 additions and 7 deletions
|
@ -23,13 +23,13 @@ import ru.betterend.client.ERenderLayer;
|
|||
import ru.betterend.client.IRenderTypeable;
|
||||
import ru.betterend.registry.BlockTagRegistry;
|
||||
import ru.betterend.util.BlocksHelper;
|
||||
import ru.betterend.world.features.DefaultFeature;
|
||||
import ru.betterend.world.features.EndFeature;
|
||||
|
||||
public class BlockFeatureSapling extends BlockBaseNotFull implements Fertilizable, IRenderTypeable {
|
||||
private static final VoxelShape SHAPE = Block.createCuboidShape(4, 2, 4, 12, 16, 12);
|
||||
private final DefaultFeature feature;
|
||||
private final EndFeature feature;
|
||||
|
||||
public BlockFeatureSapling(DefaultFeature feature) {
|
||||
public BlockFeatureSapling(EndFeature feature) {
|
||||
super(FabricBlockSettings.of(Material.PLANT)
|
||||
.breakByHand(true)
|
||||
.collidable(false)
|
||||
|
@ -39,7 +39,7 @@ public class BlockFeatureSapling extends BlockBaseNotFull implements Fertilizabl
|
|||
this.feature = feature;
|
||||
}
|
||||
|
||||
public BlockFeatureSapling(DefaultFeature feature, int light) {
|
||||
public BlockFeatureSapling(EndFeature feature, int light) {
|
||||
super(FabricBlockSettings.of(Material.PLANT)
|
||||
.breakByHand(true)
|
||||
.collidable(false)
|
||||
|
@ -81,7 +81,7 @@ public class BlockFeatureSapling extends BlockBaseNotFull implements Fertilizabl
|
|||
@Override
|
||||
public void grow(ServerWorld world, Random random, BlockPos pos, BlockState state) {
|
||||
BlocksHelper.setWithoutUpdate(world, pos, Blocks.AIR.getDefaultState());
|
||||
feature.generate(world, world.getChunkManager().getChunkGenerator(), random, pos, DefaultFeatureConfig.INSTANCE);
|
||||
feature.getFeature().generate(world, world.getChunkManager().getChunkGenerator(), random, pos, DefaultFeatureConfig.INSTANCE);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue