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.

cronus3

Members
  • Joined

  • Last visited

  1. Thanks. I'm pretty good at missing stuff.
  2. I can get animals to drop as many dollarBills as I want if I copy and paste "event.getEntityLiving().entityDropItem(new ItemStack(ModItems.dollarBill), 1);" but changing the integer at the end does nothing. What am I missing? package yourmod.tutorial.drops; import java.util.Random; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLiving; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.monster.EntityMob; import net.minecraft.entity.passive.EntityAnimal; import net.minecraft.entity.passive.EntityCow; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraftforge.event.entity.living.LivingDropsEvent; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import yourmod.tutorial.item.ModItems; public class DropHandler { @SubscribeEvent public void onEntityDrop(LivingDropsEvent event) { if (event.getEntityLiving() instanceof EntityAnimal) { //Copying and pasting this line of code is the only way to get EnitityAnimal to drop multiple items, changing the 1 does nothing event.getEntityLiving().entityDropItem(new ItemStack(ModItems.dollarBill), 1); event.getEntityLiving().entityDropItem(new ItemStack(ModItems.dollarBill), 1); event.getEntityLiving().entityDropItem(new ItemStack(ModItems.dollarBill), 1); }

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.