Was mache ich falsch?
Ich bin gerade dabei eine Minecraft Mod zu machen die einen weiteren Crafting Table hinzufügt und wenn man ihn rechtsclicked soll er das Crafting Table GUI von Minecraft öffnen. Tut es auch aber es schließt sich auch sofort wieder.
Oberhalb ist der Prozedur Code
Oberhalb ist der Code vom Block
Oberhalb ist vom Block die Imports
I noticed now that in your use method of your block class (AcaciaCraftingBenchBlock) you do not return InteractionResult.CONSUME when the GUI is successfully opened. So your code can’t know if everything was successful.
Look here ->
Block Interaction – Forge Community Wiki (gemwire.uk)
try it like that.
I would generally work with try-catch blocks in such a project. You don’t have a single bug treatment in your code if something goes wrong. You can definitely not use your code. I have also noticed many other things that should have been done in principle, but I am not going to go on with it. First change your public InteractionResult use block and see if your problem solves
Welcome to EchoTech
Don’t have much experience yet. First make my own mod. I’ll try this
I still have the same problem.
How would you write the code?