Feature fix

This commit is contained in:
paulevsGitch 2020-09-30 11:32:46 +03:00
parent 2d53cedb90
commit d272597e87
7 changed files with 6 additions and 7 deletions

View file

@ -2,10 +2,9 @@ package ru.betterend.blocks;
import ru.betterend.blocks.basis.BlockFeatureSapling;
import ru.betterend.registry.FeatureRegistry;
import ru.betterend.world.features.DefaultFeature;
public class BlockMossyGlowshroomSapling extends BlockFeatureSapling {
public BlockMossyGlowshroomSapling() {
super((DefaultFeature) FeatureRegistry.MOSSY_GLOWSHROOM.getFeature(), 7);
super(FeatureRegistry.MOSSY_GLOWSHROOM, 7);
}
}

View file

@ -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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Before After
Before After