blob: b83472a1c39351cbb3c34e55a22eed1fe5d7c12b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
package fyresmodjam.blessings.standard;
import fyresmodjam.ModjamMod;
import net.minecraft.init.Items;
import net.minecraftforge.event.entity.living.LivingDeathEvent;
public class ThiefBlessing extends StandardBlessing {
public ThiefBlessing() {
super("Thief", false);
}
@Override
public String description() {
return "Enemies have a chance to drop gold nuggets";
}
@Override
public void onMobKill(LivingDeathEvent event) {
if (ModjamMod.r.nextInt(20) == 0) {
if (!event.entity.worldObj.isRemote) {
event.entity.dropItem(Items.gold_nugget, 1);
}
}
}
}
|