Commit graph

1999 commits

Author SHA1 Message Date
modmuss
f371ccb95a
Fix NetworkingCommonTest causing a stackoverflow when the server is stopped before 50 ticks. () 2024-12-26 18:07:41 +00:00
Joseph Burton
cdad5be837
Fix world closing () 2024-12-26 18:07:31 +00:00
modmuss50
c6322ffbe4 Bump versions 2024-12-24 13:32:28 +00:00
PepperCode1
8ca2ae8d08
Reintroduce BeforeBake and AfterBake model modifiers () 2024-12-24 13:24:03 +00:00
Joseph Burton
99ff640a5d
Add various lifetime-bound try-with-resources APIs to client gametests ()
* Add various lifetime-bound try-with-resources APIs to client gametests
2024-12-24 13:23:52 +00:00
Bruno Ploumhans
efa825c9d7
Fix NPE in WaterPotionStorage#isWaterPotion ()
* Fix NPE in WaterPotionStorage#isWaterPotion

* Make checkstyle happy
2024-12-24 13:23:34 +00:00
TelepathicGrunt
cbf6036a49
Add additional 'c' tags ()
* Add more chest tags

* adjust temperate biome tag

* More Cobblestone tags

* end stones tag

* Gravels tag

* Netherracks tag

* Add all ores tags for consistency

* Ore rates, ore in ground, and ore bearing tags added

* Added sands tags

* added bones tag

* Added eggs tag

* Added feathers tag

* Added gunpowders tag

* Added mushrooms tag

* Added nether stars tag

* Added seeds tags

* Added fence and fence gate tags

* Added nether and end empty category tags

* Added lush biome tag

* Added magical tag

* Added rare biome tag

* Added plateau tag

* added spooky biome tag

* Added sandy tag

* Fixed checkstyle issues

* Run datagen

* more javadoc and fixed biomes in temperature tag

* fixed typo in biome temperature tag javadoc

* attempt at potion tag javadoc

* Add bottled potion subtag

* Datagen bottled potion and biome temperature fix

* Improved potion javadoc more

* Changed potion verb to noun

* Improve potion javadoc to mention data component

* special exception for certain biome tag

* checkstyle

* added more docs and tagging of pale garden

* checkstyle

* Alias fence, fence gate, and ore tags

* Checkkstyle

* Tag alias match c format now

* Add missing nether stripped stems/hyphae to stripped tags

* Bottled Potions display name

* improve javadoc to be clear on tag name for ore bearing and or in tags

* Trigger Build
2024-12-24 13:23:12 +00:00
modmuss50
d70d2c06bb (Block)EntityType builders use @Nullable Booleans 2024-12-18 18:42:55 +00:00
modmuss50
ac4f4b07c0 Bump version 2024-12-18 18:24:20 +00:00
Fabric Bot
3d1fb53995
New Crowdin updates ()
* New translations en_us.json (German)

* New translations en_us.json (German)
2024-12-18 18:22:40 +00:00
modmuss
c6364727a0
Some gradle deprecation fixes () 2024-12-18 18:22:30 +00:00
Joseph Burton
b3e1e3dddf
Client gametest threading tweaks ()
* Ensure game closes promptly when it crashes

* Mutate the stack traces of exceptions thrown in tasks to make them easier to track

* Fix ThreadingImpl.joinAsyncStackTrace

* Don't press menu.quit button from inside the gametest test
2024-12-18 18:22:20 +00:00
PepperCode1
1a8f4cc489
Allow setting canPotentiallyExecuteCommands in BE/E type builders ()
* Allow setting canPotentiallyExecuteCommands in BE/E type builders

- Add FabricBlockEntityTypeBuilder#canPotentiallyExecuteCommands
- Add FabricEntityType.Builder#canPotentiallyExecuteCommands
- Add FabricBlockEntityTypeBuilder#addBlocks(Collection)
- Deprecate FabricBlockEntityTypeBuilder#build(Type)

* Add bool to canPotentiallyExecuteCommands

---------

Co-authored-by: modmuss50 <modmuss50@gmail.com>
2024-12-18 18:22:00 +00:00
modmuss50
4fc7e41ba7 Bump version 2024-12-16 12:55:54 +00:00
modmuss50
19197ac2cc Update translations
Manually applying: https://github.com/FabricMC/fabric/pull/4254

Closes 
2024-12-16 11:45:13 +00:00
Josiah Glosson
43e15badcf Make dynamic registry element path include namespace for none vanilla registries ()
* Make dynamic registry element path be namespaced

