当前位置: 首页>>代码示例>>Java>>正文


Java PlayerInventory类代码示例

本文整理汇总了Java中com.bioxx.tfc.Core.Player.PlayerInventory的典型用法代码示例。如果您正苦于以下问题:Java PlayerInventory类的具体用法?Java PlayerInventory怎么用?Java PlayerInventory使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


PlayerInventory类属于com.bioxx.tfc.Core.Player包,在下文中一共展示了PlayerInventory类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: ContainerBrickOven

import com.bioxx.tfc.Core.Player.PlayerInventory; //导入依赖的package包/类
public ContainerBrickOven(InventoryPlayer inventoryplayer, TEBrickOven BrickOven)
{
	this.teBrickOven = BrickOven;
	firetemp = -1111;
	
	//Input Slots
	addSlotToContainer(new SlotFirepitIn(inventoryplayer.player, teBrickOven, 0, 84, 19));
	addSlotToContainer(new SlotFirepitIn(inventoryplayer.player, teBrickOven, 1, 102, 19));
	addSlotToContainer(new SlotFirepitIn(inventoryplayer.player, teBrickOven, 2, 120, 19));
	
	//Output Slots
	addSlotToContainer(new SlotFirepitOut(inventoryplayer.player, teBrickOven, 3, 84, 47));
	addSlotToContainer(new SlotFirepitOut(inventoryplayer.player, teBrickOven, 4, 102, 47));
	addSlotToContainer(new SlotFirepitOut(inventoryplayer.player, teBrickOven, 5, 120, 47));
	
	//Fuel Slots
	addSlotToContainer(new SlotBrickOvenFuel(inventoryplayer.player, teBrickOven, 6, 8, 7));
	addSlotToContainer(new SlotFirepit(inventoryplayer.player, teBrickOven, 7, 8, 25));
	addSlotToContainer(new SlotFirepit(inventoryplayer.player, teBrickOven, 8, 8, 43));
	addSlotToContainer(new SlotFirepit(inventoryplayer.player, teBrickOven, 9, 8, 61));
	
	PlayerInventory.buildInventoryLayout(this, inventoryplayer, 8, 90, false, true);
}
 
开发者ID:StrayWolfe,项目名称:TerrafirmaPunk-Tweaks,代码行数:24,代码来源:ContainerBrickOven.java

示例2: drawGuiContainerBackgroundLayer

import com.bioxx.tfc.Core.Player.PlayerInventory; //导入依赖的package包/类
@Override
protected void drawGuiContainerBackgroundLayer(float f, int mouseX, int mouseY)
{
    bindTexture(_texture);
    
    int w = (width - xSize) / 2;
    int h = (height - ySize) / 2;
    int v = WindowHeight;

    drawTexturedModalRect(w, h, 0, v, xSize, ySize);
    
    drawDie(w, h);

    drawCenteredString(StatCollector.translateToLocal("gui.Trussel.Title"), w + _titleX, h + _titleY, WindowWidth, _colorDefaultText);
    this.fontRendererObj.drawString(StatCollector.translateToLocal("gui.Trussel.Name") + ":",  w + _nameLabelX, h + _nameLabelY, _colorDefaultText);
    this.fontRendererObj.drawString(_name,  w + _nameX, h + _nameY, _colorDefaultText);
    this.fontRendererObj.drawString(StatCollector.translateToLocal("gui.Trussel.Weight") + ":",  w + _weightLabelX, h + _weightLabelY, _colorDefaultText);
    this.fontRendererObj.drawString(_weight,  w + _weightX, h + _weightY, _colorDefaultText);
    this.fontRendererObj.drawString(StatCollector.translateToLocal("gui.Trussel.Die") + ":",  w + _dieLabelX, h + _dieLabelY, _colorDefaultText);

    PlayerInventory.drawInventory(this, width, height, ySize - PlayerInventory.invYSize);
    
    _copyButton.enabled = this.inventorySlots.getSlot(0).getStack() != null;
}
 
