Posted April 20, 20169 yr Hey all, I'm trying to make an item that basically acts like an infinite source of lapis lazuli. You can use it to dye wool/sheep without consuming the item. However, there seems to be one problem. Because the vanilla enchantment table uses lapis to enchant items since 1.8, you can use this item that cannot be consumed to enchant items. The problem is, the item is consumed when you enchant, as lapis normally is. I've tried to see if there's some sort of event for enchanting items in the table, and there isn't. I can't find any possible method to make it so the enchant table doesn't consume my item. I've done several searches, and I guess I'm the only one that's tried this (given, it's a pretty specific problem). Do you guys have any ideas on what I could do to solve this? Thanks for your time.
April 21, 20169 yr Author Alright, I tried this out. It looks like it had some effect on the inventory, the only problem being that the enchantment table itself ceases to function. It acts like the item in the enchanting slot is already enchanted, no options to enchant or anything, even with vanilla lapis in the table. Here's the code in the inventory class for getting the stack (where lapisGem is my item): @Override public ItemStack getStackInSlot(int index) { ItemStack stack = iInventory.getStackInSlot(index); if (stack.getItem().equals(RegisterItems.lapisGem)){ stack = new ItemStack(Items.dye,64,4); } return stack; }
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.