Commit graph

1038 commits

Author SHA1 Message Date
PepperCode1
03e2b68790
Fix backport ()
- Restore BlockRenderContext.didOutput
- Restore null checks for AoCalculator.vanillaCalc
2023-02-24 09:50:21 +00:00
modmuss50
a1cecd3807 Bump version 2023-02-23 12:58:52 +00:00
PepperCode1
bf4864981b Indigo shade related fixes and other changes ()
* Apply disabled shade from vanilla quads directly to material

- Remove QuadViewImpl.shade

* Fix enhanced AO calculation and respect non-terrain culling state

- Fix AoCalculator using AO face data computed with a potentially different shade state
- Move non-cached computation code to separate method in AoCalculator
- Turn AoCalculator's brightnessFunc and aoFunc into abstract methods
- Do not check null check world in non-terrain AO calculation since it cannot be null
- Pass through lightFace and shade state as method arguments in AoCalculator methods to prevent additional lookups
- Do not check for the axis aligned flag in AbstractQuadRenderer.shadeFlatQuad
- Respect cull parameter passed to non-terrain rendering by merging TerrainBlockRenderInfo into BlockRenderInfo
- Use reusable search pos when calling Block.shouldDrawSide to prevent additional BlockPos allocation
- Change BlockRenderContext.render and TerrainRenderContext.tessellateBlock to return void since return value is no longer used
- Remove QuadViewImpl.vertexStart since it is unused

* Add suggestions

- Mark Direction parameter to BlockRenderInfo.shouldDrawFace as Nullable
- Reuse MaterialFinder in FrameBakedModel

(cherry picked from commit 3a95925af4)

(cherry picked from commit 1adbf277ee)
2023-02-23 10:49:42 +00:00
Technici4n
6bd39c990e Indigo and Renderer API fixes related to fallback consumers ()
* Fix : Indigo fallback consumer does not respect BlendMode or emissivity

* Change renderer testmod to test material change

* Remove presumably unneeded `quad.geometryFlags()` call

* Also test emissivity

* Call emitBlockQuads in the testmod

* Allow passing the block state explicitly to the fallback consumer. Fixes 

* Expand testmod to also test item models

* Also fix fallback consumer ignoring material for items

* Slight changes

* Introduce new interface for the expanded fallback consumer

* Add javadoc to ModelHelper

(cherry picked from commit 9f179aa14c)

(cherry picked from commit 2e5408b563)
2023-02-23 10:40:06 +00:00
modmuss50
88087ab966 Bump versions 2023-01-31 10:28:13 +00:00
modmuss50
a6f01b2607 Fix vanilla behaviour change causing Dragon Breath's to leave an empty Glass Bottle in Brewing Stand ()
This fix restores the previouslly broken behaviour of item remainders in brewing stands.

(cherry picked from commit 312c329484)
2023-01-31 10:19:47 +00:00
BasiqueEvangelist
64b7c69373 Fix memory leak by using weak set for ArrayBackedEvent list ()
* use weak set for array backed events list

* use thread safe map

(cherry picked from commit 70be179cf3)
2023-01-31 08:57:21 +00:00
modmuss50
ff8094f0c5 Bump version 2022-11-20 14:53:10 +00:00
AlphaMode
d8cf4e5a10 Support stack aware recipe remainders ()
* Support stack aware recipe remainders

* Fix checkstyle

* Remove all overwrites

* Add FabricItemStack and make RecipeRemainderHandler thread safe

* Update fabric-item-api-v1/src/main/java/net/fabricmc/fabric/api/item/v1/FabricItem.java

Co-authored-by: apple502j <33279053+apple502j@users.noreply.github.com>

* Update fabric-item-api-v1/src/main/java/net/fabricmc/fabric/api/item/v1/FabricItem.java

Co-authored-by: apple502j <33279053+apple502j@users.noreply.github.com>

* Update fabric-item-api-v1/src/main/java/net/fabricmc/fabric/api/item/v1/FabricItem.java

Co-authored-by: apple502j <33279053+apple502j@users.noreply.github.com>

* Update fabric-item-api-v1/src/main/java/net/fabricmc/fabric/api/item/v1/FabricItem.java

Co-authored-by: apple502j <33279053+apple502j@users.noreply.github.com>

* Update fabric-item-api-v1/src/main/java/net/fabricmc/fabric/api/item/v1/FabricItem.java

Co-authored-by: apple502j <33279053+apple502j@users.noreply.github.com>

