本文整理了Java中net.minecraft.inventory.Slot.onPickupFromSlot()
方法的一些代码示例,展示了Slot.onPickupFromSlot()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Slot.onPickupFromSlot()
方法的具体详情如下:
包路径:net.minecraft.inventory.Slot
类名称:Slot
方法名:onPickupFromSlot
暂无
代码示例来源:origin: PenguinSquad/Harvest-Festival
slot.onPickupFromSlot(player, stack);
代码示例来源:origin: coolAlias/Tutorial-Demo
slot.onPickupFromSlot(player, itemstack1);
代码示例来源:origin: PenguinSquad/Harvest-Festival
@Override
public ItemStack transferStackInSlot(EntityPlayer player, int slotID) {
int size = fridge.getContents().getSizeInventory();
int low = size + 27;
int high = low + 9;
ItemStack newStack = null;
final Slot slot = inventorySlots.get(slotID);
if (slot != null && slot.getHasStack()) {
ItemStack stack = slot.getStack();
newStack = stack.copy();
if (slotID < size) {
if (!mergeItemStack(stack, size, high, true)) return null;
} else if (TileFridge.isValid(stack)) {
if (!mergeItemStack(stack, 0, fridge.getContents().getSizeInventory(), false)) return null;
} else if (slotID >= size && slotID < low) {
if (!mergeItemStack(stack, low, high, false)) return null;
} else if (slotID >= low && slotID < high && !mergeItemStack(stack, size, low, false)) return null;
if (stack.stackSize == 0) {
slot.putStack(null);
} else {
slot.onSlotChanged();
}
if (stack.stackSize == newStack.stackSize) return null;
slot.onPickupFromSlot(player, stack);
}
return newStack;
}
代码示例来源:origin: coolAlias/Tutorial-Demo
slot.onPickupFromSlot(player, itemstack1);
代码示例来源:origin: PenguinSquad/Harvest-Festival
slot7.onPickupFromSlot(player, inventoryplayer.getItemStack());
} else {
slot7.putStack(null);
slot7.onPickupFromSlot(player, inventoryplayer.getItemStack());
inventoryplayer.setInventorySlotContents(dragType, itemstack10);
slot5.putStack(null);
slot5.onPickupFromSlot(player, itemstack10);
slot5.onPickupFromSlot(player, itemstack10);
slot5.putStack(itemstack7);
inventoryplayer.setInventorySlotContents(dragType, itemstack10);
slot5.onPickupFromSlot(player, itemstack10);
slot3.onPickupFromSlot(player, itemstack5);
player.dropItem(itemstack5, true);
slot8.onPickupFromSlot(player, itemstack2);
内容来源于网络,如有侵权,请联系作者删除!