Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

wishmaster

Members
  • 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?

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.