* Update fabric-item-api-v1/src/main/java/net/fabricmc/fabric/impl/item/RecipeRemainderHandler.java

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

* Remove hasRecipeRemainder, Update test mod and remove unneeded mixins

* Update fabric-item-api-v1/src/testmod/java/net/fabricmc/fabric/test/item/CustomDamageTest.java

Co-authored-by: Salvatore Peluso <info@devpelux.xyz>

* Avoid copying the ItemStack

* Update fabric-item-api-v1/src/main/java/net/fabricmc/fabric/mixin/item/AbstractFurnaceBlockEntityMixin.java

Co-authored-by: Salvatore Peluso <info@devpelux.xyz>

* Sneakily change duplicate keybinding to a less used key

* make everything thread safe and improve AbstractFurnaceBlockEntityMixin

* Update fabric-item-api-v1/src/main/java/net/fabricmc/fabric/api/item/v1/FabricItem.java

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

* Update fabric-item-api-v1/src/main/java/net/fabricmc/fabric/api/item/v1/FabricItemStack.java

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

* Update fabric-item-api-v1/src/main/java/net/fabricmc/fabric/api/item/v1/FabricItem.java

Co-authored-by: Salvatore Peluso <info@devpelux.xyz>

* clear thread local and change field prefix

* forgot the allow

* Update fabric-item-api-v1/src/main/java/net/fabricmc/fabric/api/item/v1/FabricItem.java

Co-authored-by: Salvatore Peluso <info@devpelux.xyz>

* Update fabric-item-api-v1/src/testmod/java/net/fabricmc/fabric/test/item/CustomDamageTest.java

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

* Add FurnaceGameTest

* Change test keybind back to LShift

* Fix brewing stand remainder and fix nitpicks

* add code example to remainder javadoc

* Fixed and reformatted docs, changed recipe mixin behavior to store the remainder stack instead of the original stack, refactoring.

* Added gametests for brewing stand and recipe mixins, fixed furnace gametest compairing stacks with themselves.

* Use (0,1,0) position for game tests

* Review changes

Co-authored-by: apple502j <33279053+apple502j@users.noreply.github.com>
Co-authored-by: Technici4n <13494793+Technici4n@users.noreply.github.com>
Co-authored-by: Salvatore Peluso <info@devpelux.xyz>
Co-authored-by: modmuss50 <modmuss50@gmail.com>
(cherry picked from commit fa140d5976)
2022-11-20 14:22:49 +00:00
modmuss50
8d7ffdee44 Bump version 2022-11-07 20:35:35 +00:00
Technici4n
ee3621fcdd Add a block appearance API () 2022-11-07 19:16:41 +00:00
modmuss50
880f393aaa Bump version 2022-10-18 14:00:01 +01:00
Benonardo
bb2e04773e Fix crash when replacing SimpleRegistry contents ()
* Fix crash when replacing SimpleRegistry contents

* Called .value() two more times

(cherry picked from commit 726b65209a)
2022-10-18 13:56:33 +01:00
Technici4n
5d58937841 Skip adding out-of-bound sprites to SpriteFinderImpl ()
(cherry picked from commit c0ae659db2)
2022-10-18 13:49:01 +01:00
modmuss50
e77f1c629b Bump version. 2022-09-25 15:03:38 +01:00
modmuss50
e1cc3e83aa Bump version. 2022-09-17 10:09:14 +01:00
modmuss50
1e52169859
Rename modid to "fabric-api" and provide "fabric" () 2022-09-17 10:08:10 +01:00
modmuss50
f14603e862 Bump version 2022-07-21 20:41:03 +01:00
Technici4n
17cbbd436b Fix inconsistent ordering of item attribute modifiers by using a linked hashmap () 2022-07-21 20:16:02 +01:00
apple502j
2d30af4b7a Fix incorrect check in GlobalReceiverRegistry () 2022-07-21 20:15:58 +01:00
PepperCode1
41a02c8a4e Fix Indigo AO calculation ()
* Fix AO calculation

- Ensure calcFastVanilla and computeFace have parity with vanilla
- Ensure BlockStates are not queried more than once for the same position
- Replace deprecated FabricLoader#getConfigDirectory call with FabricLoader#getConfigDir

* Revert opaque sides fix

