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.

LB2

Members
  • Joined

  • Last visited

  1. LB2 started following Custom Tree Decorator
  2. I want to make a tree decorator that will generate a beehive under branches of my tree. I have no idea how to check for branches and make beehives generate because TreeDecorator.Context.logs() is just a block pos and i dont understand how it works. i hope ill get an answer here. Edit: I coded it myself I cant post a photo but still.
  3. LB2 replied to LB2's topic in Modder Support
    I just registered the entity type Thats the class: public class ModEntityTypes extends EntityType{ private static final Logger LOGGER = LogUtils.getLogger(); public static final DeferredRegister<EntityType<?>> MOD_ENTITY_TYPES = DeferredRegister.create(ForgeRegistries.ENTITIES, Foodstuffs.MOD_ID); public static final EntityType<ModBoat> MOD_BOAT = register("mod_boat", ModEntityTypes.Builder.<ModBoat>of(ModBoat::new, MobCategory.MISC).sized(1.375F, 0.5625F).clientTrackingRange(10)); public static final EntityType<ModChestBoat> MOD_CHEST_BOAT = register("mod_chest_boat", ModEntityTypes.Builder.<ModChestBoat>of(ModChestBoat::new, MobCategory.MISC).sized(1.375F, 0.5625F).clientTrackingRange(10)); public ModEntityTypes(EntityFactory p_20574_, MobCategory p_20575_, boolean p_20576_, boolean p_20577_, boolean p_20578_, boolean p_20579_, ImmutableSet p_20580_, EntityDimensions p_20581_, int p_20582_, int p_20583_) { super(p_20574_, p_20575_, p_20576_, p_20577_, p_20578_, p_20579_, p_20580_, p_20581_, p_20582_, p_20583_); } private static <T extends Entity> EntityType<T> register(String p_20635_, ModEntityTypes.Builder<T> p_20636_) { return Registry.register(Registry.ENTITY_TYPE, p_20635_, p_20636_.build(p_20635_)); } public static void register(IEventBus eventBus) { MOD_ENTITY_TYPES.register(eventBus); } }
  4. LB2 replied to LB2's topic in Modder Support
    I registered the Boat and Chest Boat Classes and I registered the entity type and the renderer Also i have an error when I spawn the boat, the world just crashes. (Caused by: java.lang.IllegalStateException: Registry is already frozen)
  5. LB2 replied to LB2's topic in Modder Support
    I maded the Boat and the BoatItem classes and it works, but when i spawn the boat the world crashes
  6. LB2 replied to LB2's topic in Modder Support
    public class ModBoat extends Boat { private static final EntityDataAccessor<Integer> DATA_ID_TYPE = SynchedEntityData.defineId(Boat.class, EntityDataSerializers.INT); public ModBoat(EntityType<? extends Boat> p_38290_, Level p_38291_) { super(p_38290_, p_38291_); } public ModBoat.Type getModBoatType() { return ModBoat.Type.byId(this.entityData.get(DATA_ID_TYPE)); } public void setType(ModBoat.Type p_38333_) { this.entityData.set(DATA_ID_TYPE, p_38333_.ordinal()); } public static enum Type { CHERRY(ModBlocks.CHERRY_PLANKS.get(), "cherry"), ALMOND(ModBlocks.ALMOND_PLANKS.get(), "almond"), PEACH(ModBlocks.PEACH_PLANKS.get(), "peach"), APPLE(ModBlocks.APPLE_PLANKS.get(), "apple"), PLUM(ModBlocks.PLUM_PLANKS.get(), "plum"), PEAR(ModBlocks.PEAR_PLANKS.get(), "pear"); private final String name; private final Block planks; private Type(Block p_38427_, String p_38428_) { this.name = p_38428_; this.planks = p_38427_; } public String getName() { return this.name; } public Block getPlanks() { return this.planks; } public String toString() { return this.name; } public static ModBoat.Type byId(int p_38431_) { ModBoat.Type[] aboat$type = values(); if (p_38431_ < 0 || p_38431_ >= aboat$type.length) { p_38431_ = 0; } return aboat$type[p_38431_]; } } } ---------------------------------------------------------- Thats all I got in this class
  7. I maded a custom wood type and I want to add a boat.
  8. I found nothing that could help me (yes im dumb)
  9. You said to use BiomeColors.getAverageFoliageColor(), but I dont know what value to put in there. (sorry for dumb questions)
  10. I want to make leaves
  11. I maded a biome datapack. I dont know how to import it.
  12. 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()));
  13. I maded a custom tree and I want it to generate in my own biome

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.