Jump to content

How to add Tree decorators to my tree?


LB2

Recommended Posts

I maded a tree and I want it to spawn with vines but when I grow the sapling minecraft crashes.

The code:

public static final ConfiguredFeature<BaseTreeFeatureConfig, ?> JACARANDA =

register("jacaranda", Feature.TREE.configured(( new BaseTreeFeatureConfig.Builder(

new SimpleBlockStateProvider(com.LB.foodstuffs.block.ModBlocks.JACARANDA_LOG.get().defaultBlockState()),

new SimpleBlockStateProvider(com.LB.foodstuffs.block.ModBlocks.JACARANDA_LEAVES.get().defaultBlockState()),

new FancyFoliagePlacer(FeatureSpread.fixed(3), FeatureSpread.fixed(3), 3),

new FancyTrunkPlacer(5, 4, 2),

new TwoLayerFeature(1, 0, 1))).decorators((List<TreeDecorator>) new TrunkVineTreeDecorator()).build()));

 

Link to comment
Share on other sites

Only providing snippets of code out of context and no error message means you are unlikely to get help.

 

And directly registering features hasn't been the correct thing to do since at least minecraft 1.18.1

Boilerplate:

If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one.

If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install

Large files should be posted to a file sharing site like https://gist.github.com  You should also read the support forum sticky post.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.