Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

NickWrecks

Members
  • Posts

    2
  • Joined

  • Last visited

NickWrecks's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. I'm such a moron. Thank you so much, it was such an obvious fix.
  2. I'm trying to model an item after the book and quill. The goal is to open a GUI in which the player can write stuff, and when a button is pressed use NBT to store it. To make things easier on myself I'm limiting it to one page and no signing feature. In the packet handler, I'm creating a method (called processEditScroll, obviously a copy of processEditBook from ServerPlayNetHandler) that checks if the item in hand is the scroll (again, like processEditBook). What I believe to be the relevant code is here: public void processEditScroll(ScrollPacket packetIn) { ItemStack itemstack = packetIn.getStack(); if (!itemstack.isEmpty()) { if (MessageScrollItem.isNBTValid(itemstack.getTag())) { ItemStack itemstack1 = this.player.getHeldItem(packetIn.getHand()); if (itemstack.getItem() == ModItems.MESSAGE_SCROLL) I'm aware I can't compare ItemStacks to Items (since I did try and look into it before posting, and that's the only related problem that pops up) so I use itemstack.getItem. The issue I'm having is that Intellij says In case it's at all relevant, I'm using the DefferedRegistry system.
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.