Posted August 12, 201510 yr Hello and sry 4 my silly questions again. I tried a normal drop as well but it dont works.. I'm familiar with the codes from 1.6... but 1.8 is different. v.v I tried to update the 1.6 code to 1.8: public class ItemLooting { public static double rand; public Random r = new Random(); public void onEntityDrop(LivingDropsEvent event) { if(event.entityLiving instanceof EntityCreeper) { event.entityLiving.dropItem(BasicEWM.fireCore, r.nextInt(2)); } } } And add this to my ModDatabase: MinecraftForge.EVENT_BUS.register(new ItemLooting());
August 12, 201510 yr You need to add the @SubscribeEvent annotation above your event method, and Random#nextInt(2) gives you a value of either 0 or 1, so you might be adding a stack of size 0; probably want to add 1 to the result, or use it as the condition. http://i.imgur.com/NdrFdld.png[/img]
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.