PotionAbsorption .java

net.minecraft.potion.PotionAbsorption (class): members: applyAttributesModifiersToEntity, removeAttributesModifiersFromEntity. imports: BaseAttributeMap.

net.minecraft.potionclass26 linescommonextends Potion1.1 KB

API Surface (2)

void removeAttributesModifiersFromEntity(EntityLivingBase entityLivingBaseIn, BaseAttributeMap p_111187_2_, int amplifier)
void applyAttributesModifiersToEntity(EntityLivingBase entityLivingBaseIn, BaseAttributeMap p_111185_2_, int amplifier)

Code Graph: Dependencies (4)

Edges (calls / imports / inherits / references) resolved by graphify from the AST. Every chip opens the class source.

Full Source

PotionAbsorption.java26 lines · MCP 1.8.9 · verbatimOriginal ↗
1
package net.minecraft.potion;
2
3
import net.minecraft.entity.EntityLivingBase;
4
import net.minecraft.entity.ai.attributes.BaseAttributeMap;
5
import net.minecraft.util.ResourceLocation;
6
7
public class PotionAbsorption extends Potion
8
{
9
    protected PotionAbsorption(int potionID, ResourceLocation location, boolean badEffect, int potionColor)
10
    {
11
        super(potionID, location, badEffect, potionColor);
12
    }
13
14
    public void removeAttributesModifiersFromEntity(EntityLivingBase entityLivingBaseIn, BaseAttributeMap p_111187_2_, int amplifier)
15
    {
16
        entityLivingBaseIn.setAbsorptionAmount(entityLivingBaseIn.getAbsorptionAmount() - (float)(4 * (amplifier + 1)));
17
        super.removeAttributesModifiersFromEntity(entityLivingBaseIn, p_111187_2_, amplifier);
18
    }
19
20
    public void applyAttributesModifiersToEntity(EntityLivingBase entityLivingBaseIn, BaseAttributeMap p_111185_2_, int amplifier)
21
    {
22
        entityLivingBaseIn.setAbsorptionAmount(entityLivingBaseIn.getAbsorptionAmount() + (float)(4 * (amplifier + 1)));
23
        super.applyAttributesModifiersToEntity(entityLivingBaseIn, p_111185_2_, amplifier);
24
    }
25
}
26

Deobfuscated MCP 1.8.9 source of PotionAbsorption from Marcelektro/MavenMCP-1.8.9 (net/minecraft/potion/PotionAbsorption.java), stored verbatim.