* More AO fixes and optimizations
2022-07-21 20:15:22 +01:00
modmuss50
2d1b3c535f Enable parallel builds by default.
Update remotesign to a parallel capable version.
Set org.gradle.parallel.threads in actions as we are IO bound.
2022-07-21 20:11:14 +01:00
modmuss50
f12f3bf3f7 Bump version. 2022-06-28 19:47:14 +01:00
apple502j
651bcc5952
Fix biome modification for modded end biomes () 2022-06-28 19:26:04 +01:00
deirn
489d6f824d
Port fix for MC-195468 to 1.18.2 ()
* re-enable custom dimension test

* port ServerBugfixMixin to 1.18.2
2022-06-28 19:25:06 +01:00
Juuxel
1997ad1227 Add FabricLootTableBuilder.modifyPools ()
* Add FabricLootTableBuilder.modifyPools

* Fix typo in javadoc
2022-06-28 19:23:34 +01:00
Player
d005b03a4c Clarify Indigo TextureHelper BAKE_NORMALIZED use 2022-06-24 05:50:11 +02:00
Player
16d6ef959a Revert "Fix the bitwise comparison for BAKE_NORMALIZED ()"
This reverts commit 0ca985e2c2.
2022-06-24 05:46:29 +02:00
RichieSams
0ca985e2c2 Fix the bitwise comparison for BAKE_NORMALIZED ()
The bitwise comparison is doing the opposite of what we want. It's currently checking for the *absence* of the BAKE_NORMALIZED flag. And if the flag is absent, it is normalizing. This should do the opposite.
2022-06-23 20:21:24 +01:00
mooz
3fa7078881 Bump version. 2022-06-19 19:46:27 +01:00
modmuss50
446e0595e8 Optimise file exists check in ModNioResourcePack () 2022-06-19 19:22:46 +01:00
PepperCode1
0ca3bd2b78 Defer Indigo item rendering ()
- Move ItemRenderer injection point from head to before isBuiltin check to allow model replacement to run
2022-06-19 19:22:43 +01:00
Technici4n
c85f2e3889
Fix : FlammableBlockRegistry ignores tags unless /reload () 2022-06-19 19:18:05 +01:00
apple502j
22138a0242
Backport fixes to resource loader and biome API ()
* Load mod-provided data packs and DRM entries (backport of )

* Port biome testmod changes

* Fix Biome API bugs (backport of )

* Re-run tests
2022-06-19 19:17:33 +01:00
modmuss50
d78c70fcbb Bump version 2022-06-13 20:41:02 +01:00
aws404
6f01bfd847
Add registries for villager interactions to fabric-content-registries module ()
* Add VillagerFoodRegistry

* Fix style

* Add VillagerCompostingRegistry and separate CollectablesRegistry from FoodRegistry

* Add VillagerPlantableRegistry

* Add warning when registering a non-compostable item as a villager compostable

* Rename some registries, use block placement sound

* Add VillagerHeroGiftRegistry

* Add javadoc

* Combined all registries into one API class

* Remove now redundant class

* Change registries to a static method

* Combine into VillagerInteractionRegistries class

* Fix typo

* Move ImmutableCollectionUtils to impl

* Add isEmpty check to plantables, prefix mixin methods with fabric_

* VillagerPlantableRegistry Rework

* Remove dangling comment

* notNulls, included vanilla items in plantable registry, checkstyle fix
2022-06-13 19:39:19 +01:00
Technici4n
cc71601c72
Add SyncDataPackContents and TagsLoaded lifecycle events ()
* Add SyncDataPackContents and TagsLoaded lifecycle events

* tagsLoaded -> onTagsLoaded, isClient -> client

* Compile error in testmod

* Make SyncDataPackContents fire for every player

* syncDataPackContents -> onSyncDataPackContents
2022-06-13 19:38:54 +01:00
modmuss50
9fcb91d282 Bump version 2022-06-04 21:37:22 +01:00
Daomephsta
6c4e5d0990
Make getKnockbackResistance() work for all materials ()
* Make getKnockbackResistance() work for all materials

* Add missing license to ArmorItemMixin.java

* Fix all build failures

* Document ArmorItemMixin
2022-06-04 21:06:55 +01:00
Technici4n
4d962b4e9e
A few datagen fixes ()
* Include datagen in the production fatjar. Closes 

* Allow exclusion of block loot tables from strict validation. Closes 

* Auto-generate item models even when strict validation is disabled. Fixes 
2022-06-04 21:06:48 +01:00
Justsnoopy30
e6b169ebca
Fix errors not showing up in disconnect messages ()
* Fix errors causing disconnects during server connection not showing up in the disconnect message

