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.

Collin1971

Members
  • Joined

  1. How would one go about adding a item to the event?
  2. OK, so I've been trying to add custom drops to vanilla mobs, and my slightly edited code of someone Else's works fine, except that it drops a phantom item along with the real item (one can be picked up and other cannot). This class is inside my main package, (not inside the one with the .client suffix), I'm at a complete loss of why this is happening, the code compiles without a single error and Minecraft doesn't warn/error/info anything. EntityDropEvent class: import net.minecraft.entity.passive.EntitySheep; import net.minecraftforge.event.*; import net.minecraftforge.event.entity.living.LivingDeathEvent; import net.minecraftforge.event.ForgeSubscribe; public class LivingDropsEvent{ @ForgeSubscribe public void onEntityDrop(LivingDeathEvent event) { if (event.entityLiving instanceof EntitySheep) { EntitySheep entity = (EntitySheep)event.entityLiving; //The integer at the end relates to how many potato will be dropped. entity.dropItem(MoarFoods.rawLamb.itemID, 1); } } } Main Forge Class: // Custom Events MinecraftForge.EVENT_BUS.register(new LivingDropsEvent());

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.