use of com.infinityraider.agricraft.content.irrigation.TileEntityIrrigationChannel in project AgriCraft by AgriCraft.
the class AgriWailaIrrigationBlockInfoProvider method appendBody.
@Override
public void appendBody(List<ITextComponent> tooltip, IDataAccessor accessor, IPluginConfig config) {
TileEntity tile = accessor.getTileEntity();
if (tile instanceof TileEntityIrrigationComponent) {
if (tile instanceof TileEntityIrrigationChannel) {
TileEntityIrrigationChannel channel = (TileEntityIrrigationChannel) tile;
if (channel.hasValve()) {
if (channel.isOpen()) {
tooltip.add(AgriToolTips.VALVE_INFO_OPEN);
} else {
tooltip.add(AgriToolTips.VALVE_INFO_CLOSED);
}
}
}
TileEntityIrrigationComponent component = (TileEntityIrrigationComponent) tile;
tooltip.add(new StringTextComponent(component.getContent() + " / " + component.getCapacity() + " mB"));
}
}
use of com.infinityraider.agricraft.content.irrigation.TileEntityIrrigationChannel in project AgriCraft by AgriCraft.
the class AgriProbeIrrigationBlockInfoProvider method addIrrigationProbeInfo.
protected void addIrrigationProbeInfo(IProbeInfo info, World world, BlockPos pos) {
TileEntity tile = world.getTileEntity(pos);
if (tile instanceof TileEntityIrrigationComponent) {
if (tile instanceof TileEntityIrrigationChannel) {
TileEntityIrrigationChannel channel = (TileEntityIrrigationChannel) tile;
if (channel.hasValve()) {
if (channel.isOpen()) {
info.text(AgriToolTips.VALVE_INFO_OPEN);
} else {
info.text(AgriToolTips.VALVE_INFO_CLOSED);
}
}
}
TileEntityIrrigationComponent component = (TileEntityIrrigationComponent) tile;
info.progress(component.getContent(), component.getCapacity(), new ProgressStyle().filledColor(0xff327DCD).alternateFilledColor(0xff3732CD).suffix(" mB"));
}
}
Aggregations