use of net.minecraft.inventory.IContainerListener in project OpenModularTurrets by OpenModularTurretsTeam.
the class TurretBaseContainer method detectAndSendChanges.
@Override
public void detectAndSendChanges() {
super.detectAndSendChanges();
DebugHandler.getInstance().setListeners(this.listeners);
for (IContainerListener listener : this.listeners) {
if (listener instanceof EntityPlayerMP) {
NetworkingHandler.INSTANCE.sendTo(new MessageTurretBase(this.tileEntity), (EntityPlayerMP) listener);
}
}
}
use of net.minecraft.inventory.IContainerListener in project BetterWithAddons by DaedalusGame.
the class ContainerCherryBox method detectAndSendChanges.
@Override
public void detectAndSendChanges() {
super.detectAndSendChanges();
Iterator<IContainerListener> it = this.listeners.iterator();
while (it.hasNext()) {
IContainerListener craft = it.next();
if (this.workTime != tileCherryBox.workTime) {
craft.sendWindowProperty(this, 0, tileCherryBox.workTime);
}
if (this.totalWorkTime != tileCherryBox.totalWorkTime) {
craft.sendWindowProperty(this, 1, tileCherryBox.totalWorkTime);
}
}
this.workTime = tileCherryBox.workTime;
this.totalWorkTime = tileCherryBox.totalWorkTime;
}
use of net.minecraft.inventory.IContainerListener in project BetterWithAddons by DaedalusGame.
the class ContainerChute method detectAndSendChanges.
@Override
public void detectAndSendChanges() {
super.detectAndSendChanges();
for (IContainerListener craft : this.listeners) {
if (this.lastMechPower != this.tileChute.power)
craft.sendWindowProperty(this, 0, this.tileChute.power);
}
this.lastMechPower = this.tileChute.power;
}
use of net.minecraft.inventory.IContainerListener in project OpenModularTurrets by OpenModularTurretsTeam.
the class ConfigContainer method detectAndSendChanges.
@Override
public void detectAndSendChanges() {
super.detectAndSendChanges();
DebugHandler.getInstance().setListeners(this.listeners);
for (IContainerListener listener : this.listeners) {
if (listener instanceof EntityPlayerMP) {
NetworkingHandler.INSTANCE.sendTo(new MessageTurretBase(this.tileEntity), (EntityPlayerMP) listener);
}
}
}
use of net.minecraft.inventory.IContainerListener in project Pearcel-Mod by MiningMark48.
the class ContainerPearcelGenerator method detectAndSendChanges.
@Override
public void detectAndSendChanges() {
super.detectAndSendChanges();
for (int i = 0; i < this.listeners.size(); i++) {
IContainerListener icontainerlistener = (IContainerListener) this.listeners.get(i);
if (this.currentRF != this.te.getField(0)) {
icontainerlistener.sendProgressBarUpdate(this, 0, this.te.getField(0));
}
if (this.maxRF != this.te.getField(1)) {
icontainerlistener.sendProgressBarUpdate(this, 1, this.te.getField(1));
}
if (this.cooldown != this.te.getField(2)) {
icontainerlistener.sendProgressBarUpdate(this, 2, this.te.getField(2));
}
if (this.rfPerTick != this.te.getField(3)) {
icontainerlistener.sendProgressBarUpdate(this, 3, this.te.getField(3));
}
}
this.currentRF = this.te.getField(0);
this.maxRF = this.te.getField(1);
this.cooldown = this.te.getField(2);
this.rfPerTick = this.te.getField(3);
}
Aggregations