Commit Graph

15 Commits

Author SHA1 Message Date
cpw 9e9cb021ab Clean up broken aliases caused by registry bug #4894. (#4909) 2018-04-30 21:05:37 -07:00
LexManos f2fa21e6e2 Move registry snapshot read/write code to Snapshot class. Cleaner code. 2018-04-29 17:58:02 -07:00
mezz bc3bbe3d84 Avoid copying Forge Registry keys, values, and entries (#4545) 2018-01-18 12:46:05 -08:00
LexManos 45dfce0013 Fix for dummied server side registry entries while client has read entries. 2017-08-22 02:08:34 -07:00
LexManos 28e341002f Add support for server side only recipes, as well as detection of vanilla client recipe book filter to prevent errors. 2017-08-15 05:10:07 -07:00
LexManos fdfaa5036d Fix override duplication caused by bad comparison. 2017-07-05 14:41:24 -07:00
mezz 8581225da8 Use java 8 collection functions 2017-06-28 00:14:10 -07:00
LexManos d0b24313d3 Fix MissingMapping REMAP action. Closes #4069 2017-06-27 16:56:42 -07:00
LexManos 3ae30478db More work on registry override ability. Closes #4079 2017-06-25 20:45:48 -07:00
mezz 27321efb1f Clean up logging 2017-06-24 01:46:05 -07:00
tterrag b71ab7e444 Make ForgeRegistry iterator sorted. Closes #4058 (#4059) 2017-06-23 23:52:27 -05:00
LexManos f4afb6f56c Implement override tracking and syncing.
Overrides MUST be registered within a tracked event so we know what mod it came from.
This will allow servers/saves to select which mod 'wins' and becomes to active entry.
This should also mean that when connecting to a vanilla server things will revert.
2017-06-23 16:59:57 -05:00
LexManos e805b12df8 Fixup some registry tests, dummies are now persisted across syncing. 2017-06-23 16:59:57 -05:00
LexManos dee84dc1e4 More work, game loads and runs now.
Moved Registry events to directly AFTER PreInit instead of before.
This allows modders to register handlers for it without @EventBusSubscriber.
It also allows you to register custom things needed before the construction of blocks or items such as Fluids.
TODO: Move Fluids to a real registry.
@ObjectHolder can now be used on private fields.
Reworked FMLModIdMappingEvent to include data for all registries.
Tile Entities are now registrable.
2017-06-23 16:59:57 -05:00
LexManos a26d89c876 First pass of registry rewrite.
Tests do not run yet.
Things of note:
Removed the idea of substitutions, just register multiple items with the same name they will override each other like a normal map.
Decoupled Forge registries from vanilla classes. They now use bouncer classes. MODDERS SHOULD NEVER USE THESE
Introduced more stringent registry locking. As it sits things are only allowed to be registered during the RegistryEvent.Registry phases!
This is to force modders to split up their registrations, and pave the way for calling these functions multiple times during a single MC lifecycle.
ObjectHolder, Missing Mappings, etc... *should* now work for all registry types, nothing should be special cased to Blocks/Items anymore.
Added optional generic dummy factory to registries, to allow registry creators the ability to dummy more then just Blocks.
Re-worked the ItemStack transformer and applied it to ItemBlock and ItemBlockSpecial. Allowing us to cleanup reflective hacks in Block callbacks.
Registry onAdd callback is now only fired on the ACTIVE registry, fixing any issues of temp registries overriding active objects.
2017-06-23 16:59:57 -05:00