Commit Graph

18 Commits

Author SHA1 Message Date
David Quintana 517bbc8b5b Update copyright year to 2020. 2020-07-02 19:49:11 +02:00
LexManos fd9bf64d53
Add custom registry type support to DeferredRegister. (#6742)
It's still a hard dependency because it requires a class reference.
But there is not a sane way to test registry types without a class reference.
2020-06-12 15:28:43 -07:00
cpw 5048739b7f
Turned minecraft into a proper Mod, with a "dummy" language provider.
Also fixed the "translations" not being available early if an exception occurs
by force loading the forge and MC ones. Closes #5984

Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-08-04 20:16:01 -04:00
LexManos 731e1920d2 Fix @ObjectHolderRegistry not properly detecting vanilla class level references. Closes #5958 2019-07-25 17:59:08 -07:00
cpw f83500db11
Its 2019. Update licence headers to match.
Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-02-10 17:57:03 -05:00
cpw 0a11ffb827
More logging tweaks, including some aimed at userdev.
`forge.logging.markers=<LIST OF MARKERS>` will enable markers.

Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-01-27 00:06:57 -05:00
cpw 3c55b46ca0
Big cleanup of logging. Might do some tweaks of the userdev logging, but this should be good for vanilla..
Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-01-26 22:18:28 -05:00
LexManos 3b029ba031 Re-introduce patch for injecting registry mappings during world loading.
And re-introduce registry freezing to ONLY the Register events.
Filter ObjectHolders by registry type and fire between every Register event.
2019-01-16 12:28:13 -08:00
cpw 99452a8b45 Update a bunch of libs, rename some of the mod events to more
meaningful names.
2019-01-14 00:39:00 -05:00
LexManos 36d2e67b07 Reimplement @ObjectHolder scanning, and expose system for others to add handlers.
Fix forgedev and userdev run configs.
Fix issue in log functions assuming String arguments.
2019-01-09 20:57:01 -08:00
tterrag 3f743887e7 More compile cleanups. (#5139) 2018-09-14 09:30:56 -07:00
LexManos 12869710de Remove old paulscode libraries.
Re-work EnumHelper and ObjectHolder systems to bypass JITer of final fields.
Other cleanups.
2018-09-06 04:39:01 -07:00
cpw d0ab0e166c Well, it works, for a game, now. 2018-09-05 12:30:02 -07:00
LexManos 0cf5ef221c Run licenseFormat to apply license header to all files. 2018-07-01 14:17:31 -07:00
Ben Staddon 0fde64ac38 Clean up uses of deprecated library functions (#4130)
Avoid catching and rethrowing runtime exceptions
Append error messages to exceptions instead of the log
2017-07-12 21:50:28 -07:00
LexManos c3e5b4bb2e Add @ObjectHolder scanning to vanilla MobEffects, Biomes, Enchantments, SoundEvents, and PotionTypes constants. Closes #4104 2017-06-28 13:17:59 -07: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
Renamed from src/main/java/net/minecraftforge/fml/common/registry/ObjectHolderRegistry.java (Browse further)