EntityAITargetNonTamed .java

net.minecraft.entity.ai.EntityAITargetNonTamed (class): members: theTameable, shouldExecute. imports: EntityTameable, Predicate, EntityLivingBase.

net.minecraft.entity.aiclass25 linescommonextends EntityLivingBase>786 B

API Surface (1)

boolean shouldExecute()

Fields & Constants (1)

theTameable

Code Graph: Dependencies (3)

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

Full Source

EntityAITargetNonTamed.java25 lines · MCP 1.8.9 · verbatimOriginal ↗
1
package net.minecraft.entity.ai;
2
3
import com.google.common.base.Predicate;
4
import net.minecraft.entity.EntityLivingBase;
5
import net.minecraft.entity.passive.EntityTameable;
6
7
public class EntityAITargetNonTamed<T extends EntityLivingBase> extends EntityAINearestAttackableTarget
8
{
9
    private EntityTameable theTameable;
10
11
    public EntityAITargetNonTamed(EntityTameable entityIn, Class<T> classTarget, boolean checkSight, Predicate <? super T > targetSelector)
12
    {
13
        super(entityIn, classTarget, 10, checkSight, false, targetSelector);
14
        this.theTameable = entityIn;
15
    }
16
17
    /**
18
     * Returns whether the EntityAIBase should begin execution.
19
     */
20
    public boolean shouldExecute()
21
    {
22
        return !this.theTameable.isTamed() && super.shouldExecute();
23
    }
24
}
25

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