Commit Graph

638 Commits

Author SHA1 Message Date
LexManos bcdd04d549 Fix incorrect argument passed in RenderPipeline potentially causing crash. #6677 2020-05-15 10:53:35 -07:00
Edwin Mindcraft 7fa42ca064
Use IProperty#getName when generating blockstate jsons (#6582)
Close #6520
2020-05-15 13:28:10 -04:00
David Quintana c23ea1e733 Model system fixes:
- Add "origin" key to determine what origin to use. This will default to the existing (broken) behaviour to avoid breaking changes.
- Fix interaction of transforms with variant transforms (transformation ordering).
- Fix OBJ loader ignoring "diffuseLighting" attribute from the json.
  This attribute will continue not being used if "ambientToFullbright" is on (default) to avoid breaking changes.
2020-05-15 19:25:26 +02:00
David Quintana 6551ccc247 Avoid discarding the bottom 4 bits of the lightmap coords. It turns out vanilla relies on those bits. Fixes some blocks being darker than they should be in certain circumstances. 2020-05-04 01:13:43 +02:00
LexManos 5a552b9f8d Fixed dev time compilation using J9+ producing incorrect bytecode. 2020-04-14 23:54:32 -07:00
tterrag c359a38d9f Improve performance of VertexBufferConsumer by inlining element locs 2020-04-07 21:44:29 -04:00
tterrag d84a88d78d Revive forge lighting pipeline, disabled by default for now
Remove a lot of light value convolution by using 0..1 for nearly everything
Fix a lot of TODOs that are needed for the lighting pipeline to function
Potential fix for #6425
2020-04-07 21:44:15 -04:00
tterrag db3d202c4e Deprecate ModelBuilder#gui3d, add ModelBuilder#guiLight 2020-03-30 00:15:08 -04:00
naqaden 2f5172f907
Add renderer to RenderNameplateEvent (#6562) 2020-03-27 16:22:01 -07:00
cpw 3e48066021
Add a progress message for atlas textures. Fills a big time gap on bigger packs.
Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2020-03-20 17:34:46 -04:00
Nightenom 202ae50820
Add projection matrix to RenderWorldLastEvent (#6536) 2020-03-11 00:00:21 -07:00
DaemonUmbra 2ce4f5ece5
Updated ForgeDev MCP Mapping Version (#6532) 2020-02-25 19:45:14 -08:00
David Quintana a901d80dd5 Implement fluid overlay texture rendering for custom fluids. 2020-02-02 23:02:56 +01:00
DaemonUmbra d86f58a0df
Fixed Attacks/Punches not Registering (#6481)
Replaced incorrect magic number with constant
2020-01-29 22:12:04 -08:00
Vincent Lee 0ad574257e
Clean up a bunch of render events (#6444)
* Delete RenderHandEvent as RenderSpecificHandEvent can do everything it does and more. Rename RenderSpecificHandEvent to RenderHandEvent as it's now the only hand rendering event.
* Pass MatrixStack and IRenderTypeBuffer into the event whenever they are available. If they're available, that means we're in a batching environment and the modder should not be using the tessellator or other buffers on their own, or they risk "Already building" crashes.
2020-01-30 00:46:22 +01:00
David Quintana 509a28efd3 Hook "gui_light" value from the model into the IBakedModel implementations.
Apply some of the suggestions from the 1.14 models PR.
2020-01-23 22:54:54 +01:00
LexManos c4e000dbe7 1.15.2 Initial Update 2020-01-22 13:44:03 -08:00
ichttt 0bcc2e3fbd Cleanup fml packages removing old deprecated classes related to GUIs/Configs and fix HoverChecker (#6437)
Fixed ModListWidget name to avoid confusion and collision.
Delete CheckBox, as vanilla has it's own CheckBox now which looks much better
Rename ModConfigEvent.ConfigReloading to ModConfigEvent.Reloading
2020-01-22 14:09:58 -07:00
Scotteh 345387645e [1.15.x] Added entity nameplate rendering event hook (#6416) 2020-01-22 12:22:04 -07:00
tterrag 380366e25f Remove emissive items hook, add small utility for bakedquad lighting 2020-01-20 22:44:26 -05:00
David Quintana 1936eb1f36 Fix breaking overlay weirdness. applyBakedNormals was not transforming the baked normals when applying them. Fixes #6432 2020-01-16 03:29:46 +01:00
Daniël Goossens 088fc6b67f [1.15] Add new InputEvent.ClickInputEvent, addresses #5802 (#6047) 2020-01-15 16:30:01 -08:00
David Quintana 983a47a7d6 Fix dark spots in fullbright quad rendering.
Fix multi-layer model not declaring dependency on the particle texture.
Fix mistake in 2c054fca which I didn't intend to push when I did.
2020-01-13 23:20:46 +01:00
David Quintana c1840abb0a Fix multi-layer model loader to actually work in a sane way. No more "base" model involved, and now transforms and overrides work as expected. 2020-01-13 19:38:52 +01:00
David Quintana 2c054fca76 Attempt to fix fullbright lighting.
Fix lightmap value calculation.
2020-01-13 13:19:36 +01:00
David Quintana c4c760bfb3 Fix QuadTransformer normal processing. 2020-01-07 23:52:51 +01:00
Choonster TheMage dd0260c476 Fix validation in RotationBuilder#angle (fixes #6323) (#6408) 2020-01-07 14:21:12 -08:00
Choonster TheMage 6e8b976089 [1.15.x] Remove unused parameter from ElementBuilder#rotation (fixes #6321) (#6407) 2020-01-05 14:29:45 -05:00
tterrag bc878ddf19 Refactor BlockStateProvider to encapsulate a BlockModelProvider
Make most protected methods of data generators public
2020-01-05 14:27:20 -05:00
tterrag 3096608d4a Fix crash when building BakedQuadBuilder
Add javadocs and move sprite to constructor where possible
2020-01-05 13:36:06 -05:00
tterrag 7c99b756f9 Fix incorrect check for missing texture in DynamicBucketModel 2020-01-04 23:50:17 -05:00
tterrag 90035ab084 Remove custom vertex format from BakedQuad 2020-01-04 23:36:56 -05:00
David Quintana b6c12f5fff A few more binary-breaking changes, before it's too late:
- Move CompositeModel out of its package.
- Move a few inner classes from the OBJ loader.
- Rename the bucket model and fluid model classes to match the naming convention.
- Remove BiomeEvent.* and WorldTypeEvent.InitBiomeGens as they are not currently implemented and they haven't been in the previous version either.
2020-01-04 17:18:28 +01:00
David Quintana ca031ca33f Fix CompositeModel not respecting "display" transforms.
Remove leftovers from discarded feature.
2020-01-02 06:21:43 +01:00
David Quintana ecb56054bc Allow model jsons to override the material library used by OBJ models.
Fix model loader test mod resources.
Update licenses.
2020-01-01 17:15:49 +01:00
tterrag 53747b0cb5 Apply baked-in lightmap data to rendering
- Fix ForgeHooksClient.fillNormal injecting data to lightmap
- Fix OBJModel not filling lightmap data
- Fix NewModelLoaderTest blockitem not linking with block
2019-12-30 16:12:14 -05:00
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
ichttt 747cb0f151 Some code cleanup for 1.15 (#6362) 2019-12-18 20:39:41 -08: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
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 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
nikita488 241db39cea Fix emissive items not working 2019-11-24 19:08:46 -05:00
bl4ckscor3 5d62261082 Fix RawMouseEvent not being cancelable (#6310) 2019-11-12 15:12:25 -08:00
tterrag fab4ce894a Fix BlockStateProvider#horizontalBlock emitting rotations >=360 2019-11-01 17:10:06 -04:00
tterrag acaa470dea
Add Blockstate and Model data providers (#6241) 2019-10-24 22:33:24 -04:00
Wyn Price 6422310453 Fixed forge rendering pipeline and shape based light occulsion. (#6178) 2019-10-22 15:29:27 -07:00
David Quintana ec3e8c2039 Fix vanilla models with parents not loading properly from forge blockstates. 2019-10-16 23:11:23 +02: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
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
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
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
MrCrayfish f4215d121c Reimplemented "MouseEvent" as RawMouseEvent for 1.14.X (#6144) 2019-09-16 13:03:10 -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
LexManos e1863383ff Fix naming conflicts with official names. 2019-09-04 22:33:17 -07:00
cpw a4aa85259e
Add in some client only player connectivity events. Closes #5536
Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-08-31 13:55:46 -04:00
Vincent Lee bae2ee0420 Minor model system cleanup/documentation (#6089) 2019-08-28 21:33:49 -07:00
Daniël Goossens c83d4d29e4 Added new InputEvent.MouseScrollEvent, fixes #5811 (#6037) 2019-08-28 21:13:31 -07:00
Vincent Lee 838998b885 Add particle factory registration event (#6018) 2019-08-28 18:42:17 -07:00
David Quintana a9b3b48273 Make FluidStacks non-nullable, and implement some TODOs. 2019-08-29 03:18:42 +02:00
David Quintana b7e1cc5f6b Fluid API rework (#5983)
- Moved forge fluids into FluidAttributes companion object to the vanilla Fluid. By gigaherz
- Redesigned the Fluid API to be closer to the Items API. By King Lemming
Co-authored-by: King Lemming <kinglemming@gmail.com>
2019-08-29 03:18:41 +02:00
Vincent Lee 8c04651301 Add hook to load custom mrls/rls not attached to a block or item. (#6010) 2019-08-15 11:03:57 -07:00
LexManos 48fa2f458c Make Villager profession unlocalized name use modids when not 'minecraft' Closes #5977
Fixed trees able to be generated through water. Closes #6000
Change Block#toString to use getRegistryName instead of getNameForObject Closes #5937
Allow Cooking Recipes to deserialize results with stack sizes. Closes #5960
2019-08-02 13:37:02 -07:00
cpw c90b1732e9
Fix objloader registering at wrong time. Closes #5847. Added test
class as suggested in the issue.

Note: most tests are commented out at the present time, pending
rework. Tests that work, work.

Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-07-20 21:04:00 -04:00
cpw 27afdc8a27
Provisional update to 1.14.4. Missing a lot of playerinteractionmanager patches because everything moved and I'm tired.
Fix up immediate problems.

bump to 28.
2019-07-20 00:35:40 -04:00
cpw eff42f6066
Update mappings to 20190719 in prep for 1.14.4..
Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-07-19 11:55:30 -04:00
LexManos cb21e95e0b Change default BrewingRecipe to use an Ingredient for the input instead of ItemStack. Closes #5944
Add AT for GameRules.register Closes #5946
Fix Forge Blockstate loader model path is inconsistent with vanilla blockstates Closes #5892
Fix client crashing when opting not to load a world when there's missing blocks Closes #5886
2019-07-18 14:13:20 -07:00
tterrag1098 0a7f5ff9fa Rework GuiModList mod info to use custom scrolling panel impl 2019-07-10 20:13:33 -07:00
LexManos f79da3edf7 Fix syntax error in IRenderHandler. 2019-07-08 20:14:41 -07:00
LexManos 8742d74e93 Pass tick counter to custom render handlers (#5744) 2019-07-08 19:55:47 -07:00
ichttt 06a30e9f23 Adds some explanatory javadocs and check world in ModelDataManager (#5762) 2019-07-08 19:47:18 -07:00
Antoine Lucas 650e7dc16e Add InputEvent documentation (#5698) 2019-07-08 19:47:06 -07:00
ichttt d41fad51c2 Add IModelData to getParticleTexture (#5756) 2019-07-08 19:46:32 -07:00
ichttt 0463949ac3 Fixed BakedModelWrapper not delegating new methods (#5761) 2019-07-08 19:45:27 -07:00
LexManos 61bea2bfda Fixed EntityJoinWorldEvent not being fired when player is added to ServerWorld. #5827
Fixed wrong example path for the access transformer in the MDK build.gradle. #5891
Added getters for mouse x/y velocity and if the middle-mouse button is being held down. #5776
Modify issue template for better clarity. #5874
Fixed grindstone not using ItemStack-sensitive getMaxDamage. #5831
Added ParticleManager.registerFactory to Forge's AT. #5896
Fixed NPE in SidedInvWrapper when side was null. #5787
Moved EndermanEntity.setAttackTarget super call to allow LivingSetAttackTargetEvent the ability to override default behavior. #5778
Added field to make "Looking at" debug info maximum distance configurable #5714
2019-07-08 18:42:12 -07:00
primetoxinz 765efc3c72 Update TextureStitchEvent.Pre to give access to the list of ResourceLocations that will be loaded as textures. (#5870) 2019-07-03 12:26:51 -07:00
cpw c8e5007913
Remove legacy StartupProgress.
Implement properly scalable progress thanks to @gigaherz. Closes #5863.
Implement API for pushing messages to the startup screen from mods.
Add memory display.

Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-06-30 23:48:54 -04:00
cpw d966746fbf
Moved some events to the Mod's event bus. You'll need to update which bus
you're listening to for these. (The Mod event bus is the only one actively
dispatching events during model loading).

ModelRegistryEvent, ModelBakeEvent, TextureStitchEvent.Pre, TextureStitchEvent.Post, ColourHandlerEvent.Block, ColourHandlerEvent.Item

Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-06-22 20:36:07 -04:00
cpw 83a0dc2ef9
Merge remote-tracking branch 'origin/1.14.x' into 1.14.x 2019-06-21 22:42:33 -04:00
cpw c10174d50d
Update mappings, move mod initialization to the async loader.
Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-06-21 22:42:16 -04:00
tterrag 656ff25ae1 Fix #5768 add access to MainWindow object in RenderGameOverlayEvent 2019-06-21 20:29:04 -04:00
tterrag 5fb948fb35 Fix #5805 ModelBakeEvent does not fire 2019-06-21 19:34:58 -04:00
cpw 37a896fe1b
Add params for the exception message
Signed-off-by: cpw <cpw+github@weeksfamily.ca>

tweak logging

Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-06-15 19:47:08 -04:00