Fixes 

* Remove old method of prepending the namespace

The old method of prepending only applied in certain locations, and thus gives different results depending on the circumstance

* Add simple RegistryKeysTest

---------

Co-authored-by: modmuss <modmuss50@gmail.com>

(cherry picked from commit 3f3c49952e)
2024-12-16 11:42:52 +00:00
modmuss
e918aae7a1
Ensure that there are no duplicate files across projects. ()
* Ensure that there are no duplicate files across projects.

* Depend on check
2024-12-16 11:39:58 +00:00
Joseph Burton
b47eab6b15
Add experimental Client Game Test API ()
* Move client auto tests to new module fabric-client-gametest-api-v1

* Fix run prod Gradle tasks

* Rename remaining references to client auto-tests

* Switch client gametests to using entrypoints

* Disable input and cursor grabbing

* Remove FabricClientTestHelper moving most of it into the context. Add the ability to simulate key and mouse inputs

* Rename and document input methods

* Rename client gametest github action

* Fix tryClickScreenButtonImpl for buttons inside layout widgets

* Address review comments and repackage client gametest test

* Delete wrong reference to TitleScreenAccessor. Thanks mcdev

* Address review comments

* Clean up default game options

* Improve documentation

* Remove module dependencies

---------

Co-authored-by: modmuss50 <modmuss50@gmail.com>
2024-12-16 11:32:46 +00:00
modmuss
08f5ef8bb2
Rename convention tag mixin package does it doesn't clash with the new tag api. ()
* Rename convention tag mixin package does it doesn't clash.

* Better
2024-12-16 11:31:07 +00:00
modmuss50
86a6267f0c Bump version 2024-12-12 16:31:07 +00:00
Syst3ms
9ba00ebb96 Registry aliasing ()
* initial

* style

* tests + more input checking

* revert formatting

* requests + more tests

* testmod

* check not frozen

* Fixes

* throw on default impl

* optimize implementation

---------

Co-authored-by: modmuss50 <modmuss50@gmail.com>
(cherry picked from commit e2e49f78f1)
2024-12-12 16:20:22 +00:00
Juuz
20ea1e23ee Add tag aliases ()
* Add tag aliases

* Document and rename tag alias internals

* Make the tag alias directory singular to match Mojang's recent style

* Add a note about tag aliases to client tag documentation

* Support missing tags in alias groups

* Support tag aliases for dynamic and reloadable registries

* TagAliasGroup: Document naming conventions for c tag alias groups

* Add tag alias test mod

* Fix inline return checkstyle

* Add test for tag alias data generation

* Fix checkstyle (again)

* Add tag translations to tag API testmod

* Uncomment accidentally commented out code

* SimpleRegistryMixin: Improve a log message

* TagAliasTest: Improve assertion messages

* Fix tag aliases for dynamic registries not applying on /reload

* Clean up log message once again

* Address review feedback

* Make missing interfaces throw CCEs

* Add README

* Move TagAliasGroup into the impl package

(cherry picked from commit a730659c14)
2024-12-12 16:19:34 +00:00
modmuss
b1caf1e9d6
Update checkstyle ()
* Update checkstyle

* Fix
2024-12-12 15:58:49 +00:00
PepperCode1
74b7397c46
Fix more custom ingredient implementation issues ()
- Fix Ingredient.OPTIONAL_PACKET_CODEC not being modified to work with custom ingredients
- Fix ShapelessRecipeMixin sometimes not collecting all non-empty item stacks
- If client does not support certain custom ingredient, send CustomIngredientImpl#getCustomMatchingItems instead of dummy default (stone)
2024-12-12 15:50:54 +00:00
PepperCode1
b874120c6d
Fix block outline rendering ()
* Fix block outline rendering

- Move outline event invoker to before either normal or high contrast outlines are rendered
- Remove outline layer reset, fixing high contrast outline being rendered with wrong layer
- Pass translucent parameter to BEFORE_BLOCK_OUTLINE event
- Remove deprecated BlockOutlineContext#vertexConsumer

* Re-add deprecated BlockOutlineContext#vertexConsumer

* Add translucent block outline to context
2024-12-12 15:50:44 +00:00
modmuss
5f43f98180
Disallow records as part of public API ()
* No public API records

* Add note in contributing

* Explain why

