You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
	
	
		
			38 lines
		
	
	
		
			844 B
		
	
	
	
		
			Java
		
	
			
		
		
	
	
			38 lines
		
	
	
		
			844 B
		
	
	
	
		
			Java
		
	
package net.minecraft.entity.ai;
 | 
						|
 | 
						|
import net.minecraft.entity.EntityCreature;
 | 
						|
 | 
						|
public class EntityAIRestrictSun extends EntityAIBase
 | 
						|
{
 | 
						|
    private EntityCreature theEntity;
 | 
						|
    private static final String __OBFID = "CL_00001611";
 | 
						|
 | 
						|
    public EntityAIRestrictSun(EntityCreature p_i1652_1_)
 | 
						|
    {
 | 
						|
        this.theEntity = p_i1652_1_;
 | 
						|
    }
 | 
						|
 | 
						|
    /**
 | 
						|
     * Returns whether the EntityAIBase should begin execution.
 | 
						|
     */
 | 
						|
    public boolean shouldExecute()
 | 
						|
    {
 | 
						|
        return this.theEntity.worldObj.isDaytime();
 | 
						|
    }
 | 
						|
 | 
						|
    /**
 | 
						|
     * Execute a one shot task or start executing a continuous task
 | 
						|
     */
 | 
						|
    public void startExecuting()
 | 
						|
    {
 | 
						|
        this.theEntity.getNavigator().setAvoidSun(true);
 | 
						|
    }
 | 
						|
 | 
						|
    /**
 | 
						|
     * Resets the task
 | 
						|
     */
 | 
						|
    public void resetTask()
 | 
						|
    {
 | 
						|
        this.theEntity.getNavigator().setAvoidSun(false);
 | 
						|
    }
 | 
						|
} |