Jump to content

wishmaster

Members
  • Posts

    6
  • Joined

  • Last visited

Everything posted by wishmaster

  1. ahh ok you have 2 slots with the same slot number as to why I figured may be part of the issue both of which are set to 0 ill leave this one to someone else then
  2. Before: addSlotToContainer(new Slot(input, 0, 49, 47)); addSlotToContainer(new CustomSlot(output, 0, 107, 47)); After: addSlotToContainer(new CustomSlot(output, 0, 107, 47)); addSlotToContainer(new Slot(input, 1, 49, 47)); also below should be something like this being a crafting table 2 slots one input one output @Override public ItemStack transferStackInSlot(EntityPlayer player, int slot){ ItemStack stack = null; Slot slotObject = (Slot)this.inventorySlots.get(slot); if (slotObject != null && slotObject.getHasStack()) { ItemStack stackInSlot = slotObject.getStack(); stack = stackInSlot.copy(); if (slot == 0) { if (!this.mergeItemStack(stackInSlot, 2, 38, true)) { return null; } slotObject.onSlotChange(stackInSlot, stack); } else if (slot >= 2 && slot < 29) { if (!this.mergeItemStack(stackInSlot, 29, 38, false)) { return null; } } else if (slot >= 29 && slot < 38) { if (!this.mergeItemStack(stackInSlot, 2, 29, false)) { return null; } } else if (!this.mergeItemStack(stackInSlot, 2, 38, false)) { return null; } if (stackInSlot.stackSize == 0) { slotObject.putStack((ItemStack)null); } else { slotObject.onSlotChanged(); } if (stackInSlot.stackSize == stack.stackSize) { return null; } slotObject.onPickupFromSlot(par1EntityPlayer, stackInSlot); } return stack; } just trying to be helpful
  3. take a look at ContainerEnchantment for exp changes on EntityPlayer it may help with this EntityPlayer.addExperienceLevel(+ or - value); I wouldn't physically override it where you have public void addExperienceLevel(int par1) as for storing in the item I would suggest damage values as per level with a cap before a new item is needed to store more. a block with a TileEntity storing to nbt would allow for more storage though
  4. not sure if this will help you or not as I am still learning all this myself but a couple things that stick out In your container Before: slotObject.putStack(null); After: slotObject.putStack((ItemStack)null); Before: } else { slotObject.onSlotChanged(); } } return stack; } After: } else { slotObject.onSlotChanged(); } slotObject.onPickupFromSlot(par1EntityPlayer, stackInSlot); } return stack; }
  5. Are you trying to physically move the player position one block to another?
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.