Jump to content

Item id/serial??


xenoglyph

Recommended Posts

Is there a publicly accessible method to get the ID or serial number of an object? Basically looking for a simple function I can use to tell if 2 objects are the same.

 

I have a C# background, but no Java...and not entirely sure how the Lua interfaces with Java.  Object equality can be dicey in C# depending on what's overridden, etc.

 

is object == object going to cut it in mods, or do I need some kind of hash or serial?

Edited by xenoglyph
Link to comment
Share on other sites

6 hours ago, xenoglyph said:

that will work for 2 different instances of the same item?

No it will detect the same sadly. The only way to make it differentiate if you add a modData value to that specific item. So if you are looking for that exact item then check the get modData tag you placed and if return true than its the exact same item 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...