本文整理匯總了Java中net.minecraft.inventory.IContainerListener.sendProgressBarUpdate方法的典型用法代碼示例。如果您正苦於以下問題:Java IContainerListener.sendProgressBarUpdate方法的具體用法?Java IContainerListener.sendProgressBarUpdate怎麽用?Java IContainerListener.sendProgressBarUpdate使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類net.minecraft.inventory.IContainerListener
的用法示例。
在下文中一共展示了IContainerListener.sendProgressBarUpdate方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: detectAndSendChanges
import net.minecraft.inventory.IContainerListener; //導入方法依賴的package包/類
@Override
public void detectAndSendChanges() {
super.detectAndSendChanges();
if(lastindex!=index){
pictureOutSlot.decrStackSize(64);
lastindex=index;
}
if(totalPictureNum!=0&&!pictureOutSlot.getHasStack()&&index!=-1){
String imageName = listPid.get(index);
ItemStack itemPicture = new ItemStack(ItemLoader.itemPicture);
NBTTagCompound nbt = new NBTTagCompound();
nbt.setString("pid", imageName);
itemPicture.setTagCompound(nbt);
pictureOutSlot.putStack(itemPicture);
}
// System.out.println(tileEntity.getBurnTime());
for (IContainerListener i : this.listeners) {
i.sendProgressBarUpdate(this, 0, totalPictureNum);
i.sendProgressBarUpdate(this, 1, index);
}
}
示例2: detectAndSendChanges
import net.minecraft.inventory.IContainerListener; //導入方法依賴的package包/類
@Override
public void detectAndSendChanges()
{
super.detectAndSendChanges();
for (int i = 0; i < this.listeners.size(); i++)
{
IContainerListener IContainerListener = this.listeners.get(i);
if (this.burnTime != tile.getField(1))
{
IContainerListener.sendProgressBarUpdate(this, 0, tile.burnTime);
}
if (this.totalBurnTime != tile.getField(0))
{
IContainerListener.sendProgressBarUpdate(this, 1, tile.totalBurnTime);
}
}
this.burnTime = tile.getField(1);
this.totalBurnTime = tile.getField(0);
}
示例3: detectAndSendChanges
import net.minecraft.inventory.IContainerListener; //導入方法依賴的package包/類
@Override
public void detectAndSendChanges()
{
super.detectAndSendChanges();
for (int i = 0; i < this.listeners.size(); ++i)
{
IContainerListener icontainerlistener = (IContainerListener)this.listeners.get(i);
if (this.progress != this.incubator.getField(0))
{
icontainerlistener.sendProgressBarUpdate(this, 0, this.incubator.getField(0));
}
else if (this.powerRemaining != this.incubator.getField(1))
{
icontainerlistener.sendProgressBarUpdate(this, 1, this.incubator.getField(1));
}
}
this.progress = this.incubator.getField(0);
this.powerRemaining = this.incubator.getField(1);
}
示例4: detectAndSendChanges
import net.minecraft.inventory.IContainerListener; //導入方法依賴的package包/類
@Override
public void detectAndSendChanges()
{
super.detectAndSendChanges();
for (int i = 0; i < this.listeners.size(); i++)
{
IContainerListener IContainerListener = this.listeners.get(i);
if (this.power != tile.getPowerScaled(47)) {
IContainerListener.sendProgressBarUpdate(this, 0, (int) tile.getPowerScaled(47));
}
if (this.progress != tile.getProgress())
{
IContainerListener.sendProgressBarUpdate(this, 1, tile.getProgress());
}
if (this.burnTime != tile.getScaledBurnTime(13))
{
IContainerListener.sendProgressBarUpdate(this, 2, tile.getScaledBurnTime(13));
}
}
}
示例5: detectAndSendChanges
import net.minecraft.inventory.IContainerListener; //導入方法依賴的package包/類
public void detectAndSendChanges()
{
super.detectAndSendChanges();
for (int i = 0; i < this.listeners.size(); ++i)
{
IContainerListener icontainerlistener = (IContainerListener)this.listeners.get(i);
if (this.dualCookTime != this.alloyfurnace.getField(0))
{
icontainerlistener.sendProgressBarUpdate(this, 0, this.alloyfurnace.getField(0));
}
if (this.dualPower != this.alloyfurnace.getField(1))
{
icontainerlistener.sendProgressBarUpdate(this, 1, this.alloyfurnace.getField(1));
}
}
this.dualCookTime = this.alloyfurnace.getField(0);
this.dualPower = this.alloyfurnace.getField(1);
}
示例6: detectAndSendChanges
import net.minecraft.inventory.IContainerListener; //導入方法依賴的package包/類
@Override
public void detectAndSendChanges() {
super.detectAndSendChanges();
// System.out.println(player.getEntityWorld().isRemote);
for (IContainerListener i : this.listeners) {
if (this.burnTime < this.totalBurnTime) {
this.burnTime++;
if (this.burnTime == this.totalBurnTime) {
//System.out.println("success");
if (filmOutCatch != null) {
filmOutSlot.putStack(filmOutCatch);
if (type == 0) {
NBTTagCompound itemTag = new NBTTagCompound();
filmOutCatch.writeToNBT(itemTag);
player.getActiveItemStack().getTagCompound().setTag("filmOutSlot", itemTag);
player.getActiveItemStack().getTagCompound().removeTag("filmOutCatch");
}
if (type == 1) {
items.extractItem(3, 64, false);
}
filmOutCatch = null;
}
}
i.sendProgressBarUpdate(this, 0, this.burnTime);
if (type == 1 && ((EntityTripod) player.getEntityWorld()
.getEntityByID(player.getEntityData().getInteger("usingGui"))) != null)
((EntityTripod) player.getEntityWorld()
.getEntityByID(player.getEntityData().getInteger("usingGui"))).setBurnTime(this.burnTime);
}
if (type == 1 && ((EntityTripod) player.getEntityWorld()
.getEntityByID(player.getEntityData().getInteger("usingGui")) != null)) {
i.sendProgressBarUpdate(this, 1, ((EntityTripod) player.getEntityWorld()
.getEntityByID(player.getEntityData().getInteger("usingGui"))).getDelay());
}
}
}
示例7: detectAndSendChanges
import net.minecraft.inventory.IContainerListener; //導入方法依賴的package包/類
@Override
public void detectAndSendChanges() {
super.detectAndSendChanges();
// System.out.println(tileEntity.getBurnTime());
for (IContainerListener i : this.listeners) {
i.sendProgressBarUpdate(this, 0, tileEntity.getBurnTime());
}
}
示例8: addListener
import net.minecraft.inventory.IContainerListener; //導入方法依賴的package包/類
@Override
public void addListener(IContainerListener crafting)
{
super.addListener(crafting);
crafting.sendProgressBarUpdate(this, 0, tile.burnTime);
crafting.sendProgressBarUpdate(this, 1, tile.totalBurnTime);
}
示例9: detectAndSendChanges
import net.minecraft.inventory.IContainerListener; //導入方法依賴的package包/類
public void detectAndSendChanges()
{
super.detectAndSendChanges();
for(int i = 0; i < this.listeners.size(); i++)
{
IContainerListener listener = (IContainerListener)this.listeners.get(i);
if(this.lastCookTime != this.relicLab.cookTime)
{
listener.sendProgressBarUpdate(this, 0, this.relicLab.cookTime);
}
if(this.lastBurnTime != this.relicLab.burnTime)
{
listener.sendProgressBarUpdate(this, 1, this.relicLab.burnTime);
}
if(this.lastCurrectItemBurnTime != this.relicLab.currectItemBurnTime)
{
listener.sendProgressBarUpdate(this, 2, this.relicLab.currectItemBurnTime);
}
}
this.lastCookTime = this.relicLab.cookTime;
this.lastBurnTime = this.relicLab.burnTime;
this.lastCurrectItemBurnTime = this.relicLab.currectItemBurnTime;
}
示例10: detectAndSendChanges
import net.minecraft.inventory.IContainerListener; //導入方法依賴的package包/類
@Override
public void detectAndSendChanges() {
super.detectAndSendChanges();
for (IContainerListener craft : this.listeners) {
if (this.lastMechPower != this.tileChute.power)
craft.sendProgressBarUpdate(this, 0, this.tileChute.power);
}
this.lastMechPower = this.tileChute.power;
}
示例11: sendInfo
import net.minecraft.inventory.IContainerListener; //導入方法依賴的package包/類
@Override
public void sendInfo(IContainerListener craft) {
super.sendInfo(craft);
craft.sendProgressBarUpdate(this, 0, this.tileRealloc.reallocCookTime);
craft.sendProgressBarUpdate(this, 1, this.tileRealloc.lpCost);
craft.sendProgressBarUpdate(this, 2, this.tileRealloc.xpCost);
craft.sendProgressBarUpdate(this, 3, this.tileRealloc.nTopEnchs);
}
示例12: detectAndSendChanges
import net.minecraft.inventory.IContainerListener; //導入方法依賴的package包/類
@Override
public void detectAndSendChanges()
{
super.detectAndSendChanges();
for (int i = 0; i < this.listeners.size(); ++i)
{
IContainerListener icontainerlistener = (IContainerListener)this.listeners.get(i);
if (this.progress != this.enchanter.getField(0))
{
icontainerlistener.sendProgressBarUpdate(this, 0, this.enchanter.getField(0));
}
else if (this.powerRemaining != this.enchanter.getField(1))
{
icontainerlistener.sendProgressBarUpdate(this, 1, this.enchanter.getField(1));
}
else if (this.ticksRequired != this.enchanter.getField(2))
{
icontainerlistener.sendProgressBarUpdate(this, 2, this.enchanter.getField(2));
}
}
this.progress = this.enchanter.getField(0);
this.powerRemaining = this.enchanter.getField(1);
this.ticksRequired = this.enchanter.getField(2);
}
示例13: detectAndSendChanges
import net.minecraft.inventory.IContainerListener; //導入方法依賴的package包/類
@Override
public void detectAndSendChanges()
{
super.detectAndSendChanges();
boolean allFieldsHaveChanged = false;
boolean fieldHasChanged[] = new boolean[crafter.getFieldCount()];
if (cachedFields == null) {
cachedFields = new int[crafter.getFieldCount()];
allFieldsHaveChanged = true;
}
else if (cachedFields.length != crafter.getFieldCount()) {
cachedFields = Arrays.copyOf(cachedFields, crafter.getFieldCount());
}
for (int i = 0; i < cachedFields.length; i++) {
if (allFieldsHaveChanged || cachedFields[i] != crafter.getField(i)) {
cachedFields[i] = crafter.getField(i);
fieldHasChanged[i] = true;
}
}
for (int i = 0; i < this.listeners.size(); ++i) {
IContainerListener icrafting = this.listeners.get(i);
for (int fieldID = 0; fieldID < crafter.getFieldCount(); ++fieldID) {
if (fieldHasChanged[fieldID]) {
icrafting.sendProgressBarUpdate(this, fieldID, cachedFields[fieldID]);
}
}
}
}
示例14: sendInfo
import net.minecraft.inventory.IContainerListener; //導入方法依賴的package包/類
@Override
public void sendInfo(IContainerListener craft) {
super.sendInfo(craft);
craft.sendProgressBarUpdate(this, 0, this.tileFurnace.furnaceCookTime);
craft.sendProgressBarUpdate(this, 1, this.tileFurnace.furnaceBurnTime);
craft.sendProgressBarUpdate(this, 2, this.tileFurnace.currentBurnTime);
}
示例15: addCraftingToCrafters
import net.minecraft.inventory.IContainerListener; //導入方法依賴的package包/類
public void addCraftingToCrafters (IContainerListener listener)
{
super.addListener(listener);
listener.sendProgressBarUpdate(this, 0, this.relicLab.cookTime);
listener.sendProgressBarUpdate(this, 1, this.relicLab.burnTime);
listener.sendProgressBarUpdate(this, 2, this.relicLab.currectItemBurnTime);
}