Commit graph

1047 commits

Author SHA1 Message Date
modmuss50
fd0cc9858a Bump version 2022-06-04 21:37:30 +01:00
modmuss50
2a5b9210c6 1.19-rc2 2022-06-04 21:32:33 +01:00
Daomephsta
767db26ed9 Make getKnockbackResistance() work for all materials (#2129)
* Make getKnockbackResistance() work for all materials

* Add missing license to ArmorItemMixin.java

* Fix all build failures

* Document ArmorItemMixin

(cherry picked from commit 6c4e5d0990)
2022-06-04 21:10:14 +01:00
Technici4n
123f0c73d5 A few datagen fixes (#2250)
* Include datagen in the production fatjar. Closes #2228

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

* Auto-generate item models even when strict validation is disabled. Fixes #2240

(cherry picked from commit 4d962b4e9e)
2022-06-04 21:09:22 +01:00
Justsnoopy30
7fe9740985 Fix errors not showing up in disconnect messages (#2266)
* Fix errors causing disconnects during server connection not showing up in the disconnect message

* Replace unnecessary inject with the throwable provided in the redirect

(cherry picked from commit e6b169ebca)
2022-06-04 21:07:46 +01:00
ThalusA
37622d24c5
Add all missing tags for SAVANNA, TAIGA, OVERWORLD and END (#2273) 2022-06-04 21:06:29 +01:00
modmuss50
9d709c192c Bump versions. 2022-06-02 16:04:52 +01:00
apple502j
513f4a5977
Fabric Message API v1 (experimental) (#2220)
* Initial skeleton

* Fabric Chat API v1 (experimental)

* Run checkstyle

* Fix checkstyle (testmod)

* Support 1.19-pre1

* Fix spotless

* Fixes

* Remove caching of messages
This is hard to maintain and has several edge cases. Mods should cache themselves when needed.

* Make constructor private

* Add ServerChatEvents

* Update mappings

* Prepare for the rename

* Include chat decorator in exception

* Add support for blocking messages

* Rename to fabric-message-api-v1

* Update to 1.19-pre2

* Use fabric namespace

* Rename ChatDecoratorEvent

* Rename events and add more javadoc

* Rename ServerChatEvents

* Rename ChatDecorator

* Only block bad respawn point death in testmod

* Fix wrong word in javadoc

* Improve javadoc

Co-authored-by: modmuss50 <modmuss50@gmail.com>
2022-06-02 16:00:15 +01:00
modmuss50
e62f51a37f 1.19-rc1
Only mapping updates.
2022-06-02 15:41:09 +01:00
modmuss50
d27d619843 Bump version 2022-05-31 13:48:09 +01:00
modmuss50
ba8b587cad 1.19-pre4 2022-05-31 13:29:38 +01:00
Juuxel
9e7660c677 Loot table API v2
- 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.

  Co-authored-by: i509VCB <i509vcb@gmail.com>
2022-05-31 13:09:54 +01:00
apple502j
14b3ae007b
Load mod-provided data packs and DRM entries (#2261)
* Load mod-provided data packs and DRM entries in CreateWorldScreen

Fixes #2225

* Fix ModifyArg target

* Fix injection failure

* Fix again

* checkstyle

* Fix it once again

* Add data pack load test to biome api testmod

* Also fix this for the dedicated server

* Fix TestServer not loading data packs

* Load dynamic registry in TestServer
2022-05-31 12:11:41 +01:00
Jason
d51ff45ef2
Change client command api to use registration event (#2264)
* wip client command changes

* Move field and add javadoc

* Switch to jetbrains annotations and add missing annotations

* Add note about integrated servers

* Rename DISPATCHER field
2022-05-31 12:11:27 +01:00
modmuss50
bb4e3b8e47 Bump version 2022-05-24 15:19:55 +01:00
modmuss50
72da3b3d5e
Handle teleporting within the same dimension better. (#2249) 2022-05-24 15:10:52 +01:00
Technici4n
21a5acaa63 Fix #2206: Client chunk cache grows unbounded (#2248)
* Fix missing some chunk unloads events leading to a possible memory leak. (#1820)

* Update fix for 1.18.2. Fixes #2206

Co-authored-by: modmuss50 <modmuss50@gmail.com>
(cherry picked from commit 23d88c8099)
2022-05-24 15:06:51 +01:00
modmuss50
899286998c
Create fat testmod jar (#2256) 2022-05-24 15:04:30 +01:00
modmuss50
92cf9a3ec2
Sync new 1.19 registries as required. Closes #2205 (#2247)
* Sync new 1.19 registries as required. Closes #2205

* Comment fixes.
2022-05-24 15:04:15 +01:00
modmuss50
1899036145 1.19-pre2
All mapping changes.
2022-05-23 17:20:40 +01:00
modmuss50
ee704c941e Bump version 2022-05-23 14:57:40 +01:00
qouteall
28d4ab27e2 Fix the issue of uninstalling a dimension mod or datapack (#2078)
* Fix the vanilla bug of uninstalling dimensions.

* fix license

* fix style

* Rename LevelStorageMixin and some minor changes.

(cherry picked from commit 01a4d43dcd)
2022-05-23 14:50:43 +01:00
altrisi
bd0a0d4a7b
Restore printing the mod name in crash reports (#2235) 2022-05-23 14:49:56 +01:00
modmuss50
5c0f936b6f Bump version. 2022-05-21 23:15:13 +01:00
modmuss50
0ba6bb52f5 Apply process resources to all sourcesets. Fixes #2236 2022-05-21 23:11:44 +01:00
modmuss50
bb070d73e0 Bump versions 2022-05-21 16:36:59 +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
daa69e8a8b Bump version 2022-05-20 19:18:33 +01:00
modmuss50
b3eea543b7 Bump version 2022-05-20 19:08:21 +01:00
modmuss50
23acfcd6a1 Update mappings. 2022-05-20 18:56:00 +01:00
Player
f71b366fb1
Update command registration API to reflect 1.19 vanilla changes (#2227)
* Update command registration API to reflect vanilla changes

* Allow module versions in impl+mixin packages

* Use v2 module, keeping v1 for server commands at least

* update, address review

Co-authored-by: modmuss50 <modmuss50@gmail.com>
2022-05-20 18:39:10 +01:00
modmuss50
51821d6d14 Copy offsetType in FabricBlockSettings 2022-05-20 18:29:19 +01:00
Jab125
4a05de7fe1 Allow Built in Resource Packs to have custom names (#1827)
* TooltipComponent API (#1695)

* TooltipComponent API

* Add warning

* Fix handling of orphaned registry entries (#1759)

* Fix handling of orphaned registry entries

* Fix handling of orphaned registry entries in RegistrySyncManager

* 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

* Bump version

* Fix refamp generation for gametest API. Fixes #1722

* Bump version.

* 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

* Bump version

* Fix Registry.GAME_EVENT not being synced.

* Updated mappings to yarn 1.17.1+build.63 (#1786)

* Updated mappings to yarn 1.17.1+build.63

* Forgot some bits.

* Forgot to reeable

* Make biome & dimension api stable. And change usage around @Deprecated (#1783)

* Make biome & dimension api stable (for 1.17). Remove the usage of @Deprecated for other experimental modules.

The @Deprecated should be used for experimental/volatile APIs that are highly likely to change.

* Apply suggestions from code review

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

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

* 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>

* Bump version

* 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

* 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

* 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>

* 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

* 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>

* 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.

* Target the void world in the DimensionalRenderingTest

It's a bit too obnoxious for the overworld.

* 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

* A less breaking workaround for https://github.com/FabricMC/fabric/issues/1806 (#1811)

* A less breaking workaround for https://github.com/FabricMC/fabric/issues/1806

* Checkstyle

* Bump version

* Update Loom and Loader. Cleanup/improve buildscript. (#1802)

Co-authored-by: shartte <shartte@users.noreply.github.com>

* Fix missing some chunk unloads events leading to a possible memory leak. (#1820)

* Fix crash when loading resources from a UNC (windows) network share.

See: https://bugs.openjdk.java.net/browse/JDK-8178726

* Update ResourceManagerHelper.java

* Update ResourceManagerHelperImpl.java

* Update ResourceManagerHelperImpl.java

* attempt to get rid of trailing whitespace

* works

* Update the test mod

* Split TestPack to check if unnamed packs still load and display correctly

* update javadoc

* bump testmod version

* Update fabric-resource-loader-v0/src/main/java/net/fabricmc/fabric/api/resource/ResourceManagerHelper.java

Co-authored-by: LambdAurora <aurora42lambda@gmail.com>

* Use modid in description

* Add lang

Co-Authored-By: LambdAurora <email@lambdaurora.dev>

* Update fabric-resource-loader-v0/src/main/java/net/fabricmc/fabric/impl/resource/loader/ResourceManagerHelperImpl.java

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

* Fix optional server resource loading

* small changes and adhere to checkstyle

* Remove ResourcePackProfileAccessor from mixin json

* bump pack_format

Co-authored-by: Technici4n <13494793+Technici4n@users.noreply.github.com>
Co-authored-by: BasiqueEvangelist <basiqueevangelist@yandex.ru>
Co-authored-by: modmuss50 <modmuss50@gmail.com>
Co-authored-by: Juuxel <6596629+Juuxel@users.noreply.github.com>
Co-authored-by: Waterpicker <Waterpickerenternity@gmail.com>
Co-authored-by: AlphaMode <AlphaModeYT@gmail.com>
Co-authored-by: liach <7806504+liach@users.noreply.github.com>
Co-authored-by: Shadew <11669132+FoxShadew@users.noreply.github.com>
Co-authored-by: shartte <shartte@users.noreply.github.com>
Co-authored-by: LambdAurora <aurora42lambda@gmail.com>
Co-authored-by: LambdAurora <email@lambdaurora.dev>
Co-authored-by: deirn <deirn@bai.lol>
(cherry picked from commit 2afceb2962)
2022-05-20 18:25:14 +01:00
Technici4n
3572ae8d5f Fix #2164: Transfer API performance issues (#2189)
* Fix #2164: Transfer API performance issue

* Cache ItemStack in ItemVariantImpl

* Fix checkstyle

* Fix #2201

* Update comment in getCachedStack()

(cherry picked from commit f4563ac81e)
2022-05-20 18:21:50 +01:00
frqnny
258778f0e5 Add ModifyItemAttributeModifiersCallback (#2175)
* Add ItemAttributeModifiersCallback

* fix checkstyle errors

* fix checkstyle errors v2

* Edit javadoc per Technician's review

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

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

* Change functional interface name per Juuz's review

* Change name to ModifyItemAttributeModifiers per Juuz and Technician's request

* Forgot to add callback to the name

* Return mutable map

* Remove unused import

Co-authored-by: Juuxel <6596629+Juuxel@users.noreply.github.com>
(cherry picked from commit 85719ab7b7)
2022-05-20 18:19:48 +01:00
altrisi
f47870e61f Make crash-report-info print mods in a tree form (#2157)
* Make `crash-report-info` print mods in a tree form

* Bump required loader version

* Add mods to a list and sort instead of using a TreeSet

* Remove the `:` between id and version and change style in loop

(cherry picked from commit a6b0947818)
2022-05-20 18:19:45 +01:00
Luligabi1
1e43a8d519 Fix #1947, #1873: FabricBlockSettings#copy does not copy all settings, the sequel (#2119)
* Fix FabricMC#1947, FabricMC#1873

* Ordered import to follow checkstyle

* Removed broken 1.18 code on 1.18.2 branch

* Added note specyfing that FabricBlockSettings copies settings Block.Settings doesn't.

(cherry picked from commit 032c981de8)
2022-05-20 18:19:41 +01:00
modmuss50
55043e695a 1.19-pre1 2022-05-18 19:16:52 +01:00
modmuss50
653223279f Bump version. 2022-05-15 13:11:44 +01:00
apple502j
839472dc27
Update client commands to reflect 22w19a changes (#2217) 2022-05-15 13:10:34 +01:00
modmuss50
55e82473ab 22w19a 2022-05-12 21:58:35 +01:00
Player
729842f055 22w18a 2022-05-04 21:56:29 +02:00
modmuss50
3847c74085 Fix release build. 2022-05-01 16:16:30 +01:00
modmuss50
d5120a2426 Bump version 2022-05-01 16:08:25 +01:00
modmuss50
df3654b364
Move deprecated modules, create own maven BOM for the deprecated modules. (#2171)
* Move deprecated modules to a sub directory.
Remove deprecated modules from the default maven pom
Create a new "fabric-api-legacy" bom with the deprecated modules.

* Fix main "fabric" project not beign a dep for the legacy bom.

* rename artifact to fabric-api-deprecated

* Spotless

* Use the latest version of spotless.
2022-05-01 15:44:16 +01:00
Deximus-Maximus
6da09390b1
Update conventional tags to 22w17a (#2169)
Make all tags have same line endings
2022-05-01 15:44:09 +01:00
apple502j
aa505e0b00
Remove BedBlockMixin (#2166) 2022-05-01 15:44:01 +01:00
modmuss50
56447d9b95 22w17a 2022-04-27 20:48:57 +01:00
Technici4n
50e8465e2e
Transfer API improvements and breaking changes for 1.19 (#2139)
* Remove deprecated APIs

* Remove the transaction requirement for storage iteration

* Remove useless TransactionContext parameters in StorageUtil

* Improve SnapshotParticipant javadoc

* Fix tests

* Allow client-side SIDED item/fluid storage queries with a few caveats

* Add SidedStorageBlockEntity for easier block entity hierarchy registration
2022-04-27 18:38:29 +01:00
modmuss50
ec94c6f636
22w16b
Co-authored-by: Player <player@player.to>
2022-04-20 22:22:10 +01:00