當前位置: 首頁>>代碼示例>>Java>>正文


Java ICrafting.sendProgressBarUpdate方法代碼示例

本文整理匯總了Java中net.minecraft.inventory.ICrafting.sendProgressBarUpdate方法的典型用法代碼示例。如果您正苦於以下問題:Java ICrafting.sendProgressBarUpdate方法的具體用法?Java ICrafting.sendProgressBarUpdate怎麽用?Java ICrafting.sendProgressBarUpdate使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在net.minecraft.inventory.ICrafting的用法示例。


在下文中一共展示了ICrafting.sendProgressBarUpdate方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: detectAndSendChanges

import net.minecraft.inventory.ICrafting; //導入方法依賴的package包/類
@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();
}
 
開發者ID:ImagicTheCat,項目名稱:FundamentalChemistry,代碼行數:20,代碼來源:ChemicalInventoryContainer.java

示例2: detectAndSendChanges

import net.minecraft.inventory.ICrafting; //導入方法依賴的package包/類
@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();
}
 
開發者ID:ImagicTheCat,項目名稱:FundamentalChemistry,代碼行數:20,代碼來源:TileSimpleMachineContainer.java

示例3: detectAndSendChanges

import net.minecraft.inventory.ICrafting; //導入方法依賴的package包/類
@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();
}
 
開發者ID:jm-organization,項目名稱:connor41-etfuturum2,代碼行數:19,代碼來源:ContainerNewBrewingStand.java

示例4: detectAndSendChanges

import net.minecraft.inventory.ICrafting; //導入方法依賴的package包/類
/**
 * 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]);
	}
}
 
開發者ID:jm-organization,項目名稱:connor41-etfuturum2,代碼行數:19,代碼來源:ContainerEnchantment.java

示例5: detectAndSendChanges

import net.minecraft.inventory.ICrafting; //導入方法依賴的package包/類
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;
}
 
開發者ID:viddeno,項目名稱:Technical,代碼行數:22,代碼來源:ContainerMachine.java

示例6: addCraftingToCrafters

import net.minecraft.inventory.ICrafting; //導入方法依賴的package包/類
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);
        }
    }
}
 
開發者ID:sameer,項目名稱:ExtraUtilities,代碼行數:25,代碼來源:ContainerTransferNode.java

示例7: detectAndSendChanges

import net.minecraft.inventory.ICrafting; //導入方法依賴的package包/類
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;
}
 
開發者ID:MAPReiff,項目名稱:MineMania-Rebirth-1.7.10,代碼行數:23,代碼來源:ContainerGrinder.java

示例8: detectAndSendChanges

import net.minecraft.inventory.ICrafting; //導入方法依賴的package包/類
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);
}
 
開發者ID:setycz,項目名稱:AnotherDustsMod,代碼行數:21,代碼來源:ContainerCrusher.java

示例9: detectAndSendChanges

import net.minecraft.inventory.ICrafting; //導入方法依賴的package包/類
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;
}
 
開發者ID:wdolezal5,項目名稱:taser-mod,代碼行數:19,代碼來源:ContainerExtruder.java

示例10: detectAndSendChanges

import net.minecraft.inventory.ICrafting; //導入方法依賴的package包/類
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;
}
 
開發者ID:wdolezal5,項目名稱:taser-mod,代碼行數:23,代碼來源:ContainerSteelFurnace.java

示例11: detectAndSendChanges

import net.minecraft.inventory.ICrafting; //導入方法依賴的package包/類
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;
}
 
開發者ID:TeamMonumental,項目名稱:FissionWarfare,代碼行數:19,代碼來源:ContainerEnergyBase.java

示例12: detectAndSendChanges

import net.minecraft.inventory.ICrafting; //導入方法依賴的package包/類
@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);
}
 
開發者ID:Shurgent,項目名稱:TFCTech,代碼行數:25,代碼來源:ContainerInductionSmelter.java

示例13: detectAndSendChanges

import net.minecraft.inventory.ICrafting; //導入方法依賴的package包/類
@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);
}
 
開發者ID:Darkyoooooo,項目名稱:DimsumCraft,代碼行數:17,代碼來源:CBuhrimill.java

示例14: detectAndSendChanges

import net.minecraft.inventory.ICrafting; //導入方法依賴的package包/類
@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;
}
 
開發者ID:MinestrapTeam,項目名稱:Minestrappolation-4,代碼行數:24,代碼來源:ContainerSplitter.java

示例15: detectAndSendChanges

import net.minecraft.inventory.ICrafting; //導入方法依賴的package包/類
@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);
}
 
開發者ID:Darkyoooooo,項目名稱:DimsumCraft,代碼行數:18,代碼來源:CSoysauceFermenter.java


注:本文中的net.minecraft.inventory.ICrafting.sendProgressBarUpdate方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。