30 lines
1.2 KiB
Java
30 lines
1.2 KiB
Java
package net.paladrill.paladrillmod.procedure;
|
|
|
|
import net.paladrill.paladrillmod.ElementsPaladrillmodMod;
|
|
|
|
import net.minecraft.potion.PotionEffect;
|
|
import net.minecraft.init.MobEffects;
|
|
import net.minecraft.entity.EntityLivingBase;
|
|
import net.minecraft.entity.Entity;
|
|
|
|
import java.util.Map;
|
|
|
|
@ElementsPaladrillmodMod.ModElement.Tag
|
|
public class ProcedurePickaxeOfTheGodLevel25ToolInHandTick extends ElementsPaladrillmodMod.ModElement {
|
|
public ProcedurePickaxeOfTheGodLevel25ToolInHandTick(ElementsPaladrillmodMod instance) {
|
|
super(instance, 307);
|
|
}
|
|
|
|
public static void executeProcedure(Map<String, Object> dependencies) {
|
|
if (dependencies.get("entity") == null) {
|
|
System.err.println("Failed to load dependency entity for procedure PickaxeOfTheGodLevel25ToolInHandTick!");
|
|
return;
|
|
}
|
|
Entity entity = (Entity) dependencies.get("entity");
|
|
if (entity instanceof EntityLivingBase)
|
|
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(MobEffects.SPEED, (int) 8, (int) 2, (false), (false)));
|
|
if (entity instanceof EntityLivingBase)
|
|
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(MobEffects.HASTE, (int) 3, (int) 3, (false), (false)));
|
|
}
|
|
}
|