Closes#7293 (to reproduce issue easily, modify Util.func_240979_a_ and change the values in the MathHelper.clamp call). I've verified that 3 and below for "max" cause the problem. (I didn't test a whole range of values, just sufficient to reproduce problem and verify fix). Note that setting it to zero (and using the "direct executor" that's inaccessible in normal operation) works as well with this fix.
Signed-off-by: cpw <[email protected]>
For consistency, this meant making a few changes:
- Renamed the existing lazy mapping method to lazyMap, to indicate that it doesn't run the mapping immediately.
- Added a new implementation of map(), which returns Optional<T>, and resolves the value in the process.
- Changed filter() to return Optional, since there's no way to filter lazily.
- Added a new method resolve(), which helps convert the custom LazyOptional class into a standard Optional, for use
with library methods that expect Optional<T>.
* Update License headers.
Freeze the ModelLoaderRegistry right after this event happens, just before model loading actually begins.
This means ModelRegistryEvent is now the correct place to register loaders, as it was intended.
This is a slight breaking change, but any mod that used FMLClientSetupEvent before will need to be updated regardless due to the existing race condition.
This prevents other mods from throwing errors and being blamed for initial cause.
This is a temporary hack until cpw re-writes the mod event dispatcher.
Introduced IModBusEvent as a marker interface for events on the ModBus. Expect exceptions if you use
the modbus for events not listened there.
Signed-off-by: cpw <[email protected]>
Fix patched in method using srg name. Closes#6965
Fix capabilities not being collected for ClientWorld. Closes#6966
Fix TagEmptyCondition using client side copy of tags instead of server. Closes#6949
Fix ExtendedButton using narrator text. Closes#6958, Closes#6959
Fix misaligned patch in RepairContainer. Closes#6950, Closes#6953
Fix LivingJumpEvent not being fired for players jumping horses. Closes#6929
Remove extra getToughness method in ArmorItem. Closes#6970
Remove GetCollisionBoxesEvent. Closes#6921
Code for customizing the server instance should be moved to the ServerAboutToStartEvent or similar, where the server instance
is available.
This reorganization means that mods will load fully before the server is even constructed, or the server properties loaded. We also move the EULA right to the front so we don't have to wait for bootstrap.
This should fix the problems with mods which customize world data and other things.
Signed-off-by: cpw <[email protected]>
Useful For Forge's test mods mainly.
Standardized data gen cache file's folder separators.
Added ItemModelProvider to BlockStateProvider for cleaner datagen code.
Added .gitattributes to fix datagen json's line endings correct on windows.
In general, use sided lambdas safely by embedding them in a separately loaded class. There's a whole twitch stream
dedicated to investigating this problem. See link in DistExecutor if you're interested.
Signed-off-by: cpw <[email protected]>