1

[1.7.10] Mob Drops Problem!

Charles_Toone's Avatar Charles_Toone7/12/16 4:26 am
1 emeralds 199 1
7/18/2016 3:05 pm
jtrent238's Avatar jtrent238
so i have been working on a personal mod, just learning some stuff here and there...
made my first items, and made a event for them to drop from mobs, and at a %

the problem is when i try to add my custom items to drop from mobs, there seems to be something wrong with my "path" (not sure if that is what i would call it)

here is the code i am using...

Click to reveal
package com.toone.basicmod.Eventhandler;

import java.util.Random;

import com.toone.basicmod.basicmod;
import cpw.mods.fml.common.eventhandler.EventPriority;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import net.minecraft.entity.monster.EntityMob;
import net.minecraftforge.event.entity.living.LivingDropsEvent;

public class EventHandler {
public static double rand;
public Random r = new Random();

@SubscribeEvent
public void onEntityDrop(LivingDropsEvent event) {

if(event.entityLiving instanceof EntityMob) {
event.entityLiving.dropItem(basicmod.item.TranquilShot, r.nextInt(2));
event.entityLiving.dropItem(basicmod.item.ShardSword, r.nextInt(2));
}
}}
Posted by Charles_Toone's Avatar
Charles_Toone
Level 1 : New Miner
0

Create an account or sign in to comment.

1

1
07/18/2016 3:05 pm
Level 67 : High Grandmaster Modder
jtrent238
jtrent238's Avatar
What mob are you trying to make do the drops?

This is from my FoodMod and Might Help:
http://bit.ly/2a3YicQ
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome