use of net.minecraft.inventory.ICrafting in project BluePower by Qmunity.
the class ContainerAlloyFurnace method detectAndSendChanges.
/**
* Looks for changes made in the container, sends them to every listener.
*/
@Override
public void detectAndSendChanges() {
super.detectAndSendChanges();
for (Object crafter : crafters) {
ICrafting icrafting = (ICrafting) crafter;
if (currentBurnTime != tileFurnace.currentBurnTime) {
icrafting.sendProgressBarUpdate(this, 0, tileFurnace.currentBurnTime);
}
if (maxBurnTime != tileFurnace.maxBurnTime) {
icrafting.sendProgressBarUpdate(this, 1, tileFurnace.maxBurnTime);
}
if (currentProcessTime != tileFurnace.currentProcessTime) {
icrafting.sendProgressBarUpdate(this, 2, tileFurnace.currentProcessTime);
}
}
currentBurnTime = tileFurnace.currentBurnTime;
maxBurnTime = tileFurnace.maxBurnTime;
currentProcessTime = tileFurnace.currentProcessTime;
}
use of net.minecraft.inventory.ICrafting in project BluePower by Qmunity.
the class ContainerManager method detectAndSendChanges.
/**
* Looks for changes made in the container, sends them to every listener.
*/
@Override
public void detectAndSendChanges() {
super.detectAndSendChanges();
for (Object crafter : crafters) {
ICrafting icrafting = (ICrafting) crafter;
if (filterColor != tileManager.filterColor.ordinal()) {
icrafting.sendProgressBarUpdate(this, 0, tileManager.filterColor.ordinal());
}
if (priority != tileManager.priority) {
icrafting.sendProgressBarUpdate(this, 1, tileManager.priority);
}
if (mode != tileManager.mode) {
icrafting.sendProgressBarUpdate(this, 2, tileManager.mode);
}
if (fuzzySetting != tileManager.fuzzySetting) {
icrafting.sendProgressBarUpdate(this, 3, tileManager.fuzzySetting);
}
}
filterColor = tileManager.filterColor.ordinal();
priority = tileManager.priority;
mode = tileManager.mode;
fuzzySetting = tileManager.fuzzySetting;
}
use of net.minecraft.inventory.ICrafting in project BluePower by Qmunity.
the class ContainerRetriever method detectAndSendChanges.
/**
* Looks for changes made in the container, sends them to every listener.
*/
@Override
public void detectAndSendChanges() {
super.detectAndSendChanges();
for (Object crafter : crafters) {
ICrafting icrafting = (ICrafting) crafter;
if (slotIndex != retriever.slotIndex) {
icrafting.sendProgressBarUpdate(this, 2, retriever.slotIndex);
}
if (mode != retriever.mode) {
icrafting.sendProgressBarUpdate(this, 3, retriever.mode);
}
}
slotIndex = retriever.slotIndex;
mode = retriever.mode;
}
use of net.minecraft.inventory.ICrafting in project BluePower by Qmunity.
the class ContainerItemDetector method detectAndSendChanges.
/**
* Looks for changes made in the container, sends them to every listener.
*/
@Override
public void detectAndSendChanges() {
super.detectAndSendChanges();
for (Object crafter : crafters) {
ICrafting icrafting = (ICrafting) crafter;
if (mode != itemDetector.mode) {
icrafting.sendProgressBarUpdate(this, 0, itemDetector.mode);
}
if (fuzzySetting != itemDetector.fuzzySetting) {
icrafting.sendProgressBarUpdate(this, 1, itemDetector.fuzzySetting);
}
}
mode = itemDetector.mode;
fuzzySetting = itemDetector.fuzzySetting;
}
use of net.minecraft.inventory.ICrafting in project BluePower by Qmunity.
the class ContainerMachineBase method detectAndSendChanges.
/**
* Looks for changes made in the container, sends them to every listener.
*/
@Override
public void detectAndSendChanges() {
super.detectAndSendChanges();
for (Object crafter : crafters) {
ICrafting icrafting = (ICrafting) crafter;
if (backlogSize != machine.getBacklog().size() && icrafting instanceof EntityPlayerMP) {
BPNetworkHandler.INSTANCE.sendTo(new MessageSyncMachineBacklog(machine, machine.getBacklog()), (EntityPlayerMP) icrafting);
}
}
backlogSize = machine.getBacklog().size();
}
Aggregations