scarpet icon indicating copy to clipboard operation
scarpet copied to clipboard

Add UUIDs.scl

Open BisUmTo opened this issue 4 years ago • 11 comments
trafficstars

Functions:

  • generate_uuid()
  • generate_uuid_string()
  • uuid_to_string(uuid)
  • string_to_uuid(string)

Included utility functions:

  • hex_to_number(string)

BisUmTo avatar Sep 04 '21 13:09 BisUmTo

Should it go into fundamentals ?

BisUmTo avatar Sep 04 '21 13:09 BisUmTo

yo bisumto, numbers in scarpet are stored in longs, so you can go with full 64 bits

Ghoulboy78 avatar Sep 04 '21 13:09 Ghoulboy78

Should it go into fundamentals ?

IMO it should, I think that should be our 'library' folder (i.e the folder for libraries)

Ghoulboy78 avatar Sep 04 '21 14:09 Ghoulboy78

ok, the bitwise operations can be removed once gnembon/fabric-carpet#1094 is merged.

Ghoulboy78 avatar Sep 18 '21 11:09 Ghoulboy78

Adding label cos its technically waiting on gnembon/fabric-carpet#1094

Ghoulboy78 avatar Oct 10 '21 09:10 Ghoulboy78

I think the label should be removed now that gnembon/fabric-carpet#1094 has been merged. ~~This just needs to be moved to fundamentals then?~~

rv3r avatar Nov 18 '21 03:11 rv3r

uuid Looks like hex precision isn't working and is instead reporting the entire number? Might just be on my end. Using carpet 1.4.51

rv3r avatar Nov 18 '21 04:11 rv3r

I think I found the issue: I'm assuming that the number is an integer while making bitwise operations. It is a double/long instead...

BisUmTo avatar Dec 17 '21 00:12 BisUmTo

Does it work? I'm not sure 😅 It didn't work last time I tested it (when I added the mhh label)

BisUmTo avatar Dec 24 '21 02:12 BisUmTo

I mean its working pretty well for me in carpet 1.4.56.

image Version identifier is correct, so is variety. Edit: Also tested generating string uuid, converting to int and back to string. All working over here chief.

Parietic avatar Dec 24 '21 14:12 Parietic

I'm surprised 😅

BisUmTo avatar Dec 24 '21 19:12 BisUmTo