Commit Graph

2279 Commits

Author SHA1 Message Date
David Quintana e1b0a8c153 Fix LightUtil.unpack to set the 4th component to 1 when expanding an xyz position into a 4-component vector.
Add TRSRTransformer test mod.
Fix signature of the bindTileEntityRenderer method, to account for covariance.
2019-12-29 17:16:27 +01:00
David Quintana fc189c9aaf More model/rendering fixes:
- Breaking change: Change ClientRegistry.bindTileEntityRenderer to a factory, so mods don't have to manually specify the dispatcher.
- Breaking change: Delete obsolete SimpleModelState (the class was duplicated by mistake, see SimpleModelTransform) and ICustomModelState (part of the old loader API).
- Breaking change: Rename getTextureDependencies to getTextures, for consistency.
- Reinstate the getRenderLayer method, fixed appropriately to return the new RenderType value.
- Fix OBJ loader applying the model transform in the wrong reference frame.
- Fix vanilla bug in TransformationMatrix#func_227986_a_
- Fix QuadTransformer logic.
- Added new method to IModelConfiguration to retrieve the owner IUnbakedModel, needed in order to construct ItemOverrideLists when baking custom models.
- Reintroduce multi-layer model through the new model loader system.
2019-12-29 02:13:58 +01:00
David Quintana e8ce61d4cd New batch of Model/rendering fixes:
- PerspectiveMapWrapper did not pass IModelData through to the wrapped model.
- CompositeModel did not store the returned textures from getTextureDependencies.
- VertexFormat used COLOR instead of UV to detect UV presence.
- QuadTransformer would crash due to index out of bounds.
- Small cleanup of TransformationHelper
2019-12-24 13:12:38 +01:00
David Quintana ac61018806 Fix obj models having all faces in the same mesh, breaking material assignments and visibility in the process.
Reintroduce lost patch from the model loader, which would cause the custom values to be missing from generated models.
2019-12-20 18:14:09 +01:00
David Quintana c3b1f47754 Fix item quads not using the existing vertex color when applying tint colors. 2019-12-20 04:50:40 +01:00
David Quintana 503d277033 Fix bucket model. Some mask textures were not added to the repository, and the bucket override generation was broken.
Fix OBJ loading crash due to a float value being parsed as int.
Fixes 6377
2019-12-20 02:44:27 +01:00
bl4ckscor3 40de19f16e Fix game crashing when modded entities are present (#6364) 2019-12-19 00:56:01 -05:00
ichttt 83ebdcd8f2 Fix warning screen about missing minecraft registry entries (#6363) 2019-12-18 21:02:20 -08:00
ichttt 747cb0f151 Some code cleanup for 1.15 (#6362) 2019-12-18 20:39:41 -08:00
tterrag 49596dcacc Mod list GUI detail pass
- Make padding consistent on all elements
- Properly horizontally center the "Search" text
- Update and resize forge/mcp logos
- Enable linear filtering on logo rendering by default
  - Can be disabled with the "logoBlur" mods.toml property
2019-12-17 20:58:26 -05:00
ichttt 5df687dddc Fix mod list screen (#6367) 2019-12-17 20:03:11 -05:00
David Quintana 599a754b60 Fix items in ground being too small, we were applying perspectives twice.
Restore forge patch and fix a tiny mistake in it.
2019-12-18 00:46:29 +01:00
tterrag faaebe7a07 Remove uvlock hook, fixes broken stair/fence/etc models 2019-12-17 17:37:39 -05:00
tterrag 5987d917b8 Update to 1.15.1 2019-12-17 14:37:34 -05:00
David Quintana 738abbb360 Finish converting the code from javax.vecmath to the vanilla vector classes. Forge is now vecmath-free! 2019-12-17 19:14:52 +01:00
tterrag 1558362583 Remove deprecations 2019-12-17 04:50:13 -05:00
tterrag 5b67354e24 Fix incorrect item lighting 2019-12-16 23:46:45 -05:00
tterrag dec91dec68 Revert fluid change to use Material, fixes server crash 2019-12-16 23:22:13 -05:00
LexManos 1933d05e36 Update to 1.15
Due to the massive rendering changes, certain features, such as emissive item rendering and the forge block rendering/lighting pipeline are currently disabled.

Co-authored-by: David Quintana <gigaherz@gmail.com>
Co-authored-by: tterrag <tterrag1098@gmail.com>
Co-authored-by: Unnoen <theunnoen@gmail.com>
2019-12-17 03:38:12 +01:00
Daniël Goossens 5d0fb2967c Split DrawBlockHighlightEvent into subevents to make usage clearer, addresses #2190 (#6269) 2019-12-10 11:46:01 -08:00
tterrag 5c88451f6f Allow classpath locator to discover jars via FMLModType attribute 2019-12-05 22:56:05 -05:00
cpw cfc53c939e
Tidy up some output and also add libraries from the modfile detection into the transforming classloader.
Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-12-05 22:47:39 -05:00
tterrag 3ba78225c3 Fix swapped yaw/pitch in camera setup event 2019-12-02 19:10:59 -05:00
liach d8e6181058 Restore camera setup render event (#6335) 2019-12-02 14:54:46 -08:00
DaemonUmbra bb4e78da90 Fixed invocation of Vanilla spawn logic (#6334)
Forge's replacement of the Vanilla logic gets inverted, so the Vanilla logic inside that replacement must be inverted to correct for this.
(Fixes #6332)
2019-12-02 14:54:00 -08:00
bl4ckscor3 4dd32d6f72 Add item tag 'beacon_payment' for items that can activate a beacon (#6328) 2019-12-02 14:52:45 -08:00
Paul Becker f9686cf098 New SleepFinishedTimeEvent allowing control of world time when waking up. (#6043) 2019-12-02 14:08:14 -08:00
tterrag c18d26c7d8 Make EntityLootTables reusable for modders 2019-11-25 01:03:24 -05:00
nikita488 241db39cea Fix emissive items not working 2019-11-24 19:08:46 -05:00
cpw 31da9a4878
Fix the hang on startup problem when windows' broken device enumeration
causes a huge glfwInit slowdown. Log a message too when this is detected.

See https://github.com/glfw/glfw/issues/1284, https://stackoverflow.com/questions/10967795/directinput8-enumdevices-sometimes-painfully-slow,
https://discourse.libsdl.org/t/win-10-initing-joystick-causes-45s-hang-in-sdl-dinput-joystickdetect/23293

Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-11-23 15:37:56 -05:00
Richard Freimer 0e65f20f22 Add hooks to make it easier to add custom TNT blocks (#6290) 2019-11-20 19:19:34 -08:00
DaemonUmbra d8d70e8b35 Add tags supports_beacon and supports_conduit and modify Beacon and Conduit to use these tags (#6266) 2019-11-20 19:15:13 -08:00
bl4ckscor3 5d62261082 Fix RawMouseEvent not being cancelable (#6310) 2019-11-12 15:12:25 -08:00
DaemonUmbra f4a85e5f03 Fixed an NPE caused by missing registries. (#6292)
Missing registries in this case being registries renamed without proper remapping or created by mods that were removed.
2019-11-05 11:10:32 -08:00
DaemonUmbra 7f8b30aed3 Made the slash optional in fml confirm/cancel. (#6282) 2019-11-05 11:10:19 -08:00
LexManos b8ea220925 Fix registry snapshots not reading aliases correctly. Closes #6298 2019-11-05 11:10:03 -08:00
cpw 1e1644f6d4
A few tweaks to things. Make the mods command a bit better, make the
IndexedMessageCodec actually log which network channel it got back packets
on. Also, improve the custom directorymodlocator with actual custom names,
finally, allow up to 99 log rollovers, up from 7 default (this means a
repeatedly crashing server is less likely to roll out the log of the first
crash).

Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-11-03 12:33:07 -05:00
tterrag fab4ce894a Fix BlockStateProvider#horizontalBlock emitting rotations >=360 2019-11-01 17:10:06 -04:00
Camilo f2f7ab80f6 Added some more biome types to BiomeDictionary (#6250) 2019-11-01 11:26:08 -07:00
DaemonUmbra c044f3b0c4 Replaced getTypes invocation in ensureHasTypes with a direct reference to types, preventing infinite recursion (#6284)
The direct reference is checked via ternary and reports if the set is empty, this is likely to result in log spam if modders don't assign types to their biomes
2019-11-01 11:24:00 -07:00
tterrag ebd463e92f Fix lang generator escaping newlines, add lang generator test 2019-10-30 15:25:03 -04:00
tterrag 69ba974960 Escape control chars and unicode when writing out lang datagen 2019-10-30 15:01:25 -04:00
tterrag dbee8a24d8 Allow LanguageProvider helpers to accept suppliers of subtypes 2019-10-28 21:23:01 -04:00
tterrag 2373dab982 Expose private helper methods in BlockLootTables to subclasses 2019-10-28 19:28:16 -04:00
cpw 862289cf56
Handle logging during shutdown better on the server, by not
closing the logfile before the server itself has shutdown.

Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-10-26 16:55:15 -04:00
cpw e3068d7db2
Fix NPE in modlauncher when there is no mods dir yet.
Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-10-25 07:27:55 -04:00
DaemonUmbra 29ad7a39de Fixed NPEs caused by uninitialized lists in ModDirTransformerDiscoverer (#6277) 2019-10-24 23:06:27 -07:00
LexManos 3484200f80 Make Loot Table data generators more reusable for modders. 2019-10-24 22:09:08 -07:00
tterrag acaa470dea
Add Blockstate and Model data providers (#6241) 2019-10-24 22:33:24 -04:00
cpw 3bf6c17bb8
Allow pack locators to load from the mods folder.
Regular mods are now automatically de-duped based on the version number -
the highest version file of a "root mod id" is now selected automatically.

Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-10-23 21:30:17 -04:00
AfterRebelion ca8a418364 Exclude Cobblestone slabs and wall recipes (#6230) 2019-10-22 15:31:35 -07:00
Wyn Price 6422310453 Fixed forge rendering pipeline and shape based light occulsion. (#6178) 2019-10-22 15:29:27 -07:00
cpw c8967fa176
Expose the registrationchange event to simple channel (not that anyone should care, but who knows?)
Also, Context.getNetworkManager should have been public. Derp.

Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-10-18 09:32:44 -04:00
cpw dc664ba597
Add in an event to expose the standard MC channel stuff to network
event channels that care about such things. Mods using simplechannel
don't need to care.

Also, put a sync wrapper around crashreportextender, so it doesn't
die sometimes randomly during startup.

Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-10-17 20:28:39 -04:00
David Quintana ec3e8c2039 Fix vanilla models with parents not loading properly from forge blockstates. 2019-10-16 23:11:23 +02:00
ichttt 6c8342b74e Fixed loading error/warning screen not showing (#6218) 2019-10-15 14:59:41 -07:00
JoJoModding 8adc546d92 Allow mods actually to have their own usable config gui (#6208) 2019-10-15 14:56:27 -07:00
iChun 25a9e477cb Fix error logging in FMLUserdevLaunchProvider.setup (#6206) 2019-10-15 14:55:45 -07:00
ichttt c98abaaa42 Fix some config checks still using the old fields (#6193) 2019-10-15 14:54:47 -07:00
Justin a328364999 Fix mod info panel rendering incorrectly on some systems with HiDPI displays (pesky macs) (#6170) 2019-10-15 14:31:41 -07:00
FireController1847 94cbf72e39 Re-add PlayerGiveXpEvent & PlayerChangeLevelEvent (#6165) 2019-10-14 10:37:44 -07:00
Wyn Price 5978670897 Fixed IModelData not being cleared when tile entity is removed (#6115) 2019-10-10 23:07:52 -04:00
tterrag 940bbc4e91 Better sanity checks in ModelDataManager 2019-10-10 16:02:36 -04:00
Vincent Lee 7070bd0340 Make customClientFactory optional again (#6191) 2019-10-10 11:23:27 -07:00
David Quintana 5e9380ab85
Fix forge blockstates and custom model loading (#6154)
* Reimplement forge blockstates variant through the use of a pseudo-model that handles the model loading, retexturing, custom data, etc. on behalf of the blockstates loader. This model gets injected into the model registry with an autogenerated unique name, to not collide with other model locations.
* Fix model loaders not being properly initialized by calling the reload method from the loader register function. In 1.12, registering a reload listener caused the listener to be called right away from the register method. This is not true anymore.
2019-10-08 00:18:29 +02:00
cpw 9c759294c6
Add a super early GUI for showing pre-game launch messages from FML. NOTE: this cannot show on MAC because MAC can't handle
off-thread GUIs in any way shape or form, and we need the main thread to do real work.

Fix forge fading in wrongly.

Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-10-05 17:03:02 -04:00
David Quintana b294f4d894
New round of fluid system fixes: (#6175)
- Fix race condition lazy-initializing flowing fluid block data.
- Fix typo in ItemTextureQuadConverter that prevents certain animated textures from being used in the fluid bucket.
- Fix calls to onContentsChanged in FluidTank.
- Fix FluidUtil.tryEmptyContainer logic when simulating.
- Fix EmptyFluidHandler.fill returning the wrong number.
2019-10-05 19:49:26 +02:00
tterrag ca980a56bc Combine all hidden mod resource packs into a single sortable pack
Fix mod datapacks sorting under vanilla
2019-10-04 18:36:33 -04:00
cpw 8482293b40
Split server and client side pack locators apart and move them to their
respective behavioural components. This should facilitate fixing the
server pack data pack ordering, as well as other new features of mod
resource packs.

Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-10-04 15:24:15 -04:00
LexManos dc5a06aab4 Fix dimension types being incorrect when connecting to a non-Forge server. Closes #6203 2019-10-04 10:36:50 -07:00
cpw 35bd69808c
Fix the stupid derp that broke singleplayer dims. Don't send the dim packet
to the local client - it is not needed because obviously not. Seems to have
fixed the problem. Probably infinity new bugs by this.

Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-10-04 07:27:11 -04:00
tterrag 4f12261080 Move OnlyIn patches on DyeColor to SAS file
Also fix broken cobblestone stairs recipe
2019-10-04 02:26:54 -04:00
cpw 48735c3946
Properly propagate the DimensionType information from server to client
at client connection time. This means the client now knows about the
dimensiontype properly and can access the ModDimension information on
the client.

Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-10-02 21:54:02 -04:00
Ruben Taelman c985225d0c Fix FluidTank with empty contents throwing error if drained (#6196) 2019-10-01 19:57:05 -07:00
tterrag 78cdb705d4 Allow structure processors to process entities 2019-09-28 18:18:24 -04:00
cpw 136452840d
Remove forced ANSI terminal - it breaks the Eclipse terminal output.
As a result, we can now support coloured log output again, by default.

Regen run configs to get the change (you should do this every update, you
know :D)

Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-09-28 16:05:50 -04:00
tterrag b3631b707c Make patched-in StairsBlock constructor public
Also fix supplier generic being too narrow in DeferredRegister#register
2019-09-27 17:56:30 -04:00
cpw f4bab8b8c1
Integrate modlauncher changes for mixin.
Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-09-27 17:42:24 -04:00
tterrag 2392a4c184 Fix new flower pot ctor not being usable with deferred register 2019-09-25 18:01:43 -04:00
tterrag 476b7056fb Usability improvements to RegistryObject/DeferredRegister 2019-09-25 18:01:39 -04:00
tterrag d510978446 Add constructor to StairsBlock that accepts a state supplier 2019-09-24 21:05:23 -04:00
tterrag 01a862db30 Fix sea level not being available on client, move hook to Dimension 2019-09-23 13:08:26 -04:00
tterrag dfbd61436b Add template arg to StructureProcessor#process 2019-09-22 23:35:12 -04:00
LexManos 48cf910626 Bump binpatcher and jarsplitter versions to address Java differences on older JDKs. 2019-09-22 17:30:29 -07:00
tterrag 571ecafdbc Fix type bound on GameRegistry.findRegistry being too narrow 2019-09-21 16:19:23 -04:00
tterrag dee844e232 Add IExtensibleEnum#init, extend FillerBlockType/PlacementBehaviour 2019-09-21 15:57:32 -04:00
cpw 07bcff5067
Tag the deprecation of DeferredWorkQueue. I think this is causing confusion
as to scope. Its functionality will be tied to the events in future -
so mods can request the deferred work through methods on the Mod Lifecycle
events directly. The API will be coming soon.

Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-09-17 21:41:08 -04:00
cpw 7fa3594c04
Fixed the problem where an error would cause the main thread to continue
even though there were still parallel threads running. Also, handle exceptions
in the AutomaticEventSubscriber rather than leaking them to the Parallel processor.

Actually closes #6148
Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-09-17 21:41:08 -04:00
tterrag 6fda1e968d Make FlowerPotBlock extensible and reusable for mods
- Change static lookup map to an instance variable
- Add an instance variable for the "empty pot" for the current block
- Keep one instance of the lookup map between the empty pot and all its full versions
- Convert everything to use delegates
2019-09-17 19:57:58 -04:00
Brennan Ward af8074cc39 Post tag event directly from reloader thread (#6164) 2019-09-17 14:39:36 -07:00
cpw 71a4828809
Some tweaks around the code base. A functional consumer for networking - return a bool from your consumer function, rather than setPacketHandled.
Tweak the server modloading behaviour to try and be a bit clearer that a mod errored.

Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-09-16 20:14:25 -04:00
Brennan Ward 79ce18ac3e Update furnace fuels to not recreate it's list every query, and update when tags are reloaded. Add Tag update events. (#6140) 2019-09-16 14:04:32 -07:00
Nightenom bb83e11a7c Maintain default behavior for Item#canPlayerBreakBlockWhileHolding() (#6128) 2019-09-16 13:36:43 -07:00
MrCrayfish f4215d121c Reimplemented "MouseEvent" as RawMouseEvent for 1.14.X (#6144) 2019-09-16 13:03:10 -07:00
LexManos 3cc76a3f60 Fix Entity.getPersistentData function name. Closes #6131
Bump spec version for first 1.14.4 RB.
2019-09-12 09:12:30 -07:00
David Quintana 58335d7bc0
Minor fixes to the fluids (#6150)
* Fixed vanilla rendering of fluids to take into account the alpha bits of the color, and fix usages accordingly.
* Fixed missing texture derp.
2019-09-12 17:33:19 +02:00
David Quintana b0c9d7cce9
Some (sadly breaking) improvements to the Fluid API (#6110)
* Some (sadly breaking) improvements to the API, after feedback and concerns provided by users:
  - Moved calculation of the translation key to the FluidAttributes constructor, so that builders can be shared between still & flowing sub-fluids.
  - Moved biome-based coloring to a dedicated FluidAttributes.Water variant, which is not used by default.
  - Added logic to automatically gather fluid textures into the list of textures to bake.
  - Patched BucketItem and FlowingFluidBlock to avoid eager access to the fluid objects.
  - Added a ForgeFlowingFluid class, as a more user-friendly way to construct a new FlowingFluid.
2019-09-11 16:00:32 +02:00
LexManos 281ef5a152 Add new DeferredRegistry helper, and change RegistryObject to update when overrides are registered. 2019-09-10 16:02:07 -07:00
tterrag 3dce85c49f Properly fix missing attribute issue, add vanilla bug ID 2019-09-08 02:23:16 -04:00
tterrag f777aba227 Remove StructureArgument to work around vanilla issue, clean up custom arguments 2019-09-08 02:01:17 -04:00