28 lines
1005 B
Java
28 lines
1005 B
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 ProcedurePaladiumArmorHelmetTickEvent extends ElementsPaladrillmodMod.ModElement {
|
|
public ProcedurePaladiumArmorHelmetTickEvent(ElementsPaladrillmodMod instance) {
|
|
super(instance, 147);
|
|
}
|
|
|
|
public static void executeProcedure(Map<String, Object> dependencies) {
|
|
if (dependencies.get("entity") == null) {
|
|
System.err.println("Failed to load dependency entity for procedure PaladiumArmorHelmetTickEvent!");
|
|
return;
|
|
}
|
|
Entity entity = (Entity) dependencies.get("entity");
|
|
if (entity instanceof EntityLivingBase)
|
|
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(MobEffects.NIGHT_VISION, (int) 860, (int) 1, (false), (false)));
|
|
}
|
|
}
|