@Override public IFluidTankProperties[] getTankProperties() { if (this.fluids.isEmpty()) return new IFluidTankProperties[0]; IFluidTankProperties[] properties = new IFluidTankProperties[fluids.size()]; for (int i = 0; i < fluids.size(); i++) { boolean first = i == 0; int capacity2 = fluids.get(i).amount; if (first) capacity2 += getCapacity() - getFluidAmount(); properties[i] = new FluidTankProperties(fluids.get(i), capacity2, first, first); } return properties; }
@Override public IFluidTankProperties[] getTankProperties() { IFluidTankProperties[] ret = new IFluidTankProperties[tanks.size()]; for(int i = 0; i < ret.length; i++) { IFluidTankProperties[] temp = tanks.get(i).getTankProperties(); if(temp == null || temp.length < 1) { ret[i] = new FluidTankProperties(null, 0); } else { ret[i] = temp[0]; } } return ret; }
@Override public IFluidTankProperties[] getTankProperties() { updateXpFluid(); if (curXpFluid != null) { EntityPlayer player = getPlayer(); if (player != null) { return new FluidTankProperties[] { new FluidTankProperties( new FluidStack(curXpFluid, getPlayerXP(player) * PneumaticCraftAPIHandler.getInstance().liquidXPs.get(curXpFluid)), Integer.MAX_VALUE) }; } } return null; }
@Override public IFluidTankProperties[] getTankProperties() { float percentFilled = fluidBlock.getFilledPercentage(world, blockPos); if (percentFilled < 0) { percentFilled *= -1; } int amountFilled = Math.round(Fluid.BUCKET_VOLUME * percentFilled); FluidStack fluid = amountFilled > 0 ? new FluidStack(fluidBlock.getFluid(), amountFilled) : null; return new FluidTankProperties[]{ new FluidTankProperties(fluid, Fluid.BUCKET_VOLUME, false, true)}; }
@Override public IFluidTankProperties[] getTankProperties() { FluidStack containedStack = null; IBlockState blockState = world.getBlockState(blockPos); if (blockState.getBlock() == blockLiquid) { containedStack = getStack(blockState); } return new FluidTankProperties[]{new FluidTankProperties(containedStack, Fluid.BUCKET_VOLUME, false, true)}; }
@Override public IFluidTankProperties[] getTankProperties() { FluidStack fluid = FluidContainerRegistry.getFluidForFilledItem(container); int capacity = FluidContainerRegistry.getContainerCapacity(fluid, container); return new FluidTankProperties[] { new FluidTankProperties(fluid, capacity) }; }
@Override public IFluidTankProperties[] getTankProperties() { if (world.isRemote) { return new IFluidTankProperties[] { new FluidTankProperties(liquid_state.s_liquid, EnderLiquidStorage.CAPACITY) }; } return getStorage().getTankProperties(); }
@Override public IFluidTankProperties[] getTankProperties() { return new IFluidTankProperties[] { new FluidTankProperties(new FluidStack(FluidsRegistry.liquidXP, LiquidXPCollectorItem.getStoredXP(this.stack)), LiquidXPCollectorItem.MAX_CAPACITY, true, true) }; }
@Override public <T> T getCapability(Capability<T> capability, EnumFacing facing) { if (capability == CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY) { if (facing == null) { final List<IFluidTankProperties> properties = new LinkedList<>(); for (Attachment a : attachments) { if (a != null) { properties.add(new FluidTankProperties(null, 0)); } } return CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY.cast(new DummyFluidCapability() { @Override public IFluidTankProperties[] getTankProperties() { return properties.toArray(new IFluidTankProperties[0]); } }); } if (attachments[facing.ordinal()] != null) { return CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY.cast(new DummyFluidCapability() { @Override public IFluidTankProperties[] getTankProperties() { return new IFluidTankProperties[] { new FluidTankProperties(null, 0) }; } }); } } return super.getCapability(capability, facing); }
@Override public IFluidTankProperties[] getTankProperties() { if(network == null) { return new FluidTankProperties[0]; } return network.getTankProperties(EnderLiquidConduit.this, side); }
@Override public IFluidTankProperties[] getTankProperties() { if (network == null) { return new FluidTankProperties[0]; } return new FluidTankProperties[] { new FluidTankProperties(tank.getFluid(), tank.getCapacity()) }; }
@Override public IFluidTankProperties[] getTankProperties() { return FluidTankProperties.convert(new FluidTankInfo[]{a.getInfo(), b.getInfo()}); }
@Override public IFluidTankProperties[] getTankProperties() { return new FluidTankProperties[] { new FluidTankProperties(getFluid(), capacity) }; }
@Override public IFluidTankProperties[] getTankProperties() { return new IFluidTankProperties[] { new FluidTankProperties(getFluid(), capacity) }; }
@Override public IFluidTankProperties[] getTankProperties() { return new FluidTankProperties[] { new FluidTankProperties(getFluid(), Fluid.BUCKET_VOLUME) }; }
@Override public IFluidTankProperties[] getTankProperties() { return FluidTankProperties.convert(handler.getTankInfo(side)); }
@Override public FluidTankProperties[] getTankProperties() { return new FluidTankProperties[] { new FluidTankProperties(handler.getFluid(container), handler.getCapacity(container)) }; }
@Override public IFluidTankProperties[] getTankProperties() { return new IFluidTankProperties[]{new FluidTankProperties(new FluidStack(getFluid(), getFluidAmount()), getCapacity())}; }
@Override public IFluidTankProperties[] getTankProperties() { return new IFluidTankProperties[] { new FluidTankProperties(tank.getInfo().fluid, tank.getInfo().capacity) }; }
@Override public IFluidTankProperties[] getTankProperties() { FluidTankInfo info = tank.getInfo(); return new IFluidTankProperties[] { new FluidTankProperties(info.fluid, info.capacity, true, true) }; }
@Override public IFluidTankProperties[] getTankProperties() { return new FluidTankProperties[] { new FluidTankProperties(this.getFluid(), this.getCapacity()) }; }
@Override public IFluidTankProperties[] getTankProperties() { final FluidTank tank = readTank(container); return new IFluidTankProperties[] { new FluidTankProperties(getFluid(tank), getCapacity(tank), true, true) }; }