开发者ID:Aleksey-Terzi,项目名称:MerchantsTFC,代码行数:25,代码来源:GuiTrussel.java

示例3: drawGuiContainerBackgroundLayer

import com.bioxx.tfc.Core.Player.PlayerInventory; //导入依赖的package包/类
@Override
protected void drawGuiContainerBackgroundLayer(float f, int mouseX, int mouseY)
{
    bindTexture(_texture);
    
    int w = (width - xSize) / 2;
    int h = (height - ySize) / 2;
    int v = 0;

    drawTexturedModalRect(w, h, 0, v, xSize, ySize);
    
    drawCenteredString(StatCollector.translateToLocal("gui.StallLimit.Title"), w + _titleX, h + _titleY, WindowWidth, _colorDefaultText);
    drawRightAlignedString(StatCollector.translateToLocal("gui.StallLimit.Limit"), w + _limitLabelX, h + _limitLabelY, _limitLabelWidth, _colorDefaultText);
    
    _limitTextField.drawTextBox();
    
    PlayerInventory.drawInventory(this, width, height, ySize - PlayerInventory.invYSize);
}
 
开发者ID:Aleksey-Terzi,项目名称:MerchantsTFC,代码行数:19,代码来源:GuiStallLimit.java

示例4: ContainerStall

import com.bioxx.tfc.Core.Player.PlayerInventory; //导入依赖的package包/类
public ContainerStall(InventoryPlayer inventoryplayer, TileEntityStall stall, boolean isOwnerMode, World world, int x, int y, int z)
{
    _stall = stall;
    _isOwnerMode = isOwnerMode;
    _world = world;

    buildLayout();

    PlayerInventory.buildInventoryLayout(this, inventoryplayer, 8, GuiStall.WindowHeight - 1 + 5, false, true);

}
 
开发者ID:Aleksey-Terzi,项目名称:MerchantsTFC,代码行数:12,代码来源:ContainerStall.java

示例5: ContainerWarehouse

import com.bioxx.tfc.Core.Player.PlayerInventory; //导入依赖的package包/类
public ContainerWarehouse(InventoryPlayer inventoryplayer, TileEntityWarehouse warehouse, World world, int x, int y, int z)
{
    _warehouse = warehouse;
    _world = world;

    addSlotToContainer(new SlotWarehouse(_warehouse, 0, GuiWarehouse.SlotX, GuiWarehouse.SlotY));

    PlayerInventory.buildInventoryLayout(this, inventoryplayer, 8, GuiWarehouse.WindowHeight - 1 + 5, false, true);
}
 
开发者ID:Aleksey-Terzi,项目名称:MerchantsTFC,代码行数:10,代码来源:ContainerWarehouse.java

示例6: ContainerStallLimit

import com.bioxx.tfc.Core.Player.PlayerInventory; //导入依赖的package包/类
public ContainerStallLimit(InventoryPlayer inventoryplayer, TileEntityStall stall, World world, int x, int y, int z)
{
    addSlotToContainer(new SlotForShowOnly(stall, stall.getActivePriceSlotIndex(), GuiStallLimit.PriceSlotX, GuiStallLimit.SlotY));
    addSlotToContainer(new SlotForShowOnly(stall, stall.getActiveGoodSlotIndex(), GuiStallLimit.GoodSlotX, GuiStallLimit.SlotY));

    PlayerInventory.buildInventoryLayout(this, inventoryplayer, 8, GuiStallLimit.WindowHeight - 1 + 5, false, true);
}
 
开发者ID:Aleksey-Terzi,项目名称:MerchantsTFC,代码行数:8,代码来源:ContainerStallLimit.java

示例7: ContainerTrussel