* Fix
2024-12-12 15:50:08 +00:00
modmuss50
f906699295 Bump version 2024-12-05 20:59:04 +00:00
PepperCode1
7e7568bf89
Add SpecialBlockRendererRegistry () 2024-12-05 20:15:42 +00:00
modmuss50
efb4f0f7ed 1.21.4 2024-12-05 20:11:43 +00:00
modmuss
466a140b43
Update to loom 1.9 ()
* Update to loom 1.9 and improve task caching

* Stable
2024-12-05 20:08:38 +00:00
Joseph Burton
453d4f91c7
Implement changes to client auto-test threading ()
* Implement changes to client auto-test threading

* Replace ThrowableRunnable and ThrowableSupplier with Apache equivalents, reintroduce MinecraftClient parameter

* Avoid undefined behavior in storing Operations

* Add check for calling MinecraftClient.getInstance() on the test thread

* Add todo for suggestion of runOnClient when API methods are added

* Rename lambda parameter from minecraft -> client
2024-12-05 20:07:32 +00:00
modmuss
a22746d3db
Make data generation .cache reproducible ()
* Make data generation .cache file reproducible

* Make the cache even more reproducable.

Thanks b8a38e10ef/fabric/src/main/java/io/github/gaming32/bingo/mixin/fabric/MixinHashCache_ProviderCache.java

* Use ModifyExpressionValue
2024-12-05 20:07:17 +00:00
PepperCode1
7b6b22539a
Allow retrieving model loading plugins ()
* Allow retrieving model loading plugins

* Convert PreparableModelLoadingPlugin.Holder to an interface
2024-12-05 20:07:08 +00:00
PepperCode1
fa62a02383
Fix custom ingredient implementation ()
- Override isEmpty in CustomIngredientImpl
- Override acceptsItem in CustomIngredientImpl
- Override equals and hashCode in CustomIngredientImpl so CustomIngredients can also implement them
  - Adjust the class doc of CustomIngredient to encourage implementors to do so
- Implement Ingredient#hashCode
- Remove incorrect Nullable annotation from ItemStack parameter in CustomIngredientImpl#test
- Implement equals and hashCode on all builtin custom ingredient classes
2024-12-05 20:07:00 +00:00
PepperCode1
e604fe7fb6
Fix Object Builder API classloading TexturedRenderLayers too early ()
- This caused decorated pot pattern textures to not be initialized correctly
- Now, WoodTypeMixin only manually adds textures after TexturedRenderLayers has been classloaded
2024-12-05 20:06:51 +00:00
modmuss50
32952c45bb Bump version 2024-12-02 21:54:16 +00:00
PepperCode1
84404cdd27
Port FRAPI to 1.21.4 and refactor ()
* Port FRAPI to 1.21.4 and refactor

- Port to 1.21.4
  - Change `glint` material property type from `TriState` to new `GlintMode` enum, due to addition of vanilla `ItemRenderState.Glint` enum
  - Remove `ItemStack` and `ModelTransformationMode` parameters from `emitItemQuads` to preserve contract of `ItemRenderState`
- Apply refactors and breaking changes
  - Move `hasTransform`, `pushTransform`, and `popTransform` from `RenderContext` to `QuadEmitter` to make the system more flexible and allowing mesh builder emitters to also have transforms
  - Remove `RenderContext` and inline remaining parameters to `emit*` methods; allows outputting model to arbitrary emitter and invoking model from arbitrary location
  - Remove `RendererAccess` and add static `Renderer#get` and `#register` instead
  - Disallow `Renderer` retrieval from returning a null value
  - Change `QuadView#faceNormal` to return a `Vector3fc` instead of a `Vector3f`
  - Remove deprecated methods
- Change `MeshImpl` to use a static cursor pool to save on memory and to allow nesting access to cursor on a thread
- Remove "compatibility mode" from Indigo

* Change contract of and better document `cullTest`

This allows a model to control which quads a submodel can cull early irrespective of transforms. Forwarding the test to the submodel will make it so pushed transforms may not receive quads that will be culled. The previous behavior of pushing a transform disabling early culling can now be achieved by passing `face -> false` to the submodel.

* Further refactors

- Remove disableColorIndex material property
- Rename colorIndex methods to tintIndex in QuadView and MutableQuadView to match recent Yarn rename
- Remove ForwardingBakedModel and WrapperBakedModel
  - Vanilla's new WrapperBakedModel is similar enough to ForwardingBakedModel
  - WrapperBakedModel will be moved to Model Loading API v1 in a different PR
- Set default vertex color to 0xFFFFFFFF instead of 0
- Disallow MutableQuadView#material from accepting a null material
- Precompute default quad data buffer instead of using zeroed buffer and setting defaults every time

