Skip to content

Commit

Permalink
Fix Tree
Browse files Browse the repository at this point in the history
  • Loading branch information
SammySemicolon committed Nov 22, 2023
1 parent bac49e0 commit e45ccb8
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.sammy.malum.common.block.nature;

import com.sammy.malum.registry.common.block.BlockTagRegistry;
import com.sammy.malum.registry.common.worldgen.ConfiguredFeatureRegistry;
import com.sammy.malum.registry.common.worldgen.*;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Holder;
import net.minecraft.core.registries.Registries;
Expand Down Expand Up @@ -40,10 +40,6 @@ public void advanceTree(ServerLevel level, BlockPos pos, BlockState state, Rando
if (state.getValue(STAGE) == 0) {
level.setBlock(pos, state.cycle(STAGE), 4);
} else {
Holder<ConfiguredFeature<?, ?>> holder = level.registryAccess().registryOrThrow(Registries.CONFIGURED_FEATURE).getHolder(ConfiguredFeatureRegistry.CONFIGURED_RUNEWOOD_TREE).orElse(null);
if (!ForgeEventFactory.blockGrowFeature(level, rand, pos, holder).getResult().equals(Event.Result.DENY)) {
return;
}
tree.get().place(NoneFeatureConfiguration.INSTANCE, level, level.getChunkSource().getGenerator(), rand, pos);
}
}
Expand Down

0 comments on commit e45ccb8

Please sign in to comment.