2014-06-10 00:22:22 +02:00
|
|
|
/**
|
|
|
|
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
|
|
|
* http://www.mod-buildcraft.com
|
|
|
|
*
|
2014-12-09 21:09:14 +01:00
|
|
|
* The BuildCraft API is distributed under the terms of the MIT License.
|
|
|
|
* Please check the contents of the license, which should be located
|
|
|
|
* as "LICENSE.API" in the BuildCraft source code distribution.
|
2014-06-10 00:22:22 +02:00
|
|
|
*/
|
2014-06-13 13:36:02 +02:00
|
|
|
package buildcraft.api.robots;
|
2014-06-10 00:22:22 +02:00
|
|
|
|
2014-06-28 11:04:37 +02:00
|
|
|
import net.minecraft.entity.Entity;
|
2014-06-10 00:22:22 +02:00
|
|
|
import net.minecraft.entity.EntityLiving;
|
|
|
|
import net.minecraft.inventory.IInventory;
|
|
|
|
import net.minecraft.item.ItemStack;
|
|
|
|
import net.minecraft.world.World;
|
2014-09-04 20:55:50 +02:00
|
|
|
|
2014-08-16 18:03:20 +02:00
|
|
|
import net.minecraftforge.fluids.IFluidHandler;
|
2014-09-04 20:55:50 +02:00
|
|
|
|
|
|
|
import cofh.api.energy.IEnergyStorage;
|
|
|
|
|
2014-06-10 00:22:22 +02:00
|
|
|
import buildcraft.api.boards.RedstoneBoardRobot;
|
2014-07-21 14:34:21 +02:00
|
|
|
import buildcraft.api.core.IZone;
|
2014-06-10 00:22:22 +02:00
|
|
|
|
2014-08-16 18:03:20 +02:00
|
|
|
public abstract class EntityRobotBase extends EntityLiving implements IInventory, IFluidHandler {
|
2014-06-10 00:22:22 +02:00
|
|
|
|
2014-09-03 19:22:15 +02:00
|
|
|
public static final int MAX_ENERGY = 100000;
|
|
|
|
public static final int SAFETY_ENERGY = MAX_ENERGY / 4;
|
2014-08-12 23:23:43 +02:00
|
|
|
public static final long NULL_ROBOT_ID = Long.MAX_VALUE;
|
2014-06-10 13:21:17 +02:00
|
|
|
|
2014-06-10 00:22:22 +02:00
|
|
|
public EntityRobotBase(World par1World) {
|
|
|
|
super(par1World);
|
|
|
|
}
|
|
|
|
|
|
|
|
public abstract void setItemInUse(ItemStack stack);
|
|
|
|
|
|
|
|
public abstract void setItemActive(boolean b);
|
|
|
|
|
|
|
|
public abstract boolean isMoving();
|
|
|
|
|
2014-06-15 17:20:54 +02:00
|
|
|
public abstract IDockingStation getLinkedStation();
|
2014-06-10 00:22:22 +02:00
|
|
|
|
|
|
|
public abstract RedstoneBoardRobot getBoard();
|
|
|
|
|
2014-06-12 13:46:52 +02:00
|
|
|
public abstract void aimItemAt(int x, int y, int z);
|
2014-06-10 00:22:22 +02:00
|
|
|
|
2014-09-03 19:22:15 +02:00
|
|
|
public abstract int getEnergy();
|
2014-06-10 13:21:17 +02:00
|
|
|
|
2014-09-04 19:51:50 +02:00
|
|
|
public abstract IEnergyStorage getBattery();
|
2014-06-10 13:21:17 +02:00
|
|
|
|
2014-06-15 17:20:54 +02:00
|
|
|
public abstract IDockingStation getDockingStation();
|
|
|
|
|
|
|
|
public abstract void dock(IDockingStation station);
|
|
|
|
|
|
|
|
public abstract void undock();
|
|
|
|
|
2014-07-21 14:34:21 +02:00
|
|
|
public abstract IZone getZoneToWork();
|
2014-06-26 08:51:28 +02:00
|
|
|
|
2014-06-28 00:51:47 +02:00
|
|
|
public abstract boolean containsItems();
|
|
|
|
|
2014-08-12 23:23:43 +02:00
|
|
|
public abstract boolean hasFreeSlot();
|
|
|
|
|
2014-06-28 11:04:37 +02:00
|
|
|
public abstract void unreachableEntityDetected(Entity entity);
|
|
|
|
|
|
|
|
public abstract boolean isKnownUnreachable(Entity entity);
|
|
|
|
|
2014-08-12 23:23:43 +02:00
|
|
|
public abstract long getRobotId();
|
|
|
|
|
2014-08-14 18:58:17 +02:00
|
|
|
public abstract IRobotRegistry getRegistry();
|
2014-08-12 23:23:43 +02:00
|
|
|
|
|
|
|
public abstract void releaseResources();
|
2014-06-10 00:22:22 +02:00
|
|
|
}
|