@Override public void detectAndSendChanges() { inventory.update(); for(int i = 0; i < fields.length; i++){ int new_field = inventory.getField(i); if(new_field != fields[i]){ fields[i] = new_field; //send change for(int j = 0; j < this.crafters.size(); ++j){ ICrafting icrafting = (ICrafting)this.crafters.get(j); icrafting.sendProgressBarUpdate(this, i, new_field); } } } super.detectAndSendChanges(); }
@Override public void detectAndSendChanges() { ent.update(); for(int i = 0; i < fields.length; i++){ int new_field = ent.getField(i); if(new_field != fields[i]){ fields[i] = new_field; //send change for(int j = 0; j < this.crafters.size(); ++j){ ICrafting icrafting = (ICrafting)this.crafters.get(j); icrafting.sendProgressBarUpdate(this, i, new_field); } } } super.detectAndSendChanges(); }
@Override public void detectAndSendChanges() { super.detectAndSendChanges(); for (int i = 0; i < crafters.size(); i++) { ICrafting icrafting = (ICrafting) crafters.get(i); if (prevBrewTime != tile.getBrewTime()) icrafting.sendProgressBarUpdate(this, 0, tile.getBrewTime()); if (prevFuel != tile.getFuel()) icrafting.sendProgressBarUpdate(this, 1, tile.getFuel()); if (prevCurrentFuel != tile.getCurrentFuel()) icrafting.sendProgressBarUpdate(this, 2, tile.getCurrentFuel()); } prevBrewTime = tile.getBrewTime(); prevFuel = tile.getFuel(); prevCurrentFuel = tile.getCurrentFuel(); }
/** * Looks for changes made in the container, sends them to every listener. */ @Override public void detectAndSendChanges() { super.detectAndSendChanges(); for (int var1 = 0; var1 < crafters.size(); ++var1) { ICrafting var2 = (ICrafting) crafters.get(var1); var2.sendProgressBarUpdate(this, 0, enchantLevels[0]); var2.sendProgressBarUpdate(this, 1, enchantLevels[1]); var2.sendProgressBarUpdate(this, 2, enchantLevels[2]); var2.sendProgressBarUpdate(this, 3, enchantmentSeed & -16); var2.sendProgressBarUpdate(this, 4, field_178151_h[0]); var2.sendProgressBarUpdate(this, 5, field_178151_h[1]); var2.sendProgressBarUpdate(this, 6, field_178151_h[2]); } }
public void detectAndSendChanges() { super.detectAndSendChanges(); for(int i = 0; i < this.crafters.size(); ++i) { ICrafting craft = (ICrafting) this.crafters.get(i); if(lastCookTime != tileEntity.machineCookTime) { craft.sendProgressBarUpdate(this, 0, tileEntity.machineCookTime); } if(lastBurnTime != tileEntity.machineBurnTime) { craft.sendProgressBarUpdate(this, 1, tileEntity.machineBurnTime); } if(lastItemBurnTime != tileEntity.currentBurnTime) { craft.sendProgressBarUpdate(this, 2, tileEntity.currentBurnTime); } } lastBurnTime = tileEntity.machineBurnTime; lastCookTime = tileEntity.machineCookTime; lastItemBurnTime = tileEntity.currentBurnTime; }
public void addCraftingToCrafters(final ICrafting icrafting) { super.addCraftingToCrafters(icrafting); icrafting.sendProgressBarUpdate((Container)this, 0, this.lastpipe_x = this.node.pipe_x); icrafting.sendProgressBarUpdate((Container)this, 1, this.lastpipe_y = this.node.pipe_y); icrafting.sendProgressBarUpdate((Container)this, 2, this.lastpipe_z = this.node.pipe_z); if (this.node instanceof TileEntityTransferNodeEnergy) { icrafting.sendProgressBarUpdate((Container)this, 3, this.lastenergycount = ((TileEntityTransferNodeEnergy)this.node).numMachines()); this.lastenergy = ((TileEntityTransferNodeEnergy)this.node).getEnergyStored(null); for (int i = 0; i < 3; ++i) { icrafting.sendProgressBarUpdate((Container)this, 6 + i, (int)convToShort(this.lastenergy, i)); } } int newliquid_type = -1; int newliquid_amount = -1; if (this.node instanceof TileEntityTransferNodeLiquid) { final FluidStack t = ((TileEntityTransferNodeLiquid)this.node).getTankInfo(null)[0].fluid; if (t != null && t.amount > 0) { newliquid_type = FluidIDGetter.fluidLegacy.getID(t); newliquid_amount = t.amount; icrafting.sendProgressBarUpdate((Container)this, 4, newliquid_type); icrafting.sendProgressBarUpdate((Container)this, 5, newliquid_amount); } } }
public void detectAndSendChanges() { super.detectAndSendChanges(); for (int i = 0; i < this.crafters.size(); ++i) { ICrafting craft = (ICrafting) this.crafters.get(i); if (this.lastCookTime != this.tileFurnace.furnaceCookTime) { craft.sendProgressBarUpdate(this, 0, this.tileFurnace.furnaceCookTime); } if (this.lastBurnTime != this.tileFurnace.furnaceBurnTime) { craft.sendProgressBarUpdate(this, 1, this.tileFurnace.furnaceBurnTime); } if (this.lastItemBurnTime != this.tileFurnace.currentBurnTime) { craft.sendProgressBarUpdate(this, 2, this.tileFurnace.currentBurnTime); } } this.lastBurnTime = this.tileFurnace.furnaceBurnTime; this.lastCookTime = this.tileFurnace.furnaceCookTime; this.lastItemBurnTime = this.tileFurnace.currentBurnTime; }
public void detectAndSendChanges() { super.detectAndSendChanges(); for (ICrafting icrafting : this.crafters) { if (this.progress != this.crusherInventory.getField(2)) { icrafting.sendProgressBarUpdate(this, 2, this.crusherInventory.getField(2)); } if (this.energy != this.crusherInventory.getField(0)) { icrafting.sendProgressBarUpdate(this, 0, this.crusherInventory.getField(0)); } if (this.energyCapacity != this.crusherInventory.getField(1)) { icrafting.sendProgressBarUpdate(this, 1, this.crusherInventory.getField(1)); } } this.progress = this.crusherInventory.getField(2); this.energy = this.crusherInventory.getField(0); this.energyCapacity = this.crusherInventory.getField(1); }
public void detectAndSendChanges(){ super.detectAndSendChanges(); for(int i = 0; i < this.crafters.size(); ++i){ ICrafting craft = (ICrafting) this.crafters.get(i); if(this.lastWorkTime != this.tileExtruder.cookTime){ craft.sendProgressBarUpdate(this, 0, this.tileExtruder.cookTime); } if(this.lastExtrudeTime != this.tileExtruder.power){ craft.sendProgressBarUpdate(this, 1, this.tileExtruder.power); } } this.lastExtrudeTime = this.tileExtruder.power; this.lastWorkTime = this.tileExtruder.cookTime; }
public void detectAndSendChanges(){ super.detectAndSendChanges(); for(int i = 0; i < this.crafters.size(); ++i){ ICrafting craft = (ICrafting) this.crafters.get(i); if(this.lastCookTime != this.tileFurnace.furnaceCookTime){ craft.sendProgressBarUpdate(this, 0, this.tileFurnace.furnaceCookTime); } if(this.lastBurnTime != this.tileFurnace.furnaceBurnTime){ craft.sendProgressBarUpdate(this, 1, this.tileFurnace.furnaceBurnTime); } if(this.lastItemBurnTime != this.tileFurnace.currentItemBurnTime){ craft.sendProgressBarUpdate(this, 2, this.tileFurnace.currentItemBurnTime); } } this.lastBurnTime = this.tileFurnace.furnaceBurnTime; this.lastCookTime = this.tileFurnace.furnaceCookTime; this.lastItemBurnTime = this.tileFurnace.currentItemBurnTime; }
@SuppressWarnings("unchecked") @Override public void detectAndSendChanges() { if (crafters.isEmpty()) return; ICrafting bCrafting; for (int i = 0; i < inventorySlots.size(); ++i) { ItemStack itemstack = ((Slot) inventorySlots.get(i)).getStack(); ItemStack itemstack1 = (ItemStack) inventoryItemStacks.get(i); if (!ItemStack.areItemStacksEqual(itemstack1, itemstack)) { itemstack1 = itemstack == null ? null : itemstack.copy(); inventoryItemStacks.set(i, itemstack1); final NBTTagCompound nbtTagCompound = new NBTTagCompound(); nbtTagCompound.setShort("Slot", (short) i); if (itemstack1 != null) nbtTagCompound.setInteger("intCount", itemstack1.stackSize); for (Object crafter : crafters) if ((bCrafting = (ICrafting) crafter) instanceof EntityPlayerMP) Avaritiaddons.networkWrapper.sendTo(new InfinityChestSlotSync(itemstack1, i), (EntityPlayerMP) bCrafting); } } }
public void detectAndSendChanges() { super.detectAndSendChanges(); if (player instanceof EntityPlayerMP) { FissionWarfare.network.sendTo(new ClientPacketHandler("sync.energy%" + tileEntityEnergy.storage.getEnergyStored()), (EntityPlayerMP) player); } for (int i = 0; i < this.crafters.size(); ++i) { ICrafting craft = (ICrafting) this.crafters.get(i); if (this.lastProgress != tileEntityEnergy.progress) { craft.sendProgressBarUpdate(this, 1, tileEntityEnergy.progress); } } lastProgress = tileEntityEnergy.progress; }
@Override public void detectAndSendChanges() { super.detectAndSendChanges(); for (int var1 = 0; var1 < this.crafters.size(); ++var1) { ICrafting var2 = (ICrafting) this.crafters.get(var1); if (this.curTemp != this.te.temperature) var2.sendProgressBarUpdate(this, 0, this.te.temperature); if (this.curEnergy != this.te.getEnergyStored(null)) var2.sendProgressBarUpdate(this, 1, this.te.getEnergyStored(null)); if (this.curMaxTemp != this.te.maxTemp) var2.sendProgressBarUpdate(this, 2, this.te.maxTemp); if (this.curHeating != (this.te.heating ? 1 : 0)) var2.sendProgressBarUpdate(this, 3, (this.te.heating ? 1 : 0)); if (this.te.currentAlloy != null && this.curMetalAmount != this.te.currentAlloy.outputAmount) var2.sendProgressBarUpdate(this, 4, (int) this.te.currentAlloy.outputAmount); } this.curTemp = this.te.temperature; this.curEnergy = this.te.getEnergyStored(null); this.curMaxTemp = this.te.maxTemp; this.curHeating = (this.te.heating ? 1 : 0); }
@Override public void detectAndSendChanges() { super.detectAndSendChanges(); for (int i = 0; i < this.crafters.size(); ++i) { ICrafting crafting = (ICrafting)this.crafters.get(i); if (this.lastBeeHealth != this.jar.currentBeeHealth) { crafting.sendProgressBarUpdate(this, 0, this.jar.currentBeeHealth); this.lastBeeHealth = this.jar.currentBeeHealth; } if (this.speciesColour != this.jar.currentBeeColour) { crafting.sendProgressBarUpdate(this, 1, this.jar.currentBeeColour); this.speciesColour = this.jar.currentBeeColour; } } }
/** * Looks for changes made in the container, sends them to every listener. */ public void detectAndSendChanges() { super.detectAndSendChanges(); for (int i = 0; i < this.crafters.size(); ++i) { ICrafting icrafting = (ICrafting) this.crafters.get(i); if (this.lastProgressTime != this.altar.processTime) { icrafting.sendProgressBarUpdate(this, 0, this.altar.processTime); } if (this.lastPowerTime != this.altar.magic) { icrafting.sendProgressBarUpdate(this, 1, this.altar.magic); } } this.lastProgressTime = this.altar.processTime; this.lastPowerTime = this.altar.magic; }
@Override public void detectAndSendChanges() { super.detectAndSendChanges(); String network = EnhancedPortals.proxy.networkManager.getPortalNID(controller); int cPortals = network != null ? EnhancedPortals.proxy.networkManager.getNetworkedPortalsCount(new GlyphIdentifier(network)) : -1; String glyphs = network == null ? "" : network; for (int i = 0; i < crafters.size(); i++) { ICrafting icrafting = (ICrafting) crafters.get(i); if (cPortals != connectedPortals) icrafting.sendProgressBarUpdate(this, 0, cPortals); if (!glyphs.equals(oldGlyphs)) { NBTTagCompound t = new NBTTagCompound(); t.setString("nid", glyphs); EnhancedPortals.instance.packetPipeline.sendTo(new PacketGuiData(t), (EntityPlayerMP) icrafting); } } oldGlyphs = glyphs; connectedPortals = cPortals; }
@Override public void detectAndSendChanges() { super.detectAndSendChanges(); byte isSending = (byte) (fluid.isSending ? 1 : 0); int fID = fluid.tank.getFluid() != null ? fluid.tank.getFluid().getFluidID() : -1, fAmt = fluid.tank.getFluidAmount(); for (int i = 0; i < crafters.size(); i++) { ICrafting icrafting = (ICrafting) crafters.get(i); if (wasSending != isSending) icrafting.sendProgressBarUpdate(this, 0, isSending); if (fluidID != fID) icrafting.sendProgressBarUpdate(this, 1, fID); if (fluidAmt != fAmt) icrafting.sendProgressBarUpdate(this, 2, fAmt); wasSending = isSending; fluidID = fID; fluidAmt = fAmt; } }
@Override public void detectAndSendChanges() { super.detectAndSendChanges(); byte isSending = (byte) (energy.isSending ? 1 : 0); int en = energy.storage.getEnergyStored(); for (int i = 0; i < crafters.size(); i++) { ICrafting icrafting = (ICrafting) crafters.get(i); if (wasSending != isSending) icrafting.sendProgressBarUpdate(this, 0, isSending); if (lastEnergy != en) icrafting.sendProgressBarUpdate(this, 1, en); wasSending = isSending; lastEnergy = en; } }
@Override public void detectAndSendChanges() { super.detectAndSendChanges(); String glyphs = EnhancedPortals.proxy.networkManager.getPortalUID(controller); int _power = controller.getEnergyStored(ForgeDirection.UNKNOWN); if (glyphs == null) glyphs = ""; for (int i = 0; i < crafters.size(); i++) { ICrafting icrafting = (ICrafting) crafters.get(i); if (!glyphs.equals(oldGlyphs)) { NBTTagCompound t = new NBTTagCompound(); t.setString("uid", glyphs); EnhancedPortals.instance.packetPipeline.sendTo(new PacketGuiData(t), (EntityPlayerMP) icrafting); } if (power != _power) icrafting.sendProgressBarUpdate(this, 0, _power); } oldGlyphs = glyphs; power = _power; }
@Override public void detectAndSendChanges() { // TODO Auto-generated method stub super.detectAndSendChanges(); Iterator var1 = this.crafters.iterator(); while (var1.hasNext()) { ICrafting var2 = (ICrafting) var1.next(); if (this.lastTableBurnTime != this.tile.tableBurnTime) { var2.sendProgressBarUpdate(this, 0, this.tile.tableBurnTime); } if (this.lastMaxBurnTime != this.tile.tableBurnTime) { var2.sendProgressBarUpdate(this, 1, this.tile.tableBurnTime); } } this.lastTableBurnTime = this.tile.tableBurnTime; this.lastMaxBurnTime = this.tile.furnaceCookTime; }
@Override public void detectAndSendChanges() { super.detectAndSendChanges(); for (int i = 0; i < this.crafters.size(); ++i) { ICrafting icrafting = (ICrafting) this.crafters.get(i); if (this.lastEnergy != this.tileEntity.getEnergy()) { icrafting.sendProgressBarUpdate(this, 0, this.tileEntity.getEnergy()); } if (this.lastBurnTime != this.tileEntity.getBurnTime()) { icrafting.sendProgressBarUpdate(this, 1, this.tileEntity.getBurnTime()); } if (this.lastFuelBurnTime != this.tileEntity.getFuelBurnTime()) { icrafting.sendProgressBarUpdate(this, 2, this.tileEntity.getFuelBurnTime()); } } this.lastEnergy = this.tileEntity.getEnergy(); this.lastBurnTime = this.tileEntity.getBurnTime(); }
@Override public void detectAndSendChanges() { super.detectAndSendChanges(); for(int c = 0; c < this.crafters.size(); c++) { ICrafting crafting = (ICrafting) this.crafters.get(c); if(this.lastCookTime != this.furnace.cookTime) { crafting.sendProgressBarUpdate(this, 0, this.furnace.cookTime); } if(this.lastBurnTime != this.furnace.burnTime) { crafting.sendProgressBarUpdate(this, 1, this.furnace.burnTime); } if(this.lastBurnedTime != this.furnace.currentBurnTime) { crafting.sendProgressBarUpdate(this, 2, this.furnace.currentBurnTime); } } this.lastCookTime = this.furnace.cookTime; this.lastBurnTime = this.furnace.burnTime; this.lastBurnedTime = this.furnace.currentBurnTime; }
@Override public void handleStatus() { final MachineStatus status = entity.getStatus(); for (int i = 0; i < crafters.size(); ++i) { final ICrafting icrafting = (ICrafting) crafters.get(i); if (status != currentStatus) icrafting.sendProgressBarUpdate(this, ScrapAssessorTileEntity.UPDATE_ACTION_STATUS, status.ordinal()); } currentStatus = status; }
@Override public void handleStatus() { final int energyRate = entity.getInfoEnergyPerTick(); for (int i = 0; i < crafters.size(); ++i) { final ICrafting icrafting = (ICrafting) crafters.get(i); if (energyRate != currentEnergyRate) icrafting.sendProgressBarUpdate(this, BatteryRackTileEntity.UPDATE_ACTION_ENERGY_RATE, energyRate); } currentEnergyRate = energyRate; }
@Override public void detectAndSendChanges() { super.detectAndSendChanges(); Iterator iterator = this.crafters.iterator(); while (iterator.hasNext()) { ICrafting crafting = (ICrafting) iterator.next(); if (this.lastBurnTime != this.furnaceInv.getField(0)) { crafting.sendProgressBarUpdate(this, 0, this.furnaceInv.getField(0)); } if (this.lastMaxBurnTime != this.furnaceInv.getField(1)) { crafting.sendProgressBarUpdate(this, 1, this.furnaceInv.getField(1)); } if (this.lastWater != this.furnaceInv.getField(2)) { crafting.sendProgressBarUpdate(this, 2, this.furnaceInv.getField(2)); } if (this.lastWater != this.furnaceInv.getField(3)) { crafting.sendProgressBarUpdate(this, 3, this.furnaceInv.getField(3)); } } this.lastBurnTime = this.furnaceInv.getField(0); this.lastMaxBurnTime = this.furnaceInv.getField(1); this.lastWater = this.furnaceInv.getField(2); this.lastMaxWater = this.furnaceInv.getField(3); }
@Override public void detectAndSendChanges() { super.detectAndSendChanges(); Iterator iterator = this.crafters.iterator(); while (iterator.hasNext()) { ICrafting crafting = (ICrafting) iterator.next(); if (this.lastFermentTime != this.fermenterInv.getField(0)) { crafting.sendProgressBarUpdate(this, 0, this.fermenterInv.getField(0)); } if (this.lastMaxFermentTime != this.fermenterInv.getField(1)) { crafting.sendProgressBarUpdate(this, 1, this.fermenterInv.getField(1)); } } this.lastFermentTime = this.fermenterInv.getField(0); this.lastMaxFermentTime = this.fermenterInv.getField(1); }
@Override public void detectAndSendChanges() { super.detectAndSendChanges(); Iterator iterator = this.crafters.iterator(); while (iterator.hasNext()) { ICrafting crafting = (ICrafting) iterator.next(); if (this.lastWorkTime != this.millInv.getField(0)) { crafting.sendProgressBarUpdate(this, 0, this.millInv.getField(0)); } if (this.lastMaxWorkTime != this.millInv.getField(1)) { crafting.sendProgressBarUpdate(this, 1, this.millInv.getField(1)); } } this.lastWorkTime = this.millInv.getField(0); this.lastMaxWorkTime = this.millInv.getField(1); }
public void detectAndSendChanges() { super.detectAndSendChanges(); if (player instanceof EntityPlayerMP) { FusionWarfare.network.sendTo(new ClientPacketHandler("sync.fusion%" + tileEntityEnergy.energy), (EntityPlayerMP) player); } for (int i = 0; i < this.crafters.size(); ++i) { ICrafting craft = (ICrafting) this.crafters.get(i); if (this.lastProgressTime != tileEntityEnergy.progress) { craft.sendProgressBarUpdate(this, 1, tileEntityEnergy.progress); } } lastProgressTime = tileEntityEnergy.progress; }
public void detectAndSendChanges() { super.detectAndSendChanges(); for (int i = 0; i < this.crafters.size(); ++i) { ICrafting icrafting = (ICrafting)this.crafters.get(i); if (this.lastBurnTime != this.tileEntity.burnTime) { icrafting.sendProgressBarUpdate(this, 1, this.tileEntity.burnTime); } if (this.lastItemBurnTime != this.tileEntity.currentItemBurnTime) { icrafting.sendProgressBarUpdate(this, 2, this.tileEntity.currentItemBurnTime); } } this.lastBurnTime = this.tileEntity.burnTime; this.lastItemBurnTime = this.tileEntity.currentItemBurnTime; }
/** * Looks for changes made in the container, sends them to every listener. */ public void detectAndSendChanges() { super.detectAndSendChanges(); for (int i = 0; i < this.crafters.size(); ++i) { ICrafting icrafting = (ICrafting)this.crafters.get(i); if (this.cookTime != this.tileFurnace.getField(2)) { icrafting.sendProgressBarUpdate(this, 2, this.tileFurnace.getField(2)); } if (this.furnaceBurnTime != this.tileFurnace.getField(0)) { icrafting.sendProgressBarUpdate(this, 0, this.tileFurnace.getField(0)); } if (this.currentItemBurnTime != this.tileFurnace.getField(1)) { icrafting.sendProgressBarUpdate(this, 1, this.tileFurnace.getField(1)); } } this.cookTime = this.tileFurnace.getField(2); this.furnaceBurnTime = this.tileFurnace.getField(0); this.currentItemBurnTime = this.tileFurnace.getField(1); }
@Override public void detectAndSendChanges() { super.detectAndSendChanges(); for (int i = 0; i < crafters.size(); ++i) { ICrafting icrafting = (ICrafting)crafters.get(i); if (lastCookTime != te.timeSinceStarted) { icrafting.sendProgressBarUpdate(this, 0, te.timeSinceStarted); } if (lastBurnTime != te.burnTimeLeft) { icrafting.sendProgressBarUpdate(this, 1, te.burnTimeLeft); } if (lastItemBurnTime != te.originalBurnTime) { icrafting.sendProgressBarUpdate(this, 2, te.originalBurnTime); } } lastCookTime = te.timeSinceStarted; lastBurnTime = te.burnTimeLeft; lastItemBurnTime = te.originalBurnTime; }
public void detectAndSendChanges() { super.detectAndSendChanges(); for (int i = 0; i < this.crafters.size(); i++) { ICrafting icrafting = (ICrafting) this.crafters.get(i); if (this.lastCookTime != this.BasTe.cookTime) { icrafting.sendProgressBarUpdate(this, 0, this.BasTe.cookTime); } if (this.lastBurnTime != this.BasTe.burnTime) { icrafting.sendProgressBarUpdate(this, 1, this.BasTe.burnTime); } if (this.lastCurrentItemBurnTime != this.BasTe.currentItemBurnTime) { icrafting.sendProgressBarUpdate(this, 2, this.BasTe.currentItemBurnTime); } } this.lastCookTime = this.BasTe.cookTime; this.lastBurnTime = this.BasTe.burnTime; this.lastCurrentItemBurnTime = this.BasTe.currentItemBurnTime; }
public void detectAndSendChanges() { super.detectAndSendChanges(); for (int i = 0; i < this.crafters.size(); i++) { ICrafting icrafting = (ICrafting) this.crafters.get(i); if (this.lastCookTime != this.GearTe.cookTime) { icrafting.sendProgressBarUpdate(this, 0, this.GearTe.cookTime); } if (this.lastBurnTime != this.GearTe.burnTime) { icrafting.sendProgressBarUpdate(this, 1, this.GearTe.burnTime); } if (this.lastCurrentItemBurnTime != this.GearTe.currentItemBurnTime) { icrafting.sendProgressBarUpdate(this, 2, this.GearTe.currentItemBurnTime); } } this.lastCookTime = this.GearTe.cookTime; this.lastBurnTime = this.GearTe.burnTime; this.lastCurrentItemBurnTime = this.GearTe.currentItemBurnTime; }
@Override public void addCraftingToCrafters( ICrafting icrafting ) { super.addCraftingToCrafters( icrafting ); icrafting.sendProgressBarUpdate( this, PROGRESS_ERRORMSG, m_errorMessage.ordinal() ); boolean canEdit = false; boolean canEditIPAddress = false; if( icrafting instanceof EntityPlayer ) { EntityPlayer player = (EntityPlayer)icrafting; canEdit = QCraft.canPlayerCreatePortals( player ); canEditIPAddress = QCraft.canPlayerEditPortalServers( player ); } icrafting.sendProgressBarUpdate( this, PROGRESS_IS_TELEPORTER, m_isTeleporter ? 1 : 0 ); icrafting.sendProgressBarUpdate( this, PROGRESS_IS_TELEPORTER_ENERGIZED, m_isTeleporterEnergized ? 1 : 0 ); icrafting.sendProgressBarUpdate( this, PROGRESS_CAN_EDIT, canEdit ? 1 : 0 ); icrafting.sendProgressBarUpdate( this, PROGRESS_CAN_EDIT_IP, canEditIPAddress ? 1 : 0 ); }
@Override public void detectAndSendChanges() { super.detectAndSendChanges(); for (ICrafting crafting : this.crafters) { if (this.lastSplitTime != this.splitter.splitTime) { crafting.sendProgressBarUpdate(this, 0, this.splitter.splitTime); } if (this.lastBurnTime != this.splitter.burnTime) { crafting.sendProgressBarUpdate(this, 1, this.splitter.burnTime); } if (this.lastMaxBurnTime != this.splitter.maxBurnTime) { crafting.sendProgressBarUpdate(this, 2, this.splitter.maxBurnTime); } } this.lastSplitTime = this.splitter.splitTime; this.lastBurnTime = this.splitter.burnTime; this.lastMaxBurnTime = this.splitter.maxBurnTime; }
@Override public void detectAndSendChanges() { super.detectAndSendChanges(); for (ICrafting crafting : this.crafters) { if (this.lastMeltTime != this.melter.meltTime) { crafting.sendProgressBarUpdate(this, 0, this.melter.meltTime); } if (this.lastBurnTime != this.melter.burnTime) { crafting.sendProgressBarUpdate(this, 1, this.melter.burnTime); } if (this.lastMaxBurnTime != this.melter.maxBurnTime) { crafting.sendProgressBarUpdate(this, 2, this.melter.maxBurnTime); } } this.lastMeltTime = this.melter.meltTime; this.lastBurnTime = this.melter.burnTime; this.lastMaxBurnTime = this.melter.maxBurnTime; }