当前位置: 首页>>代码示例>>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;未经允许,请勿转载。