use of net.minecraft.inventory.IContainerListener in project Railcraft by Railcraft.
the class ContainerCokeOven method sendUpdateToClient.
@Override
public void sendUpdateToClient() {
super.sendUpdateToClient();
for (int i = 0; i < listeners.size(); i++) {
IContainerListener listener = listeners.get(i);
int cookTime = tile.getCookTime();
if (lastCookTime != cookTime)
listener.sendProgressBarUpdate(this, 10, cookTime);
int cookTimeTotal = tile.getTotalCookTime();
if (lastCookTimeTotal != cookTimeTotal)
listener.sendProgressBarUpdate(this, 11, cookTimeTotal);
}
lastCookTime = tile.getCookTime();
lastCookTimeTotal = tile.getTotalCookTime();
}
use of net.minecraft.inventory.IContainerListener in project Railcraft by Railcraft.
the class ContainerSteamOven method sendUpdateToClient.
@Override
public void sendUpdateToClient() {
super.sendUpdateToClient();
int cookTime = tile.cookTime;
for (IContainerListener listener : listeners) {
if (lastCookTime != cookTime) {
listener.sendProgressBarUpdate(this, 0, cookTime);
}
}
lastCookTime = cookTime;
}
use of net.minecraft.inventory.IContainerListener in project Railcraft by Railcraft.
the class ContainerTrackRouting method sendUpdateToClient.
@Override
public void sendUpdateToClient() {
super.sendUpdateToClient();
for (IContainerListener var2 : listeners) {
int lock = track.getLockController().getCurrentState();
if (lastLockState != lock)
var2.sendProgressBarUpdate(this, 0, lock);
}
this.lastLockState = track.getLockController().getCurrentState();
}
use of net.minecraft.inventory.IContainerListener in project Railcraft by Railcraft.
the class ContainerTurbine method sendUpdateToClient.
@Override
public void sendUpdateToClient() {
super.sendUpdateToClient();
for (IContainerListener listener : listeners) {
if (lastOutput != Math.round(tile.output))
listener.sendProgressBarUpdate(this, 0, Math.round(tile.output));
}
lastOutput = Math.round(tile.output);
}
use of net.minecraft.inventory.IContainerListener in project Railcraft by Railcraft.
the class ContainerWorldspike method sendUpdateToClient.
/**
* Updates crafting matrix; called from onCraftMatrixChanged. Args: none
*/
@Override
public void sendUpdateToClient() {
super.sendUpdateToClient();
short minutes = getMinutesRemaining(worldspike.getFuelAmount());
for (IContainerListener listener : listeners) {
if (prevMinutesRemaining != minutes)
listener.sendProgressBarUpdate(this, 0, minutes);
}
this.prevMinutesRemaining = minutes;
}
Aggregations