BlockCoord target = TravelController.instance.selectedCoord;
TileEntity te = world.getTileEntity(target.x, target.y, target.z);
if(!(te instanceof TileEnderIO)) {
return;
}
TileEnderIO eio = (TileEnderIO) te;
if(eio.canBlockBeAccessed(player)) {
int requiredPower = equipped == null ? 0 : instance.getRequiredPower(player, TravelSource.STAFF, target);
if(requiredPower <= 0 || requiredPower <= getEnergyInTravelItem(equipped)) {
if(requiredPower > 0) {
PacketDrainStaff p = new PacketDrainStaff(requiredPower);
PacketHandler.INSTANCE.sendToServer(p);