Jump to content

Simulate parameter in certain methods.


vandench

Recommended Posts

I have recently seen some methods which have a boolean parameter called simulate, specifically in some code for minecraftforge by RWTema as well as code in the RF API. What is the point of this parameter, if I don't want the code to actually transfer items/energy/etc why would I call the function. Is there something I am missing about the parameter that could be useful or is it sort an extra feature that most people won't ever use?

Link to comment
Share on other sites

I can sort of see how that is useful, but there are already functions to get the amount of energy stored which don't have a simulate parameter. Is it likely that RWTema implemented it in his minecraftforge patch because he uses the RF API for his mod and is use to the concept of simulating transfer of objects?

Link to comment
Share on other sites

Possibly. It is often used to determine what would happen without actually executing that action. e.g. determine how much energy could be extracted without actually extracting it, or determining how much fluid can be inserted into a container without actually inserting it.

Don't make mods if you don't know Java.

Check out my website: http://shadowfacts.net

Developer of many mods

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.

Guest
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.

Announcements



×
×
  • Create New...

Important Information

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