Files
mc/mods/pala/legacy-src-backup/net/paladrill/paladrillmod/procedure/ProcedureEndiumArmorBodyTickEvent.java
T

30 lines
1.1 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 ProcedureEndiumArmorBodyTickEvent extends ElementsPaladrillmodMod.ModElement {
public ProcedureEndiumArmorBodyTickEvent(ElementsPaladrillmodMod instance) {
super(instance, 161);
}
public static void executeProcedure(Map<String, Object> dependencies) {
if (dependencies.get("entity") == null) {
System.err.println("Failed to load dependency entity for procedure EndiumArmorBodyTickEvent!");
return;
}
Entity entity = (Entity) dependencies.get("entity");
if (entity instanceof EntityLivingBase)
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(MobEffects.STRENGTH, (int) 60, (int) 6, (false), (false)));
if (entity instanceof EntityLivingBase)
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(MobEffects.REGENERATION, (int) 60, (int) 4, (false), (false)));
}
}