2014-09-24 14:32:58 +02:00
|
|
|
package cpw.mods.ironchest;
|
|
|
|
|
|
|
|
import net.minecraft.entity.ai.EntityAIOcelotSit;
|
|
|
|
import net.minecraft.entity.passive.EntityOcelot;
|
2016-03-21 17:44:27 +01:00
|
|
|
import net.minecraft.util.math.BlockPos;
|
2014-12-02 21:25:03 +01:00
|
|
|
import net.minecraft.world.World;
|
2014-09-24 14:32:58 +02:00
|
|
|
|
2015-11-23 06:34:34 +01:00
|
|
|
public class IronChestAIOcelotSit extends EntityAIOcelotSit
|
2014-09-24 14:32:58 +02:00
|
|
|
{
|
|
|
|
public IronChestAIOcelotSit(EntityOcelot par1EntityOcelot, float par2)
|
|
|
|
{
|
|
|
|
super(par1EntityOcelot, par2);
|
|
|
|
}
|
|
|
|
|
2014-12-02 21:25:03 +01:00
|
|
|
@Override
|
2015-11-23 06:34:34 +01:00
|
|
|
protected boolean shouldMoveTo(World world, BlockPos pos)
|
2014-09-24 14:32:58 +02:00
|
|
|
{
|
2014-12-02 21:25:03 +01:00
|
|
|
if (world.getBlockState(pos).getBlock() == IronChest.ironChestBlock)
|
2014-09-24 14:32:58 +02:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
2015-11-23 06:34:34 +01:00
|
|
|
return super.shouldMoveTo(world, pos);
|
2014-09-24 14:32:58 +02:00
|
|
|
}
|
2014-12-02 21:25:03 +01:00
|
|
|
}
|