Jump to content

InteractionResult use failing


Recommended Posts


I'm creating a mod (my first mod) to create blocks that are alternative versions of blocks that already exist but with the property waterlogged, and it started with a grindstone. in terms of block placement I got exactly what I wanted, however I couldn't make the grindstone menu work, I feel that something is missing (and also that I'm doing some unnecessary shit), but I couldn't think of what detail did I miss that is causing this problem.



I tried to record the error but it didn't record, basically the menu opens for a frame and closes automatically.


I KNOW this forum is not for newbies, but without help I simply won't be able to improve, and I have nowhere else to turn since there is virtually NO support in my native language and I have to fall back on English, which I understand well but makes it more difficult to access information.





Link to comment
Share on other sites

I told you in your previous question that the Grindstone block is not designed to be extended.

I also told you to learn how container menus work before trying more complicated stuff.



The answer to your question is an FAQ when people try to reuse vanilla code.

Look at GrindstoneMenu.stillValid(). Which will close the screen if the block at the specified location is not the expected one.

Note the hardcoded use of Blocks.GRINDSTONE. It's not a class check. It's an exact object instance check.


Here's a way you can hack around that problem that may or may not work in this case:



I don't know why you would want do this anyway. You are just reskinning vanilla.

For a real mod it adds nothing to the game. And by just reusing vanilla code you are not learning anything about how to actually write mods.




If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one.

If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install

Large files should be posted to a file sharing site like https://gist.github.com  You should also read the support forum sticky post.

Link to comment
Share on other sites

first thanks, I found a server that helped me to find this problem and I'm already working on it.

secondly i just want to make this mod simply because a friend of mine asked me to, i don't want to make something too complex or grandiose, i really just want to have some underwater functionality for our modpack, it's not something i intend to take forward, beyond that I'm just finding it cool to be learning this, it's not something I intend to get any recognition or feedback on, it's something just for me that because it's so SIMPLE no other person much more qualified than I tried to do.

Link to comment
Share on other sites

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.

Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...

Important Information

By using this site, you agree to our Terms of Use.