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


Java SlotRemoveOnly类代码示例

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


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

示例1: ContainerMachineRenamer

import cofh.lib.gui.slot.SlotRemoveOnly; //导入依赖的package包/类
public ContainerMachineRenamer(TileEntityRenamer tileEntity, EntityPlayer player) {
	this.tileEntity = tileEntity;

	// Custom Storage
	addSlotToContainer(new Slot(tileEntity, 0, 44, 44));
	addSlotToContainer(new SlotRemoveOnly(tileEntity, 1, 131, 44));

	bindPlayerInventory(player.inventory);
}
 
开发者ID:roryclaasen,项目名称:RorysMod,代码行数:10,代码来源:ContainerMachineRenamer.java

示例2: ContainerRareMetalExtractor

import cofh.lib.gui.slot.SlotRemoveOnly; //导入依赖的package包/类
public ContainerRareMetalExtractor(TileEntityRareMetalExtractor tileEntity, InventoryPlayer inventory) {
    this.tileEntity = tileEntity;
    // Input slot
    this.addSlotToContainer(new SlotMultipleValid(tileEntity, 0, 49, 33, false)
                            .addValidator(new ValidatorOreDictionary(new ItemStack(Blocks.sapling)))
                            .addValidator(new ValidatorOreDictionary(new ItemStack(Blocks.cobblestone))));
    // Output slot
    this.addSlotToContainer(new SlotRemoveOnly(tileEntity, 1, 109, 33));
    
    // Energy input slot
    this.addSlotToContainer(new SlotEnergy(tileEntity, 2, 8, 53));
    
    this.addPlayerInventory(inventory, 8, 84);
}
 
开发者ID:SKCraft,项目名称:SMES,代码行数:15,代码来源:ContainerRareMetalExtractor.java


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