Commit Graph

11 Commits

Author SHA1 Message Date
Kina 81584d4215 Correct the default resource location of potion registry (#4117) 2017-07-02 13:13:46 -05:00
mezz 8581225da8 Use java 8 collection functions 2017-06-28 00:14:10 -07:00
LexManos c565984822 Allow the recipe registry to be modified. 2017-06-27 15:17:26 -07:00
LexManos 3ae30478db More work on registry override ability. Closes #4079 2017-06-25 20:45:48 -07:00
LexManos b542179242 Make Dummy block an Air block. 2017-06-24 15:06:28 -07:00
mezz 27321efb1f Clean up logging 2017-06-24 01:46:05 -07:00
LexManos dd42f84a47 Loosen up registry locks until data freeze. 2017-06-23 17:52:59 -07: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