Search in sources :

Example 1 with EntityOcelot

use of net.minecraft.entity.passive.EntityOcelot in project Railcraft by Railcraft.

the class TileChestRailcraft method isCatOnChest.

private boolean isCatOnChest() {
    AxisAlignedBB searchBox = AABBFactory.start().createBoxForTileAt(getPos()).offset(0.0, 1.0, 0.0).build();
    List<EntityOcelot> cats = worldObj.getEntitiesWithinAABB(EntityOcelot.class, searchBox);
    return cats.stream().anyMatch(EntityTameable::isSitting);
}
Also used : AxisAlignedBB(net.minecraft.util.math.AxisAlignedBB) EntityOcelot(net.minecraft.entity.passive.EntityOcelot) EntityTameable(net.minecraft.entity.passive.EntityTameable)

Aggregations

EntityOcelot (net.minecraft.entity.passive.EntityOcelot)1 EntityTameable (net.minecraft.entity.passive.EntityTameable)1 AxisAlignedBB (net.minecraft.util.math.AxisAlignedBB)1