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.

Enemeez

Members
  • Joined

  • Last visited

  1. With my mod adding a few crops and food, I'd like for them to be able to be recycled in the composter block. However, the way Vanilla Minecraft registers items as compostable is through a private method within the composter class. Does anyone have suggestions on how I can register my items as compostable without having to create a new variant of the composter?
  2. private static final Set<Item> TEMPTATION_ITEMS = Sets.newHashSet(Items.CARROT, Items.POTATO, Items.BEETROOT); protected void initEntityAI() { this.tasks.addTask(4, new EntityAITempt(this, 1.2D, false, TEMPTATION_ITEMS)); } Just to clarify, I did not make a custom entity. I'm trying to tempt vanilla animals. With this in mind, here is a snippet of the code from the EntityPig class. To add my item to TEMPTATION_ITEMS, will I need to create myself a new EntityPig class with my item inside the set? Or how do I go about modifying this?
  3. Thanks, I got that the breeding to work. What about making the item attract animals while being only held in your hand?
  4. Like wheat and seeds in vanilla, how can I give an item the ability to breed animals?
  5. I want acacia leaves to drop this fruit item. I know Blocks.LEAVES are oak, birch, spruce, and jungle blocks, and Blocks.LEAVES2 are acacia and dark oak, but how do I reference specifically acacia leaves in LEAVES2? Here is a part of my code: if (block.equals(Blocks.LEAVES2)) { //if(Math.random()<0.05) world.spawnEntity(new EntityItem(world, pos.getX(), pos.getY(), pos.getZ(), new ItemStack(ModItems.FRUIT))); }

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.