import com.bioxx.tfc.Core.Player.PlayerInventory; //导入依赖的package包/类
public ContainerTrussel(InventoryPlayer inventoryplayer, World world, int x, int y, int z)
{
    _inventoryplayer = inventoryplayer;
    _world = world;
    _inventory = new TrusselInventory();

    addSlotToContainer(new SlotTrusselWithoutDie(_inventory, 0, GuiTrussel.SrcSlotX, GuiTrussel.SlotY));
    addSlotToContainer(new SlotOutputOnly(_inventory, 1, GuiTrussel.DstSlotX, GuiTrussel.SlotY));

    PlayerInventory.buildInventoryLayout(this, inventoryplayer, 8, GuiTrussel.WindowHeight - 1 + 5, true, true);
}
 
开发者ID:Aleksey-Terzi,项目名称:MerchantsTFC,代码行数:12,代码来源:ContainerTrussel.java

示例8: ContainerStorageRack

import com.bioxx.tfc.Core.Player.PlayerInventory; //导入依赖的package包/类
public ContainerStorageRack(InventoryPlayer inventoryplayer, TileEntityStorageRack storageRack, World world, int x, int y, int z)
{
    _storageRack = storageRack;
    _world = world;

    addSlotToContainer(new SlotStorageRack(_storageRack, 0, GuiStorageRack.SlotX, GuiStorageRack.SlotY));

    PlayerInventory.buildInventoryLayout(this, inventoryplayer, 8, GuiStorageRack.WindowHeight - 1 + 5, false, true);
}
 
开发者ID:Aleksey-Terzi,项目名称:MerchantsTFC,代码行数:10,代码来源:ContainerStorageRack.java

示例9: ContainerAnvilDie

import com.bioxx.tfc.Core.Player.PlayerInventory; //导入依赖的package包/类
public ContainerAnvilDie(InventoryPlayer inventoryplayer, TileEntityAnvilDie anvilDie, World world, int x, int y, int z)
{
    _anvilDie = anvilDie;
    _world = world;

    addSlotToContainer(new SlotAnvilHammer(inventoryplayer.player, _anvilDie, 0, GuiAnvilDie.HammerSlotX, GuiAnvilDie.HammerSlotY));
    addSlotToContainer(new SlotTrussel(_anvilDie, 1, GuiAnvilDie.TrusselSlotX, GuiAnvilDie.TrusselSlotY));
    addSlotToContainer(new SlotFlan(_anvilDie, 2, GuiAnvilDie.FlanSlotX, GuiAnvilDie.FlanSlotY));
    addSlotToContainer(new SlotForShowOnly(_anvilDie, 3, GuiAnvilDie.AnvilDieSlotX, GuiAnvilDie.AnvilDieSlotY));
    addSlotToContainer(new SlotOutputOnly(_anvilDie, 4, GuiAnvilDie.CoinSlotX, GuiAnvilDie.CoinSlotY));

    PlayerInventory.buildInventoryLayout(this, inventoryplayer, 8, GuiAnvilDie.WindowHeight - 1 + 5, false, true);
}
 
开发者ID:Aleksey-Terzi,项目名称:MerchantsTFC,代码行数:14,代码来源:ContainerAnvilDie.java

示例10: drawGuiContainerBackgroundLayer

import com.bioxx.tfc.Core.Player.PlayerInventory; //导入依赖的package包/类
@Override
protected void drawGuiContainerBackgroundLayer(float f, int mouseX, int mouseY)
{
    resetQuantities();
    
    bindTexture(_texture);
    
    int w = (width - xSize) / 2;
    int h = (height - ySize) / 2;
    int v = _isOwnerMode ? 0: WindowHeight;

    drawTexturedModalRect(w, h, 0, v, xSize, ySize);
    
    String inventoryName = StatCollector.translateToLocal(_stall.getInventoryName());
    String title = !_stall.getIsOwnerSpecified() ? inventoryName: inventoryName + " (" + _stall.getOwnerUserName() + ")";

    drawCenteredString(title, w + _titleX, h + _titleY, WindowWidth, _colorDefaultText);
    drawCenteredString(StatCollector.translateToLocal("gui.Stall.Prices"), w + _pricesTitleX, h + _pricesTitleY, _columnTitleWidth, _colorDefaultText);
    drawCenteredString(StatCollector.translateToLocal("gui.Stall.Goods"), w + _goodsTitleX, h + _goodsTitleY, _columnTitleWidth, _colorDefaultText);
    
    drawWarehouseText(w, h);
    drawQuantities(w, h);
    
    if(_isOwnerMode)
    {
        for(int i = 0; i < _stall.GoodsSlotIndexes.length; i++)
        {
            int limit = _stall.getLimitByGoodSlotIndex(_stall.GoodsSlotIndexes[i]);
            String limitText = limit > 0 ? String.valueOf(limit): StatCollector.translateToLocal("gui.Stall.NA");
            
            _limitButtons[i].setText(limitText, this.fontRendererObj);
        }
    }

    PlayerInventory.drawInventory(this, width, height, ySize - PlayerInventory.invYSize);
}
 
