Feature fix
|
@ -2,10 +2,9 @@ package ru.betterend.blocks;
|
||||||
|
|
||||||
import ru.betterend.blocks.basis.BlockFeatureSapling;
|
import ru.betterend.blocks.basis.BlockFeatureSapling;
|
||||||
import ru.betterend.registry.FeatureRegistry;
|
import ru.betterend.registry.FeatureRegistry;
|
||||||
import ru.betterend.world.features.DefaultFeature;
|
|
||||||
|
|
||||||
public class BlockMossyGlowshroomSapling extends BlockFeatureSapling {
|
public class BlockMossyGlowshroomSapling extends BlockFeatureSapling {
|
||||||
public BlockMossyGlowshroomSapling() {
|
public BlockMossyGlowshroomSapling() {
|
||||||
super((DefaultFeature) FeatureRegistry.MOSSY_GLOWSHROOM.getFeature(), 7);
|
super(FeatureRegistry.MOSSY_GLOWSHROOM, 7);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,13 +23,13 @@ import ru.betterend.client.ERenderLayer;
|
||||||
import ru.betterend.client.IRenderTypeable;
|
import ru.betterend.client.IRenderTypeable;
|
||||||
import ru.betterend.registry.BlockTagRegistry;
|
import ru.betterend.registry.BlockTagRegistry;
|
||||||
import ru.betterend.util.BlocksHelper;
|
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 {
|
public class BlockFeatureSapling extends BlockBaseNotFull implements Fertilizable, IRenderTypeable {
|
||||||
private static final VoxelShape SHAPE = Block.createCuboidShape(4, 2, 4, 12, 16, 12);
|
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)
|
super(FabricBlockSettings.of(Material.PLANT)
|
||||||
.breakByHand(true)
|
.breakByHand(true)
|
||||||
.collidable(false)
|
.collidable(false)
|
||||||
|
@ -39,7 +39,7 @@ public class BlockFeatureSapling extends BlockBaseNotFull implements Fertilizabl
|
||||||
this.feature = feature;
|
this.feature = feature;
|
||||||
}
|
}
|
||||||
|
|
||||||
public BlockFeatureSapling(DefaultFeature feature, int light) {
|
public BlockFeatureSapling(EndFeature feature, int light) {
|
||||||
super(FabricBlockSettings.of(Material.PLANT)
|
super(FabricBlockSettings.of(Material.PLANT)
|
||||||
.breakByHand(true)
|
.breakByHand(true)
|
||||||
.collidable(false)
|
.collidable(false)
|
||||||
|
@ -81,7 +81,7 @@ public class BlockFeatureSapling extends BlockBaseNotFull implements Fertilizabl
|
||||||
@Override
|
@Override
|
||||||
public void grow(ServerWorld world, Random random, BlockPos pos, BlockState state) {
|
public void grow(ServerWorld world, Random random, BlockPos pos, BlockState state) {
|
||||||
BlocksHelper.setWithoutUpdate(world, pos, Blocks.AIR.getDefaultState());
|
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
|
@Override
|
||||||
|
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |