Search in sources :

Example 1 with ArmorMaterial

use of net.minecraft.item.ArmorMaterial in project Fabric-Tutorial-1.18.1 by Tutorials-By-Kaupenjoe.

the class ModArmorItem method evaluateArmorEffects.

private void evaluateArmorEffects(PlayerEntity player) {
    for (Map.Entry<ArmorMaterial, StatusEffectInstance> entry : MATERIAL_TO_EFFECT_MAP.entrySet()) {
        ArmorMaterial mapArmorMaterial = entry.getKey();
        StatusEffectInstance mapStatusEffect = entry.getValue();
        if (hasCorrectArmorOn(mapArmorMaterial, player)) {
            addStatusEffectForMaterial(player, mapArmorMaterial, mapStatusEffect);
        }
    }
}
Also used : StatusEffectInstance(net.minecraft.entity.effect.StatusEffectInstance) ArmorMaterial(net.minecraft.item.ArmorMaterial) ImmutableMap(com.google.common.collect.ImmutableMap) Map(java.util.Map)

Example 2 with ArmorMaterial

use of net.minecraft.item.ArmorMaterial in project More-Weaponry by DakotaPride.

the class ModPhantomScaleArmorItem method evaluateArmorEffects.

private void evaluateArmorEffects(PlayerEntity player) {
    for (Map.Entry<ArmorMaterial, StatusEffectInstance> entry : MATERIAL_TO_EFFECT_MAP.entrySet()) {
        ArmorMaterial mapArmorMaterial = entry.getKey();
        StatusEffectInstance mapStatusEffect = entry.getValue();
        if (hasCorrectArmorOn(mapArmorMaterial, player)) {
            addStatusEffectForMaterial(player, mapArmorMaterial, mapStatusEffect);
        }
    }
}
Also used : StatusEffectInstance(net.minecraft.entity.effect.StatusEffectInstance) ArmorMaterial(net.minecraft.item.ArmorMaterial) ImmutableMap(com.google.common.collect.ImmutableMap) Map(java.util.Map)

Example 3 with ArmorMaterial

use of net.minecraft.item.ArmorMaterial in project More-Weaponry by DakotaPride.

the class ModPhantomScaleArmorItemTwo method evaluateArmorEffects.

private void evaluateArmorEffects(PlayerEntity player) {
    for (Map.Entry<ArmorMaterial, StatusEffect> entry : MATERIAL_TO_EFFECT_MAP.entrySet()) {
        ArmorMaterial mapArmorMaterial = entry.getKey();
        StatusEffect mapStatusEffect = entry.getValue();
        if (hasCorrectArmorOn(mapArmorMaterial, player)) {
            addStatusEffectForMaterial(player, mapArmorMaterial, mapStatusEffect);
        }
    }
}
Also used : StatusEffect(net.minecraft.entity.effect.StatusEffect) ArmorMaterial(net.minecraft.item.ArmorMaterial) ImmutableMap(com.google.common.collect.ImmutableMap) Map(java.util.Map)

Example 4 with ArmorMaterial

use of net.minecraft.item.ArmorMaterial in project More-Weaponry by DakotaPride.

the class ElderScaleArmorItem method evaluateArmorEffects.

private void evaluateArmorEffects(PlayerEntity player) {
    for (Map.Entry<ArmorMaterial, StatusEffectInstance> entry : MATERIAL_TO_EFFECT_MAP.entrySet()) {
        ArmorMaterial mapArmorMaterial = entry.getKey();
        StatusEffectInstance mapStatusEffect = entry.getValue();
        if (hasCorrectArmorOn(mapArmorMaterial, player)) {
            addStatusEffectForMaterial(player, mapArmorMaterial, mapStatusEffect);
        }
    }
}
Also used : StatusEffectInstance(net.minecraft.entity.effect.StatusEffectInstance) ArmorMaterial(net.minecraft.item.ArmorMaterial) ImmutableMap(com.google.common.collect.ImmutableMap) Map(java.util.Map)

Example 5 with ArmorMaterial

use of net.minecraft.item.ArmorMaterial in project More-Weaponry by DakotaPride.

the class ShulkerShellBoots method evaluateArmorEffects.

private void evaluateArmorEffects(PlayerEntity player) {
    for (Map.Entry<ArmorMaterial, StatusEffect> entry : MATERIAL_TO_EFFECT_MAP.entrySet()) {
        ArmorMaterial mapArmorMaterial = entry.getKey();
        StatusEffect mapStatusEffect = entry.getValue();
        if (hasCorrectArmorOn(mapArmorMaterial, player)) {
            addStatusEffectForMaterial(player, mapArmorMaterial, mapStatusEffect);
        }
    }
}
Also used : StatusEffect(net.minecraft.entity.effect.StatusEffect) ArmorMaterial(net.minecraft.item.ArmorMaterial) ImmutableMap(com.google.common.collect.ImmutableMap) Map(java.util.Map)

Aggregations

ImmutableMap (com.google.common.collect.ImmutableMap)12 Map (java.util.Map)12 ArmorMaterial (net.minecraft.item.ArmorMaterial)12 StatusEffectInstance (net.minecraft.entity.effect.StatusEffectInstance)10 StatusEffect (net.minecraft.entity.effect.StatusEffect)2