开发者ID:Aleksey-Terzi,项目名称:MerchantsTFC,代码行数:37,代码来源:GuiStall.java

示例11: drawGuiContainerBackgroundLayer

import com.bioxx.tfc.Core.Player.PlayerInventory; //导入依赖的package包/类
@Override
protected void drawGuiContainerBackgroundLayer(float f, int mouseX, int mouseY)
{
    bindTexture(_texture);
    
    int w = (width - xSize) / 2;
    int h = (height - ySize) / 2;

    drawTexturedModalRect(w, h, 0, 0, xSize, ySize);
    
    String inventoryName = StatCollector.translateToLocal(_storageRack.getInventoryName());

    drawCenteredString(inventoryName, w + _titleX, h + _titleY, WindowWidth, _colorDefaultText);

    PlayerInventory.drawInventory(this, width, height, ySize - PlayerInventory.invYSize);
}
 
开发者ID:Aleksey-Terzi,项目名称:MerchantsTFC,代码行数:17,代码来源:GuiStorageRack.java

示例12: drawGuiContainerBackgroundLayer

import com.bioxx.tfc.Core.Player.PlayerInventory; //导入依赖的package包/类
@Override
protected void drawGuiContainerBackgroundLayer(float f, int mouseX, int mouseY)
{
    bindTexture(_texture);
    
    int w = (width - xSize) / 2;
    int h = (height - ySize) / 2;

    drawTexturedModalRect(w, h, 0, 0, xSize, ySize);
    
    String inventoryName = StatCollector.translateToLocal(_warehouse.getInventoryName());

    drawCenteredString(inventoryName, w + _titleX, h + _titleY, WindowWidth, _colorDefaultText);
    drawCoords(w, h);
    
    _signButton.enabled = _warehouse.getStackInSlot(0) != null;

    PlayerInventory.drawInventory(this, width, height, ySize - PlayerInventory.invYSize);
}
 
开发者ID:Aleksey-Terzi,项目名称:MerchantsTFC,代码行数:20,代码来源:GuiWarehouse.java

示例13: drawGuiContainerBackgroundLayer

import com.bioxx.tfc.Core.Player.PlayerInventory; //导入依赖的package包/类
@Override
protected void drawGuiContainerBackgroundLayer(float f, int mouseX, int mouseY)
{
    bindTexture(_texture);
    
    int w = (width - xSize) / 2;
    int h = (height - ySize) / 2;
    int v = 0;

    drawTexturedModalRect(w, h, 0, v, xSize, ySize);
    
    drawBar(w, h);

    drawCenteredString(StatCollector.translateToLocal("gui.AnvilDie.Title"), w + _titleX, h + _titleY, WindowWidth, _colorDefaultText);

    PlayerInventory.drawInventory(this, width, height, ySize - PlayerInventory.invYSize);
    
    _mintButton.enabled = _tileEntity.canMint();
}
 
开发者ID:Aleksey-Terzi,项目名称:MerchantsTFC,代码行数:20,代码来源:GuiAnvilDie.java


注:本文中的com.bioxx.tfc.Core.Player.PlayerInventory类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。