EntityDragonPart .java

net.minecraft.entity.boss.EntityDragonPart (class): members: entityDragonObj, isEntityEqual, partName, canBeCollidedWith, attackEntityFrom, entityInit.

net.minecraft.entity.bossclass64 linescommonextends Entity1.7 KB

API Surface (6)

void entityInit()
void readEntityFromNBT(NBTTagCompound tagCompund)
void writeEntityToNBT(NBTTagCompound tagCompound)
boolean canBeCollidedWith()
boolean attackEntityFrom(DamageSource source, float amount)
boolean isEntityEqual(Entity entityIn)

Fields & Constants (2)

entityDragonObj
partName

Code Graph: Dependencies (4)

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

Full Source

EntityDragonPart.java64 lines · MCP 1.8.9 · verbatimOriginal ↗
1
package net.minecraft.entity.boss;
2
3
import net.minecraft.entity.Entity;
4
import net.minecraft.entity.IEntityMultiPart;
5
import net.minecraft.nbt.NBTTagCompound;
6
import net.minecraft.util.DamageSource;
7
8
public class EntityDragonPart extends Entity
9
{
10
    /** The dragon entity this dragon part belongs to */
11
    public final IEntityMultiPart entityDragonObj;
12
    public final String partName;
13
14
    public EntityDragonPart(IEntityMultiPart parent, String partName, float base, float sizeHeight)
15
    {
16
        super(parent.getWorld());
17
        this.setSize(base, sizeHeight);
18
        this.entityDragonObj = parent;
19
        this.partName = partName;
20
    }
21
22
    protected void entityInit()
23
    {
24
    }
25
26
    /**
27
     * (abstract) Protected helper method to read subclass entity data from NBT.
28
     */
29
    protected void readEntityFromNBT(NBTTagCompound tagCompund)
30
    {
31
    }
32
33
    /**
34
     * (abstract) Protected helper method to write subclass entity data to NBT.
35
     */
36
    protected void writeEntityToNBT(NBTTagCompound tagCompound)
37
    {
38
    }
39
40
    /**
41
     * Returns true if other Entities should be prevented from moving through this Entity.
42
     */
43
    public boolean canBeCollidedWith()
44
    {
45
        return true;
46
    }
47
48
    /**
49
     * Called when the entity is attacked.
50
     */
51
    public boolean attackEntityFrom(DamageSource source, float amount)
52
    {
53
        return this.isEntityInvulnerable(source) ? false : this.entityDragonObj.attackEntityFromPart(this, source, amount);
54
    }
55
56
    /**
57
     * Returns true if Entity argument is equal to this Entity
58
     */
59
    public boolean isEntityEqual(Entity entityIn)
60
    {
61
        return this == entityIn || this.entityDragonObj == entityIn;
62
    }
63
}
64

Deobfuscated MCP 1.8.9 source of EntityDragonPart from Marcelektro/MavenMCP-1.8.9 (net/minecraft/entity/boss/EntityDragonPart.java), stored verbatim.