Ok, so maybe I'm googling the wrong thing, but I've looked through tons of stuff on NBT and capabilities and I can't seem to figure this out. I have a block that provides the player with 7 "bungee" items that when used will teleport you back to the block you got the item from. However, I can't seem to figure out how to get this to work.
Say my code is this:
i.insertItem(0, new ItemStack(new WaypointBungee(pos), 7), false);
Not only does the item not appear in the inventory, but when I register the item, I have nothing to put as the constructor parameter.
So if I create a method that adds the BlockPos, then I solve the ladder problem but not the former.
How can I make it so that I can add a custom location to this item?