EntityAILookAtTradePlayer .java

net.minecraft.entity.ai.EntityAILookAtTradePlayer (class, 32 lines): members: theMerchant, shouldExecute. imports: EntityVillager, EntityPlayer.

net.minecraft.entity.aiclass32 linescommonextends EntityAIWatchClosest771 B

API Surface (1)

boolean shouldExecute()

Fields & Constants (1)

theMerchant

Code Graph: Dependencies (3)

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

Full Source

EntityAILookAtTradePlayer.java32 lines · MCP 1.8.9 · verbatimOriginal ↗
1
package net.minecraft.entity.ai;
2
3
import net.minecraft.entity.passive.EntityVillager;
4
import net.minecraft.entity.player.EntityPlayer;
5
6
public class EntityAILookAtTradePlayer extends EntityAIWatchClosest
7
{
8
    private final EntityVillager theMerchant;
9
10
    public EntityAILookAtTradePlayer(EntityVillager theMerchantIn)
11
    {
12
        super(theMerchantIn, EntityPlayer.class, 8.0F);
13
        this.theMerchant = theMerchantIn;
14
    }
15
16
    /**
17
     * Returns whether the EntityAIBase should begin execution.
18
     */
19
    public boolean shouldExecute()
20
    {
21
        if (this.theMerchant.isTrading())
22
        {
23
            this.closestEntity = this.theMerchant.getCustomer();
24
            return true;
25
        }
26
        else
27
        {
28
            return false;
29
        }
30
    }
31
}
32

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