-
-
Save anonymous/5bebd96b61c95ad71106 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.drunksmanknife.harshnature.init; | |
import java.util.Random; | |
import net.minecraft.entity.passive.EntitySquid; | |
import net.minecraftforge.event.entity.living.LivingDropsEvent; | |
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; | |
public class ModLivingDropsEvent { | |
public static double rand; | |
public Random r = new Random(); | |
@SubscribeEvent | |
public void onEntityDrop(LivingDropsEvent event) { | |
if(event.entityLiving instanceof EntitySquid) { | |
if(r.nextInt(10/6) == 0){ | |
event.entityLiving.dropItem(HarshNatureItems.Kalamari, r.nextInt(1) + 2); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment