This commit is contained in:
paulevsGitch 2020-09-30 12:02:20 +03:00
parent 29a9c9f613
commit 419d8a2dab
11 changed files with 93 additions and 26 deletions

View file

@ -1,7 +1,6 @@
package ru.betterend.blocks;
import net.minecraft.world.gen.feature.DefaultFeatureConfig;
import net.minecraft.world.gen.feature.Feature;
import net.minecraft.world.gen.feature.ConfiguredFeature;
import ru.betterend.blocks.basis.BlockFeatureSapling;
import ru.betterend.registry.FeatureRegistry;
@ -11,7 +10,7 @@ public class BlockMossyGlowshroomSapling extends BlockFeatureSapling {
}
@Override
protected Feature<DefaultFeatureConfig> getFeature() {
return FeatureRegistry.MOSSY_GLOWSHROOM.getFeature();
protected ConfiguredFeature<?,?> getFeature() {
return FeatureRegistry.MOSSY_GLOWSHROOM.getFeatureConfigured();
}
}

View file

@ -18,8 +18,7 @@ import net.minecraft.world.BlockView;
import net.minecraft.world.World;
import net.minecraft.world.WorldAccess;
import net.minecraft.world.WorldView;
import net.minecraft.world.gen.feature.DefaultFeatureConfig;
import net.minecraft.world.gen.feature.Feature;
import net.minecraft.world.gen.feature.ConfiguredFeature;
import ru.betterend.client.ERenderLayer;
import ru.betterend.client.IRenderTypeable;
import ru.betterend.registry.BlockTagRegistry;
@ -47,7 +46,7 @@ public abstract class BlockFeatureSapling extends BlockBaseNotFull implements Fe
.ticksRandomly());
}
protected abstract Feature<DefaultFeatureConfig> getFeature();
protected abstract ConfiguredFeature<?,?> getFeature();
@Override
public VoxelShape getOutlineShape(BlockState state, BlockView view, BlockPos pos, ShapeContext ePos) {
@ -79,8 +78,8 @@ public abstract class BlockFeatureSapling extends BlockBaseNotFull implements Fe
@Override
public void grow(ServerWorld world, Random random, BlockPos pos, BlockState state) {
BlocksHelper.setWithoutUpdate(world, pos, Blocks.AIR.getDefaultState());
getFeature().generate(world, world.getChunkManager().getChunkGenerator(), random, pos, DefaultFeatureConfig.INSTANCE);
BlocksHelper.setWithoutUpdate(world, pos, Blocks.AIR.getDefaultState());
getFeature().generate(world, world.getChunkManager().getChunkGenerator(), random, pos);
}
@Override