WIP: Ender Ore generation

This commit is contained in:
Aleksey 2020-09-30 11:50:27 +03:00
parent d272597e87
commit ad0834b25f
10 changed files with 90 additions and 18 deletions

View file

@ -19,6 +19,7 @@ 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 ru.betterend.client.ERenderLayer;
import ru.betterend.client.IRenderTypeable;
import ru.betterend.registry.BlockTagRegistry;
@ -81,7 +82,9 @@ 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.getFeature().generate(world, world.getChunkManager().getChunkGenerator(), random, pos, DefaultFeatureConfig.INSTANCE);
@SuppressWarnings("unchecked")
Feature<DefaultFeatureConfig> defFeature = (Feature<DefaultFeatureConfig>) feature.getFeature();
defFeature.generate(world, world.getChunkManager().getChunkGenerator(), random, pos, DefaultFeatureConfig.INSTANCE);
}
@Override