* Fix build

The error was caused by a classloading loop.

* Convert MeshBuilder into MutableMesh

- Effectively split MeshBuilder#build into MutableMesh#immutableCopy and #clear
- Effectively add MutableMesh#forEachMutable
- Add Mesh#size
- Remove QuadEmitter#hasTransform
- Optimize MutableQuadViewImpl#copyFrom by not precomputing geometry
- Give UnwrappableBakedModel#unwrap a default implementation to prevent issues with interface injection
- Finish porting FRAPI and Model Loading API testmods

* Finish documentation
2024-12-02 21:48:27 +00:00
modmuss50
49203cfb9b Bump version 2024-12-02 19:54:47 +00:00
ArduFish123
58cfdace86
Fixed typo in README.md () 2024-12-02 19:53:25 +00:00
modmuss
5bea021697
Fix some datagen taws () 2024-12-02 19:53:02 +00:00
modmuss
a4eebcf09c
Remove unused BlockPickInteractionAware interface () 2024-12-02 19:52:51 +00:00
modmuss50
3f9bae29e2 1.21.4-rc3 2024-11-30 19:04:03 +00:00
modmuss50
085903dbca Bump version 2024-11-30 18:27:16 +00:00
PepperCode1
6a293bdb89
Update Model Loading API to 1.21.4 ()
* Update Model Loading API to 1.21.4

- Split model modifier events and callbacks - one set for static models and one set for block models
  - This is necessary because static models use UnbakedModel and are baked with settings while block models use GroupableModel and are not baked with settings
  - This cleans up the Identifier/ModelIdentifier getters
  - OnLoad for block models was not added because the unbaked block model map is not a cache and block models cannot inherit from other models
- Make DelegatingUnbakedModel a record to allow accessing the delegate ID
- Remove BuiltinItemRenderer, BuiltinItemRendererRegistry, and BuiltinItemRendererRegistryImpl as they were replaced by a TAW to SpecialModelTypes.ID_MAPPER

* Add fabric_ prefix to methods in BakedModelsHooks and fix checkstyle

* Remove ModelResolver and BlockStateResolver

- The functionality of ModelResolver could be perfectly replicated with ModelModifier.OnLoad with OVERRIDE_PHASE
- The functionality of BlockStateResolver could be perfectly replicated with ModelModifier.BeforeBakeBlock with OVERRIDE_PHASE
- Fix log warning caused by half_red_sand.json not defining particle sprite

* Re-add BlockStateResolver and ModelModifier.OnLoadBlock

- BeforeBakeBlock runs too late to allow modifying how models are grouped, so OnLoadBlock is necessary to allow that
- OnLoadBlock only runs for models which were actually loaded from blockstate files, so BlockStateResolver is necessary to allow adding models for blocks without a corresponding blockstate file
- Add UnwrappableBakedModel
  - Moved and renamed from FRAPI's WrapperBakedModel (original will be deleted in separate PR)
  - Implement it and interface inject it on vanilla's WrapperBakedModel
  - Add new static UnwrappableBakedModel#unwrap method which accepts a Predicate saying when to stop unwrapping
- Add WrapperUnbakedModel which simply delegates all method calls to a different UnbakedModel

* Remove ModelModifier.*Bake*

- Remove BeforeBake, AfterBake, BeforeBakeBlock, AfterBakeBlock
- Remove DelegatingUnbakedModel
- Add WrapperGroupableModel
- Add documentation and extra constructor to WrapperUnbakedModel

* Clarify OnLoad doc about meaning of null model
2024-11-30 18:18:10 +00:00
modmuss
bdca9acb21
Add more data generation TAWs ()
* Add TAW for BlockStateModelGenerator.CrossType

* And more
2024-11-30 18:17:26 +00:00
modmuss50
70277babdd Fix CurseForge game version capitalisation yet again... 2024-11-27 18:37:25 +00:00
modmuss50
c6abe49647 Bump versions 2024-11-27 18:10:50 +00:00
modmuss50
1885ad74d1 1.21.4-pre3 2024-11-27 18:08:27 +00:00
modmuss
cc0fa2fec8
Add optional registries & refactor registry sync ()
* Refactor registry sync

* Remove old file

* Checkstyle

* Fixes

* Improve error message

* Fix

* Fix test
2024-11-27 18:01:38 +00:00
modmuss
b90fb141f3
Update loom () 2024-11-27 18:01:28 +00:00