Posted September 18, 20205 yr Hello again, i would like to know from you guys if it is easy and possible to make a portable enchantment table? Thanks for every reply, zOnlyKroks
September 18, 20205 yr You mean opening the enchanting table GUI when right clicking with a special item for example? Its possible, and you would do it basically the same way you already did for the portable crafting table 😉 Check out the port of the BetterEnd fabric mod (WIP): https://www.curseforge.com/minecraft/mc-mods/betterend-forge-port
September 18, 20205 yr Author Well tired a few things, but it isnt working. You can acces my code under https://github.com/zOnlyKroks/1.15.2_Items_on_a_Stick/blob/master/src/main/java/com/zOnlyKroks/ItemsOnStick/items/enchantmenttableonastick/EnchantmenttableOnAStickItem.java
September 18, 20205 yr When i said that you can do it the same way you did for the crafting table on stick, i meant, the exact same way. You see that for the crafting table you created a container class which extends WorkbenchContainer and overrides canInteractWith by making it always return true. To explain what this override actually does, you need to consider that vanilla containers, inside the canInteractWith method do a check to see if the player is near enough the block to open its container (chests, crafting table etc..)...so if that method always return true that means you are basically bypassing the proximity checks...and that what lets you open those container when you click with your item. So you need to do the same for your EnchantmenttableOnAStickItem Edited September 18, 20205 yr by Beethoven92 Check out the port of the BetterEnd fabric mod (WIP): https://www.curseforge.com/minecraft/mc-mods/betterend-forge-port
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.