This can be used for mod sorting, dependencies between registries, etc.
e.g. https://github.com/MinecraftForge/MinecraftForge/pull/4694#issuecomment-412520302
New features:
Now accepts guava graph
Performance improvement: no longer reverse the graph; changed dfs to bfs
Accepets a comparator for secondary order, e.g. natural order, index by map
Now properly reports all cycles in a graph with Tarjan's strongly connected component algorithm
Adds a test to prove the validity of the sort and cycle detection
Modified build.gradle for test source directory and dependencies
Mod loading changes:
Sort mod file info instead of suppliers (we don't have suppliers instances)
Moves cycle error reporting out of topological sort and into mod sorter
Prevent mod file dependencies between mods that share the same file
Signed-off-by: liach <liach@users.noreply.github.com>
Moved some launchplugin code to the launcher. Moved servermain to
the launcher.
server currently needs cmdline arguments --fml.forgeVersion=24.0.51-1.13-pre --fml.mcVersion=1.13 --fml.mcpVersion=2018.09.12.04.11.00 --fml.forgeGroup=net.minecraftforge.test
stronger classloader separation between the two sides. Forge now
loads as a regular mod.
Still needs a bunch of debugging, but structure looks good and game loads
in forge dev.
Fix duplicate ID for ingredient serializers
Fix KeyBinding compile errors. No GuiKeyBindingList patches yet.
Implement controls GUI and WorldServer patches
* resource package and misc leftover rendering stuff
* Port Item and ItemStack patches
* Extract most item patches to interface
* Refactor Item#setNoRepair to be part of Item.Builder
* Adapt AnimationItemOverrideList to new cap system
* Improve null contract of OptionalCapabilityInstance
* Remove Capability.cast
* Update CapabilityAnimation to new cap system
* Remove OptionalCapabilityInstance#flatMap and add NonNullConsumer
* Add capability patch to Entity, not everything yet
* Fix Entity patch and add missing methods to IForgeEntity
* Fix null contract of CapabilityDispatcher
* Add TileEntity caps
* Adapt FluidUtil to new cap system
* Add world caps
* Add chunk caps
* Clean up cap patches
* Replace all tabs with spaces
* Move builder methods on Item to Item.Builder
Whitepsace fix
* Sided stuff take 2
* Prevent OptionalCapabilityInstance creating additional empty instances
* Cache getCapability result in AnimationTESR
* Fix imports in TileEntity patch
* Pull out cap code to base class, add village caps
Defaults are:
-Dforge.logging.mojang.level=info (note that setting this to debug or trace will enable extra debug behavior which may slow things down or detect issues and crash)
-Dforge.logging.console.level=info
-Dforge.logging.file.level=info
-Dforge.logging.debugFile.level=trace
Usage: /forge gen <position> <count> [dimension] [notifications]
Position is in Block Coords, and can be relative to the player. These will be converted to chunk coords for you.
Count is the number of chunks to load. This is not a radius, actual total number of chunks.
Dimension is optional, you can use this to pregen other worlds.
Notifications is the chunk interval to inform you of the generating progress. This is optional and will be 5% or 100 whichever is higher.
Added new config option to modify vanilla world gen to fix various cascading issues. MC-117810 MC-114332 and more.
This WILL change block placement from vanilla world gen. So this is a opt-in value. Do not report differences in worlds with this flag enabled.
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.
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.
Some things to note:
Netty is screwy so currently can't join single player. @cpw
Crafting has been MAJORY reworked. The current GameRegistry functions are nooped, this is IN THE WORKS.
Just need to move the recipe list to a full class registry, and then re implement the in-code recipe registration.
Also, it IS advised that modders move to JSON, because ideally we'll see a S->C recipe syncing system in 1.13
which would allow servers to have custom recipes.
OreDictionary currently 1/2 works, need to write a better algorithm for replacing ingredients.
Please be patient
Rendering:
A lot of functions got a new float parameter, this is similar to partial ticks, needs more research
Allowing increased control of which enchantments can be put on an item over Vanilla's hard-coded item type checks.
Render enchantment buttons disabled when the item is enchantable but the enchantability requirement is not met on lower levels.
Each mod gets its own version number, mods SHOULD NOT rely on other
mod's fixers, just care about yourself.
Walkers can use IDataFixerData to retrieve their version.
Since the update to Minecraft 1.9.4 chunks were actually never loaded
asynchronously because a sync request was always made from the
PlayerChunkMap shortly after the chunk had been queued.
- PlayerChunkMapEntry now only loads chunks synchronously *after* the
chunk failed to load asynchronously.
- Fixed some minor bugs that caused "Attempted to dequeue chunk" messages
- Simplified ChunkProviderServer patch. loadChunk no longer generates chunks,
so there is no need to handle that.
- Moved loader and provider to ChunkIOProvider so there is no need for
"hashCode abuse"
Major things to note:
Class renames: https://gist.github.com/LexManos/44dd211f90f498ad4015279b103dff86
Tile Entities are now packed in the ChunkData packet.
Forge intends to work around this to better support large moded worlds, but for the time being modders should implement the new function carefully and only send what data they need to!
Minecraft's codebase now has annotations, these are directly from Mojang and should be adheared to!
Added support for package-info.java's containing @Nullable information for all MC code base.
Modders can now modify and reference internal elements of a loot table by name.
Editing can ONLY be done in the event and any external editing will cause a exception to be thrown.
See this gist for more information: https://gist.github.com/LexManos/77c983d67b9ad27010428478b66d50fd
Added detection of mods that rely on Java 8 and a graceful error screen.
The nag screen will be shown once a day. It can be disabled by editing the forge.cfg.
However it is HIGHLY recomended that user update to Java 8.
When combined with @Optional this should address all issues of soft dependancy on mods/apis.
This also addresses the issue of dynamic functionality in TileEntities/Entities.
Current capability providers: TileEntity, Entity, ItemStack
Also added INBTSerializeable, a generic interface for game objects that can be written to/from NBT tags.
Vanilla capabilities will be coming soon, mostly on request and review.
So start requesting capabiliteis on vanilla/Forge features.