1
[1.7.10] Mob Drops Problem!
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...
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));
}
}}
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));
}
}}
Create an account or sign in to comment.
1
1
What mob are you trying to make do the drops?
This is from my FoodMod and Might Help:
http://bit.ly/2a3YicQ
This is from my FoodMod and Might Help:
http://bit.ly/2a3YicQ