@Override
public void sendSlotContents(Container containerToSend, int slotInd, ItemStack stack) {
Slot slot = containerToSend.getSlot(slotInd);
boolean charge = true;
if (slot != null) {
if (slot.inventory instanceof InventoryPlayer) {
// We don't charge for changes to the player's inventory.
charge = false;
}
}
System.out.println("Send slot contents for "+slotInd+":");
if (stack == null)
System.out.println(" - No contents");
else
System.out.println(" - "+stack.stackSize+" "+stack.getDisplayName());
if (charge) {
System.out.println("Charging a fee for data transfer...");
this.chargeForAccess(1);
}
}
RemoteShellEntity.java 文件源码
java
阅读 20
收藏 0
点赞 0
评论 0
项目:rezolve
作者:
评论列表
文章目录