Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

HumanHickory

Members
  • Joined

  • Last visited

  1. Wow I feel dumb. Yes that was exactly what it was. I'm still new to Java and modding Minecraft so stupid mistakes are in my immediate future. Thank you so much for your help!!
  2. I am attempting to add a tree into the world. All the tree parts are rendering, and are usable, and I can place the sapling but the sapling will not grow either with bone meal or naturally, which is what the bug is. So first I register all the parts of the Cherry Tree. Those are all working, including the sapling. Here is an example of the sapling and a log. The log is a modded FlammableRotatedPillarBlock that sets the object to flammable = true, sets flammability to 5, sets fire spread speed to 5, and tells it what to do when it's clicked on with an axe (aka stripping the log). public static final RegistryObject<Block> CHERRY_LOG = register("cherry_log", () -> new ModFlammableRotatedPillarBlock(BlockBehaviour.Properties.copy(Blocks.OAK_LOG) .requiresCorrectToolForDrops()), CreativeModeTab.TAB_BUILDING_BLOCKS); public static final RegistryObject<Block> CHERRY_SAPLING = register("cherry_sapling", () -> new SaplingBlock(new CherryTreeGrower(), BlockBehaviour.Properties.copy(Blocks.OAK_SAPLING)), CreativeModeTab.TAB_MISC); In another file, I register the cherry tree, and give it the various things a tree needs to grow. public class ModConfiguredFeatures { public static final DeferredRegister<ConfiguredFeature<?, ?>> CONFIGURED_FEATURES = DeferredRegister.create(Registry.CONFIGURED_FEATURE_REGISTRY, HickoryGardenMod.MODID); public static final RegistryObject<ConfiguredFeature<?, ?>> CHERRY = CONFIGURED_FEATURES.register("cherry", () -> new ConfiguredFeature<>(Feature.TREE, new TreeConfiguration.TreeConfigurationBuilder( BlockStateProvider.simple(BlockInit.CHERRY_LOG.get()), new StraightTrunkPlacer(5, 6, 3), BlockStateProvider.simple(BlockInit.CHERRY_LEAVES.get()), new BlobFoliagePlacer(ConstantInt.of(2), ConstantInt.of(0), 4), new TwoLayersFeatureSize(1, 0, 2)).build())); } Then, I created a CherryTreeGrower class that extends AbstractTreeGrower, using that CHERRY object. public class CherryTreeGrower extends AbstractTreeGrower { @Nullable @Override protected Holder<? extends ConfiguredFeature<?, ?>> getConfiguredFeature(RandomSource pRandom, boolean pLargeHive) { return ModConfiguredFeatures.CHERRY.getHolder().get(); } } The Error I get is java.lang.IllegalStateException: Trying to access unbound value 'ResourceKey[minecraft:worldgen/configured_feature / hickorygardenmod:cherry]' from registry Registry[ResourceKey[minecraft:root / minecraft:worldgen/configured_feature] (Stable)] Other than the necessary json files and png files in the resources folder, I don't refer to the cherry tree components anywhere else. Thoughts?

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.