本文整理汇总了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();
}
示例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();
}
示例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();
}
示例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]);
}
}
示例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;
}
示例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);
}
}
}
示例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;
}
示例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);
}
示例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;
}
示例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;
}
示例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;
}
示例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);
}
示例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);
}
示例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;
}
示例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);
}