* Replace unnecessary inject with the throwable provided in the redirect
2022-06-04 21:06:41 +01:00
apple502j
0534af997f Bump version 2022-05-31 13:47:55 +01:00
Juuxel
e747827905
Loot table API v2, iteration 2 ()
* Improve loot table API

Alternative to .

- Deprecates all classes and methods that use outdated Yarn names.
- Adds FabricLootTable and FabricLootTableBuilder to replace
  the LootSupplier naming variants.
- Deprecates LootEntryTypeRegistry and LootJsonParser
  as their functionality is exposed in vanilla now.
- Adds methods to FabricLootPoolBuilder for working
  with collections as builder parameters.
- FabricLootPool and FabricLootTable/Supplier now return immutable lists
  instead of modifiable fixed-size ones.

Still WIP: LootTableLoadingCallback uses the deprecated FabricLootSupplier.

Update fabric-loot-tables-v1/src/main/java/net/fabricmc/fabric/api/loot/v1/FabricLootTableBuilder.java

Co-authored-by: i509VCB <i509vcb@gmail.com>

Fix compilation

Create loot table API v2

Move incorrect classes and revert unnecessary change

Add test for replacing loot tables

Document FabricLootPools

builder() -> create()

Add accessor for LootPool.bonusRolls

Add loot pool builder method for bonus rolls

Use Blocks.DIRT.getLootTableId() instead of raw string in v1 loot test mod

Make links in deprecation docs cleaner

Make FabricLootPoolBuilder.copyFrom(pool, true) also copy bonus rolls

...and mention it in the javadoc

Remove copyFrom from v2 builders

It seems like a maintainability mess if Mojang ever decides
to extend loot tables, and the chosen boolean flags are arbitrary.
It also doesn't really have use cases apart from the internal use
in the copyOf methods, and even then users can replicate its functionality
with the other API methods.

Rename 'supplier' to 'table' in LootManagerMixin

Add 'stable' lifecycle to loot-table-api-v2, deprecate v1

Add internal comment for implementors about updates

Cancel all remaining callbacks when a loot table is replaced

Remove unused shadowed logger from LootManagerMixin

Migrate subproject versioning to new system

Start the AW migration

Update test mod

* Use interface injection

* Fix some issues

* Remove outdated bonusRolls test from LootTest

It's a vanilla feature now.

* Create transitive access widener module

* Replace LootTableLoadingCallback with two events

* Use friendlier exception message

* Add resource source tracking

* Add loot table sources

* Add resource pack source for DefaultResourcePack$1 (anon resource)

* Add license header

* Make FabricResource an internal API in resource loader

* Remove my TAW module

* Add loot table-related TAWs

* Run CI

* Fix LootUtil.determineSource giving null values

* Clarify LootUtil comment

* Rename loot-table-api => loot-api + minor comment changes

* Add README

* Fix mixin file name

* Use ImmutableMap.Builder instead of HashMap.computeIfAbsent in loot event impl

* Prefix accessor methods with fabric_ to prevent conflicts with loot v1

* Document mixins

* Document mixins more extensively

* Improve NRMMixin comments

* Change weird wording in FabricResourceImpl

* Minor updates

- Support new built-in mod respack source
- Fix ResourceMixin comment
- Add more docs to LootTableEvents.MODIFY
- Add package-info

* Add license header
2022-05-31 12:12:10 +01:00
modmuss50
2c7b4abb73 Bump version 2022-05-24 15:19:38 +01:00
modmuss50
ffb2c71e55 Handle teleporting within the same dimension better. ()
(cherry picked from commit 72da3b3d5e)
2022-05-24 15:11:53 +01:00
Technici4n
d8d7804af0
Fix : End server world tick too early and conditional () 2022-05-24 15:08:00 +01:00
Technici4n
23d88c8099
Fix : Client chunk cache grows unbounded ()
* Fix missing some chunk unloads events leading to a possible memory leak. ()

* Update fix for 1.18.2. Fixes 

Co-authored-by: modmuss50 <modmuss50@gmail.com>
2022-05-24 15:05:44 +01:00
modmuss50
e969ec0c46 Bump version 2022-05-23 14:57:29 +01:00
altrisi
ee261a3e14 Restore printing the mod name in crash reports ()
(cherry picked from commit bd0a0d4a7b)
2022-05-23 14:52:54 +01:00
qouteall
01a4d43dcd
Fix the issue of uninstalling a dimension mod or datapack ()
* Fix the vanilla bug of uninstalling dimensions.

* fix license

* fix style

* Rename LevelStorageMixin and some minor changes.
2022-05-23 14:49:51 +01:00