Commit graph

852 commits

Author SHA1 Message Date
Juuxel
5521a561ea Fix shears being the ultimate mining tool (#1809)
* Add detail about default value to MiningLevelManager jd

* Fix shears being the ultimate mining tool

In more technical terms, fix an invalid
comparison in TaggedToolsModdedBlocksToolHandler.
The code was supposed to check if the tool's
mining level was at least the block's minimum
mining level. Instead, the check succeeded
whenever the block required a tool
(min level >= 0).

* WIP fixing tool attribute api bugs

* Fix mostly everything

* Simplify to (== 0) with explanation
2021-11-06 20:04:19 +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
Shadew
d77a0a3a6e Custom fluid renderers and enhanced vanilla fluid renderer customization (#1687)
* Implement custom fluid rendering

* Move custom renderers in FluidRenderer mixin and add overlay sprite support to FluidRenderHandlers

* Add vanilla-like fluid renderer. Maybe very unnecessary, might remove.

* Optimize imports

* Allow custom fluid renderers to call the default renderer. Re-add DEFAULT.

* Add interface to implement by blocks that enforces overlay texture on fluids

* Some comments

* Simplify API and remove DefaultLikeFluidRenderer

* Make simple renderer overlay texture nullable

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

* Expand test mod

* Checkstyle and licenses

* Easy shortcut for custom colored vanilla water fluids

* Easy way to register a renderer for two (still+flowing) fluids

* Update fabric-rendering-fluids-v1/src/main/java/net/fabricmc/fabric/api/client/render/fluid/v1/FluidRenderHandlerRegistry.java

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

* Update fabric-rendering-fluids-v1/src/main/java/net/fabricmc/fabric/mixin/client/rendering/fluid/MixinFluidRenderer.java

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

Co-authored-by: Technici4n <13494793+Technici4n@users.noreply.github.com>
Co-authored-by: modmuss50 <modmuss50@gmail.com>
Co-authored-by: Juuxel <6596629+Juuxel@users.noreply.github.com>
2021-11-05 15:54:05 +00:00
Technici4n
d4df60101d Another wave of transfer API improvements (#1801)
* Another wave of transfer API improvements

* Cleaner implementation of FilteringStorage#...Of

* Undo colored name for water and lava variants
2021-11-05 15:53:07 +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
Technici4n
5d8be2ee16 Add event phases (#1669)
* Proof of concept

* Simplify and document

* Allow events to be registered with default phases

* Use modified Kosaraju for the toposort, and add test for cyclic dependency graphs

* Separate phase-related functionality in an EventPhase class

* Revert "Separate phase-related functionality in an EventPhase class"

This reverts commit e433f348f4.

* Ensure that the phase order is deterministic

* Add pretty graphs

* Add a test, fix a bug, only do one sort for every constraint registration
2021-11-05 15:51:07 +00:00
Juuxel
d2f76b0fdf Add tag-based mining level API, fix and deprecate FabricBlockSettings.breakByTool (#1629)
* Mining Level API, part 1

* Fix incorrect netherite mining level in MiningLevelManager docs

* Add some format checks in dynamic mining level tag checking

* Add mining level API test mod

* Grammar

* Add cursed basic support for the tool attribute api

* Fix tool attribute JD

* Add proper compat for tool attribute api

Also fixes the remaining bugs in it!

* Update license headers

* stuff

* better comments

* more test mod work

* more

* Fix test mod

* i'm done with this module

* Address some code review things

* Use Reference2IntMap (basically IdentityHashMap for int values)

* Prefix mixin handlers with fabric$

* Add missing license header

* Update fabric-object-builder-api-v1/src/main/java/net/fabricmc/fabric/api/object/builder/v1/block/FabricBlockSettings.java

* Resolve liach's comment

* Update to use TagFactory
2021-11-05 15:50:11 +00:00
modmuss50
e14f9c8f05 21w44a 2021-11-03 18:57:29 +00:00
modmuss50
168f4a3be2 Bump version 2021-10-31 11:13:10 +00:00
AlphaMode
fe763b7016 ItemGroup API: Remove return and call super so all others ItemStack's get appended (#1617)
* Remove return and call super so all others ItemStack's get appended

* Add method to FabricItemGroupBuilder to pass ItemGroup with appendItems and change stacksForDisplay to a BiConsumer

* Update ItemGroupBuilder javadoc and add example to testmod

* Remove leftover aw

* Update fabric-item-groups-v0/src/main/java/net/fabricmc/fabric/api/client/itemgroup/FabricItemGroupBuilder.java

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

* Update fabric-item-groups-v0/src/testmod/java/net/fabricmc/fabric/test/item/group/ItemGroupTest.java

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

* Remove used import in ItemGroupTest

* Clean up

* Fix damn checkstyle

* Change version to 0.3.0

Co-authored-by: liach <7806504+liach@users.noreply.github.com>
Co-authored-by: Technici4n <13494793+Technici4n@users.noreply.github.com>
2021-10-31 11:00:10 +00:00
modmuss50
edf35c6176 Make dimension API stable. Remove usage of @Deprecated for experimental modules. 2021-10-31 10:59:59 +00:00
modmuss50
af0cec4081
Add features to the allowed features set. Fixes features not spawning when added via the biome api. (#1796) 2021-10-31 10:41:16 +00:00
modmuss50
0b944752fc 21w43a 2021-10-27 20:48:33 +01:00
modmuss50
938d6de077 21w42a 2021-10-20 21:31:17 +01:00
modmuss50
01912dd2c6 Fix Registry.GAME_EVENT not being synced. 2021-10-19 16:56:43 +01:00
modmuss50
0f72ccf1e7 Bump version 2021-10-17 19:18:51 +01:00
Juuxel
86675b35dc Add two more sleep events (#1755)
* Add event for setting bed occupation state

* Add wake up pos event and update tests

* Bump version

Just in case. I have a bad feeling that
this could become a patch version otherwise.

* Add code tags for true/false/null in EntitySleepEvents jd

* Add Dynamic annotations for lambda body mixins

* Update class javadoc to contain the new events
2021-10-17 19:15:37 +01:00
modmuss50
bb09662468 21w41a
Remove SurfaceBuilder related APIs.

Remove PersistentDynamicRegistryHandler as the bug (MC-202036) it fixed was fixed a few weeks ago.
2021-10-13 18:55:15 +01:00
modmuss50
b43623a4c6 Fix refamp generation for gametest API. Fixes #1722 2021-10-09 20:23:07 +01:00
modmuss50
d1937ce458 21w40a 2021-10-07 16:10:04 +01:00
modmuss50
c683a6555f Bump version 2021-10-07 13:02:52 +01:00
Technici4n
396dbf1cf1 Transfer API: bugfixes and improvements (#1762)
* Fix SingleVariantItemStorage extraction bug

* Inventory wrappers: reuse the original stack more aggressively

* Add some filtered overloads to StorageUtil methods

* Override PlayerInventoryStorage#insert to call #offer

* Add small comment regarding predicates
2021-10-07 12:29:07 +01:00
BasiqueEvangelist
21f792c9f8 Fix handling of orphaned registry entries (#1759)
* Fix handling of orphaned registry entries

* Fix handling of orphaned registry entries in RegistrySyncManager
2021-10-07 12:29:04 +01:00
Technici4n
e1a2e51818 TooltipComponent API (#1695)
* TooltipComponent API

* Add warning
2021-10-07 12:29:01 +01:00
modmuss50
6eb8b35a31 21w39a 2021-09-29 20:03:16 +01:00
modmuss50
dc3d5c4769 21w38a 2021-09-23 18:30:50 +01:00
modmuss50
f7f6de1ef6 Bump version 2021-09-21 12:52:28 +01:00
shartte
f83e2d93ab
Forgot to include biome-api (#1735) 2021-09-21 12:51:53 +01:00
modmuss50
8f2c3e04fb Bump version 2021-09-21 11:41:06 +01:00
shartte
04a230163e
Biome API without Overworld for now [1.18] (#1732)
* Restore Biome API as far as possible. Removed Overworld Biome additions for now until a new API can be worked out while the Vanilla changes stabilize.

* Now with more checkstyle.
2021-09-20 17:37:52 +01:00
modmuss50
d11c59e0d5 21w37a: Finish porting mixins + fix test mod, runs in prod now. 2021-09-20 13:50:25 +01:00
shartte
fb712d3a80
Fixes the structure API for 1.18. (#1730)
Structures are no longer linked to Biomes via an instance field  in the Biome class. Instead they are linked by registry keys. This means that standard biome spawning rules also apply to superflat worlds, instead of the hardcoded list of structures linked with superflat worlds by default. Changes the FabricStructureBuilder to allow adding structures to this default list.
2021-09-19 09:06:27 +01:00
modmuss50
dc466edebd Update loom 2021-09-19 09:02:15 +01:00
shartte
d7a7efac01
Fix running game tests / build [1.18] (#1731)
* Fix running game tests.

* Fix dimension api bugfix mixin. Of note: The Vanilla bug is still present, and the bugfix still needed.

* Fix references to unmatched RegistryOps method.
2021-09-17 23:32:44 +01:00
shartte
a2c681827d
Compile Fixes (#1729) 2021-09-17 20:06:14 +01:00
modmuss50
5553aff888 21w37a: Compile pass 2021-09-17 18:42:42 +01:00
modmuss50
46582230fb Bump version 2021-09-09 19:28:18 +01:00
Technici4n
86bae2c0e9
Work around vanilla capturing ItemStack references (#1700) 2021-09-09 18:47:06 +01:00
grondag
ffb6d41e97
Fix InvalidateRenderStateCallback only firing on resource reload (#1701)
Co-authored-by: grondag <>
2021-09-09 18:46:58 +01:00
Player
0265fac409 Remove client-only env restriction from fabric-rendering-fluids-v1.
This is a workaround for transfer-api having unsatisfiable dependencies
in the dedicated server environemnt. Fabric Loader 0.11 doesn't check
this dependency correctly, but it breaks on 0.12 - as it should. A proper
solution is too incompatible for now.
2021-09-08 21:12:27 +02:00
modmuss50
fc40aa9d88 Bump version 2021-09-01 18:57:12 +01:00
modmuss50
e409d7e818 Set remap to false in MainMixin 2021-09-01 18:40:15 +01:00
Technici4n
9f7c50187c
Transfer API: continuous fluid-containing items and other base implementations. (#1665)
* Transfer API: continuous fluid-containing items and other base implementations

* Update player inventory storage TODO

* Add PlayerInventoryStorage test

* getHandSlot() and small fixes

* Use simulateExtract in findExtractableContent

* Apply review

* Post-rebase fixes

* Add tentative InventoryProvider support

Co-authored-by: Player <player@player.to>
2021-09-01 12:23:34 +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
Potatoboy99999
3fb13e467a
Send block entity update packet along with regular block update packet (#1689)
* Send block entity update packet along with regular block update packet

* Fix style
2021-08-31 14:00:06 +01:00
Technici4n
49e84ad51a
Add Transaction#getCurrentUnsafe and fix mixin fields (#1685)
* Add Transaction#getCurrentUnsafe and fix mixin fields

* Update fabric-transfer-api-v1/src/main/java/net/fabricmc/fabric/impl/transfer/transaction/TransactionManagerImpl.java

Co-authored-by: BasiqueEvangelist <basiqueevangelist@yandex.ru>

Co-authored-by: BasiqueEvangelist <basiqueevangelist@yandex.ru>
2021-08-31 13:59:58 +01:00
Juuxel
87cc6e4c30
Sleeping event fixes (#1681)
* Un-hardcode FACING property checks from only BedBlocks

* Use a better injection point for EntitySleepEvents.ALLOW_BED

* Fix #1680

* Bump entity events version

* Clarify javadoc

* Let's not forget license headers

* Add a note about the vanilla bug

* Update BedBlockMixin.java
2021-08-31 13:59:48 +01:00
modmuss50
fe42ded042
Fabric Game Test API (#1622)
* First proof of concept pass

* Cleanup and fixes.

* Checkstyle

* Fix running.

* Updated

* Fix build

* Cleanup + fixes.

* Fix package

* and test package

* game-test -> gametest

* Fix exclusion

* Review feedback and fixes.

* Remove comment

* Review feedback.

* Don't set the game instance

* Fix

* Work around shadowed fields from super classes not getting remapped... dejavu anyone?

See: 2e359e933a (diff-0956caa3cd38a54f5910979f0cfd98198a93e4d585e111300f2f7ab7301ad122)

* Add mixin to exit with a non-zero exit code in case the test server fails to start.

* Enable JUnit XML report generation.

Co-authored-by: Sebastian Hartte <sebastian@hartte.de>
2021-08-31 13:59:35 +01:00
modmuss50
62e33f4127 Fix dedicated dev server crash #1670 2021-08-25 20:05:23 +01:00