use of net.minecraft.inventory.ICrafting in project BluePower by Qmunity.
the class ContainerSortingMachine 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;
for (int i = 0; i < 9; i++) {
if (colors[i] != sortingMachine.colors[i].ordinal()) {
icrafting.sendProgressBarUpdate(this, i, sortingMachine.colors[i].ordinal());
}
}
if (pullMode != sortingMachine.pullMode.ordinal()) {
icrafting.sendProgressBarUpdate(this, 9, sortingMachine.pullMode.ordinal());
}
if (sortMode != sortingMachine.sortMode.ordinal()) {
icrafting.sendProgressBarUpdate(this, 10, sortingMachine.sortMode.ordinal());
}
if (curColumn != sortingMachine.curColumn) {
icrafting.sendProgressBarUpdate(this, 11, sortingMachine.curColumn);
}
for (int i = 0; i < 8; i++) {
if (fuzzySettings[i] != sortingMachine.fuzzySettings[i]) {
icrafting.sendProgressBarUpdate(this, i + 12, sortingMachine.fuzzySettings[i]);
}
}
}
pullMode = sortingMachine.pullMode.ordinal();
sortMode = sortingMachine.sortMode.ordinal();
curColumn = sortingMachine.curColumn;
for (int i = 0; i < colors.length; i++) {
colors[i] = sortingMachine.colors[i].ordinal();
}
for (int i = 0; i < fuzzySettings.length; i++) {
fuzzySettings[i] = sortingMachine.fuzzySettings[i];
}
}
use of net.minecraft.inventory.ICrafting in project BluePower by Qmunity.
the class ContainerFilter 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 != tileFilter.filterColor.ordinal()) {
icrafting.sendProgressBarUpdate(this, 0, tileFilter.filterColor.ordinal());
}
if (fuzzySetting != tileFilter.fuzzySetting) {
icrafting.sendProgressBarUpdate(this, 1, tileFilter.fuzzySetting);
}
}
filterColor = tileFilter.filterColor.ordinal();
fuzzySetting = tileFilter.fuzzySetting;
}
Aggregations