Jump to content

[1.7.2] FMLControlledNamespacedRegistry help


ZetaHunter

Recommended Posts

So I want to have my own instance of NamespacedRegistry.

But when I tried to do so, it didn't work because constructor like this

new FMLControlledNamespacedRegistry<Mode>("Mode", MAX_MODE_ID, MIN_MODE_ID, Mode.class,'\u0003');

is not visible for some reason, I suppose I will have to create my own copy of FMLControlledNamespacedRegistry?

Since the whole thing is closely connected to MC Block and Item management, and no one seems to have thought of making it usable for other stuff. I might be wrong though, feel free to correct me.

 

Also the Mode class is just a small class with couple string get functions for now. (empty otherwise)

I want to make it possible to easily register modes for other modders in future.

Also I am not quite sure what's up with \u0003 too, but I just increment it from \u0002 that ItemRegistry had.

 

Any help on this? I know this is quite unexplored direction but still...

~I was here~

Link to comment
Share on other sites

I have an item which I intend to make multi purpose, I have a gui and the gui will have a list of possible modes,

I want to make it possible for other mods to add their own modes to the modes list.

I suppose just a

Map<int, Object> modes;

Map<String, int> alliases;

and some basic get set add remove function set would be fine aswell though.

~I was here~

Link to comment
Share on other sites

The constructor is public but...isn't the idmap already "full" with blocks and items ?

I would use RegistryNamespaced rather than stepping on FML toes.

 

edit:

It doesn't look like you'd want to save it per world with internal numerical ids, so...using FML registry stuff is unnecessary.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

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