Commit graph

63 commits

Author SHA1 Message Date
AlphaMode
6dc0edd789 Deprecated BlockEntityRendererRegistry in favor of vanilla's BlockEntityRendererFactories (#2582)
* Deprecated BlockEntityRendererRegistry in favor of vanilla's BlockEntityRendererFactories

* Undo unintended change

* Update fabric-transitive-access-wideners-v1/src/main/resources/fabric-transitive-access-wideners-v1.accesswidener

Co-authored-by: haykam821 <24855774+haykam821@users.noreply.github.com>

* Update BlockEntityRendererRegistry javadoc to match others

* Implement sign renderer test

* Fix template

* Change SignTestBlockEntity to SignBlockEntityTest

Co-authored-by: haykam821 <24855774+haykam821@users.noreply.github.com>

(cherry picked from commit 08b73de4d1)
2022-12-23 15:32:51 +00:00
Technici4n
0b401b6a39
Fix #602: Allow querying registered DynamicItemRenderers (#2779) 2022-12-23 15:22:51 +00:00
modmuss50
99f9db8063
Cleanup Environment annotation usage. (#2755)
* Remove @Environment(EnvType.CLIENT) from BoundedIntRule.validate

* Move ItemTooltipCallback to client source set

* Remove @Environment(EnvType.CLIENT) annotation

* Remove @Environment(EnvType.SERVER) from WorldChunkMixin
2022-12-23 13:10:16 +00:00
modmuss50
49abcf7e64 Update mappings 2022-11-16 16:12:51 +00:00
modmuss50
f84bf2d968
22w45a (#2647) 2022-11-10 16:07:38 +00:00
modmuss50
11ba9c3b22
22w43a (#2610)
Co-authored-by: Technici4n <13494793+Technici4n@users.noreply.github.com>
2022-10-26 20:48:38 +01:00
modmuss50
75e98211bd
22w42a 🐫 (#2599)
Co-authored-by: shartte <shartte@users.noreply.github.com>
Co-authored-by: Juuz <6596629+Juuxel@users.noreply.github.com>
2022-10-22 20:38:33 +01:00
modmuss50
73145abb31
Support namespaced armor textures. Fixes #96 (#2542) 2022-09-25 16:16:50 +01:00
Technici4n
a29562c81b
Fix @SafeVarargs warnings in Resource Conditions and ColorProviderRegistry (#2547) 2022-09-25 14:47:00 +01:00
modmuss50
c6af733cfb
Cleanup incorrect mixin shadow annotations/access 2022-09-25 14:46:29 +01:00
apple502j
93d8cb82e8
Fix many javadoc issues (#2526)
Co-authored-by: Juuz <6596629+Juuxel@users.noreply.github.com>
2022-09-25 14:45:12 +01:00
modmuss50
aeb40ebeab
Rename and validate Mixin class names. (#2450)
And update loom.
2022-08-15 18:59:19 +01:00
modmuss50
9ff28f4026
Split client only code into its own sourceset. (#2179)
A common source of crashes on modded Minecraft servers comes from modders accidently calling client only code from the client, this PR is another large step towards elimitating that.

This PR has been months in the making and years in the planning, requiring major changes to Loom & Loader. In recent Minecraft versions Mojang has made it easier than ever to cleanly split the jar, going against the status-quo of merging the client and server into one jar.

From the start we have designed Fabric to have a very clear split between client and common (client & server) code. Fabric has always encoraged keeping client only code seprate from the server, this can be seen at a fundamental level with the entrypoints in Loader. Fabric API's have all been designed with this mind.

This PR provides a compile safety net around Fabric API using client only code on the server. Even though there are almost 400 changed files, minimal changes beyond moving the files were required to achieve this in Fabric API, thanks to the effort of all contributors in the past.

These changes should not affect modders or players in anyway, a single "universal" jar is still produced. Im happy to awnswer any questions.
2022-05-21 16:26:46 +01:00
modmuss50
ec94c6f636
22w16b
Co-authored-by: Player <player@player.to>
2022-04-20 22:22:10 +01:00
modmuss50
8eae451042 22w15a 2022-04-13 19:03:57 +01:00
modmuss50
54e5b2eccb 22w05a
Remove 1.18.1 support.
2022-02-02 18:34:04 +00:00
modmuss50
d7c144a830
Migrate to SLF4j and update loom (#1960)
* Migrate to SLF4j and update loom

* Update loom

* Update to latest loom
2022-01-30 21:37:23 +00:00
modmuss50
e66b59e98c 22w03a
1.18.1 is also supported with this version.
2022-01-19 19:18:31 +00:00
Technici4n
6b21378a26 Add AllowElytraFlight event (#1815)
Use explicit casts instead of .class.cast in mixins

Reorganize API class, and make it work for any living entity

add LivingEntityFeatureRenderEvents to disable cape rendering

Reorganize/rename hook, and add ALLOW event

Fix missing mixin return & cosmetic adjustements
2021-11-23 17:26:51 +00:00
Player
3ac43d9577 Revert Mixin compatibilityLevel bump, bump versions 2021-11-17 03:29:11 +01:00
modmuss50
e77d3ea62f 1.18-pre2 & Java 17 2021-11-16 18:41:10 +00:00
modmuss50
b4f4f6cda4 Update Loom and Loader. Cleanup/improve buildscript. 2021-11-12 15:02:54 +00:00
modmuss50
c3150579ea Bump version 2021-11-06 20:31:21 +00:00
modmuss50
15efb8834c Target the void world in the DimensionalRenderingTest
It's a bit too obnoxious for the overworld.
2021-11-06 20:12:52 +00:00
modmuss50
8a8e3d81de Ensure that API implementations can never be null. 2021-11-06 20:12:45 +00:00
modmuss50
65d505fc8a Bump versions
All of the version need to be bumped due to fabric-api-base being updated, this highlights the need for a better solution.
2021-11-05 17:09:48 +00:00
modmuss50
bda26a3d49 Fix MixinWorldRenderer for 1.18 after cherrypick 2021-11-05 16:17:09 +00:00
Waterpicker
b63228675d Environmental renderers (#1727)
* Environmental Renderers

* Remove defunt hideClouds and hideWeather

* Pushed missing License

* Push checkstyle fixes

* remove unused

* Unwrapped the test mod sky rendering.

* Added a first attempt at javadoc.

* Forgot a blank line

* Moved Environment references out of class

* Moved Lamda functions for fog override, thick fog usage and fog color adjustment to their own interfaces and gave them proper javadoc.

* Made FabricSkyProperties private

* PURGE THE H...I mean FabricSkyPropertyBuilder and FabricSkyProperties.

- Reverted unintentional mixin changes
- Fix various typo errors that were pointed out.
- Added missing javadocs and added the ability to override.

* Forgot some pluggin in some overrides.

* Added missing javadoc suggestion

* Changed api a bit so that it fires a exception if renderer not being overridden and one already exists.

* Split Implemtnation and Interface

* Forgot a license

* Added WorldRenderContext to Renderers

* Added logging

* Added missing javadocs and removed the override option.

* Removed INSTANCE

* Environmental Renderers

* Remove defunt hideClouds and hideWeather

* Pushed missing License

* Push checkstyle fixes

* remove unused

* Unwrapped the test mod sky rendering.

* Added a first attempt at javadoc.

* Forgot a blank line

* Moved Environment references out of class

* Moved Lamda functions for fog override, thick fog usage and fog color adjustment to their own interfaces and gave them proper javadoc.

* Made FabricSkyProperties private

* PURGE THE H...I mean FabricSkyPropertyBuilder and FabricSkyProperties.

- Reverted unintentional mixin changes
- Fix various typo errors that were pointed out.
- Added missing javadocs and added the ability to override.

* Forgot some pluggin in some overrides.

* Added missing javadoc suggestion

* Changed api a bit so that it fires a exception if renderer not being overridden and one already exists.

* Split Implemtnation and Interface

* Forgot a license

* Added WorldRenderContext to Renderers

* Added logging

* Added missing javadocs and removed the override option.

* Removed INSTANCE

* Fixed Issues

* Fixed formatting issue.

* completed Juuxl's suggestions and removed null check on adding skyproperties. Changed SkyProperties registering to take an Identifier. Registration turns out to be only adding new options to the "effects" entry of dimension type jsonjson.

* Forgot to reenable this.

* Just did suggested tweaks

* Changed SkyProperties to DimensionEffects

* Pushed suggestions of Haykam and apple502j

* Added missing changes from sky properties to dimension effects.

* Corrected me being inconsistent.

* Forgot to remove import.

* Impliments

https://github.com/FabricMC/fabric/pull/1727#discussion_r734988305
https://github.com/FabricMC/fabric/pull/1727#discussion_r734988265

* Implements https://github.com/FabricMC/fabric/pull/1727#discussion_r730429748

* Last minute tweak. Runnable that controls fog runs right before dimension spefific rendering is done. Based on more subtle issues discovered while working api with twilight forest.

Co-authored-by: AlphaMode <AlphaModeYT@gmail.com>
2021-11-05 15:52:40 +00:00
modmuss50
c683a6555f Bump version 2021-10-07 13:02:52 +01:00
Technici4n
e1a2e51818 TooltipComponent API (#1695)
* TooltipComponent API

* Add warning
2021-10-07 12:29:01 +01:00
modmuss50
8f2c3e04fb Bump version 2021-09-21 11:41:06 +01:00
modmuss50
d11c59e0d5 21w37a: Finish porting mixins + fix test mod, runs in prod now. 2021-09-20 13:50:25 +01:00
grondag
ffb6d41e97
Fix InvalidateRenderStateCallback only firing on resource reload (#1701)
Co-authored-by: grondag <>
2021-09-09 18:46:58 +01:00
modmuss50
fc40aa9d88 Bump version 2021-09-01 18:57:12 +01:00
modmuss50
cbda9318cd
Update Gradle/Loom and mappings. (#1692)
* Update Gradle/Loom and mappings.

* Fix deprecations and enforce

* Review feedback

* More cleanup and deprecation fixes.
2021-08-31 14:00:20 +01:00
modmuss50
b06cb95bac Bump version 2021-08-24 18:52:24 +01:00
altrisi
2a2a2c5485
Deprecate and move fabric-rendering-registries-v1 into fabric-rendering-v1 (#1470)
* Deprecate and move fabric-rendering-registries-v1 into fabric-rendering-v1

* Make the event work again

* Use lambda for RegistrationHelper

* Checkstyle in rendererregistries

* Checkstyle for rendering-v1

* Remove mixins file

And add two `forRemoval`

* Raise EntityModelLayerRegistry out of experimental

And update javadoc

* Change INSTANCE to a static method in two registries

* Readd unwillingly removed annotation

* Disallow constructing API instances

* Added Environment and ApiStatus annotations

* Update testmod's entrypoint

Co-authored-by: Technici4n <13494793+Technici4n@users.noreply.github.com>

* Remove renderer-registries testmod

* Remove `var` usage

* Don't specify `forRemoval = true` in `@Deprecated`

* Inline old registry implementations in anonymous classes

Co-authored-by: Technici4n <13494793+Technici4n@users.noreply.github.com>
2021-08-24 17:43:44 +01:00
modmuss50
2e8bd82f1c Bump version 2021-08-08 18:39:30 +01:00
Aelpecyem
3c3f33ee93
Re-implement ArmorRenderingRegistry (#1607)
* reimplement ArmorRenderingRegistry

* fix license headers

* remove todo

* move registry to static method

* minor reformat

* reduce api classes into one

* reformat

* make registry static

* reformat

* change Item in registry to ItemConvertible

* register mixin properly this time

* explain test mod

* reformat

* stricter null check
2021-08-08 18:17:54 +01:00
modmuss50
a02b4463f9 21w19a 2021-05-12 20:23:04 +01:00
modmuss50
12865e786c Version bump 2021-04-14 20:03:08 +01:00
i509VCB
6a8b6a39c8 Create a simple renderer api testmod (#1295)
* Create a simple renderer api testmod

* Update fabric-renderer-api-v1/src/testmod/java/net/fabricmc/fabric/test/renderer/simple/client/RendererClientTest.java

Co-authored-by: liach <7806504+liach@users.noreply.github.com>

Co-authored-by: liach <7806504+liach@users.noreply.github.com>
(cherry picked from commit b0e4dde51b)
2021-04-14 19:29:28 +01:00
Technici4n
78c482ee45 Fix a WorldRenderEvents.BLOCK_OUTLINE bug (#1319)
* Fix bug related to immediate mode VCP

* Add testmod

(cherry picked from commit 6d5e24549f)
2021-04-14 18:57:27 +01:00
modmuss50
41a6855274 21w10a 2021-03-10 19:21:48 +00:00
modmuss50
92519afafe Version bump 2021-01-19 19:38:22 +00:00
i509VCB
f8cf2bb436 Add custom value denoting module lifecycles. (#1253)
* Add custom value denoting module lifecycles.

* Make the module validation work.

My hand has been forced - we must use buildSrc since JsonSlurper is not available in main buildscript.

* Apply task to each project and dont cross projects

* A horrible hack

* Wait what

* It works now.

* Not needed

* Drop unneeded maven repo, cache map lookup

(cherry picked from commit daa38b3d82)
2021-01-19 18:54:23 +00:00
PepperCode1
f9381f3529 Fix javadoc and typo (#1270)
* Update RenderContext.java

* Update WorldRenderEvents.java

(cherry picked from commit d795f854a9)
2021-01-19 18:54:22 +00:00
grondag
ed5162f849 Add WorldRenderEvents (#1182)
* Add WorldRenderEvents

* Fix typos

* Incorporate PR feedback

* Simplify context and block outline events

* Update implementation

* Ensure the BLOCK_OUTLINE mixin does nothing if BEFORE_BLOCK_OUTLINE mixin is disabled

* Document event order in class header

* Update fabric-rendering-v1/src/main/java/net/fabricmc/fabric/api/client/rendering/v1/WorldRenderEvents.java

Co-authored-by: Juuxel <6596629+Juuxel@users.noreply.github.com>

* Add environment tag to nested type

* More envionment tags

Co-authored-by: Juuxel <6596629+Juuxel@users.noreply.github.com>

(cherry picked from commit c26373137e)
2020-12-30 17:14:30 +00:00
Thalia Nero
9f7a7423f3 Add module dependencies to maven POM (#1104) 2020-11-15 19:46:01 +00:00
modmuss50
f8ac1db2b1 Version bump 2020-09-27 12:38:48 +01:00