Commit graph

39 commits

Author SHA1 Message Date
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
d82b939204
Fix Block2ObjectMap not using TagKey (#2028) 2022-02-24 11:17:53 +00:00
modmuss50
55dca1a4f3 Update mappings. 2022-02-16 18:14:59 +00:00
modmuss50
d882b91555
Port to 22w06a (#1989)
This snapshot is possibly one of the most impactful for API we have ever had. This PR is an inital port to support 22w06a, stuff will be missing and broken. 

# Removed modules:
- fabric-mining-levels-v0 - Previously deprecated
- fabric-object-builders-v0 - Previously deprecated
- fabric-tag-extensions-v0
- fabric-tool-attribute-api-v1

# Modules with API breaking changes:
- fabric-biome-api-v1
- fabric-content-registries-v0
- fabric-data-generation-api-v1
- fabric-mining-level-api-v1
- fabric-object-builder-api-v1
- fabric-resource-conditions-api-v1
- fabric-structure-api-v1

# Impactful API changes:
### fabric-object-builder-api-v1
- Removed - FabricBlockSettings.breakByHand
- Removed - FabricBlockSettings.breakByTool  - Previously deprecated

# Notable changes

- fabric-registry-sync-v0 moves vanilla's new registry freezing to a later point in time, allowing mods to add to the registry during init.

# Known issues:
- ServerBugfixMixin used to fix https://bugs.mojang.com/browse/MC-195468 has not yet been ported.
2022-02-11 17:02:44 +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
6f53a73db5 Bump versions 2021-11-23 18:54:18 +00:00
Shnupbups
f7c1d59979 Oxidizable and Waxable Blocks registries (#1832)
* Oxidizable Blocks registry

* Allow waxable blocks to be registered outside of OxidizableFamilies

* Refactor

Separated OxidizableBlocksRegistry and WaxableBlocksRegistry
Separated OxidizableFamily and WaxableBlockPair
Added null check to WaxableBlockPair
Added several methods

* whoops lol

* Apply suggestions from code review

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

* Update ContentRegistryTest.java

* Refactor again lol

Now uses mixins to change the vanilla ImmutableBiMaps to HashBiMaps and adds to them instead of keeping separate maps and having methods of their own. Much cleaner!

* gutted everything lol

removed all the charm and character- uh, i mean, superfluous stuff and reduced the api to the bare basics
oh and also one-way methods which is neat i guess if you're into that sort of thing

* 🦀one way methods are gone🦀

all my homies hate one way methods
maps are linked again

* re-merged oxidizable and waxable registry classes

* Update ContentRegistryTest.java

* implement suggestions by @Juuxel

* Oxidization -> Oxidation

as per https://github.com/FabricMC/yarn/pull/2837

* Improve Dynamics

Co-authored-by: haykam821 <24855774+haykam821@users.noreply.github.com>
2021-11-23 17:23:55 +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
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
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
Juuxel
211ddf95aa
Add flattening, stripping and tilling registries (#1632)
* Add flattening, stripping and tilling registries

* Where'd the spaces come from?

* Clarify docs

* Better overloads for TillableBlockRegistry.register

* Mutablise AxeItem.STRIPPED_BLOCKS if needed

* Remove simplest TillableBlockRegistry.register overload because the default predicate is for farmland

* Add test mod

* Update fabric-content-registries-v0/src/main/java/net/fabricmc/fabric/api/registry/TillableBlockRegistry.java

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

Co-authored-by: haykam821 <24855774+haykam821@users.noreply.github.com>
2021-08-24 17:44:06 +01:00
modmuss50
2e8bd82f1c Bump version 2021-08-08 18:39:30 +01:00
Juuxel
1b48b75b18
Fix FuelRegistry not following vanilla checks for valid fuels (#1554) 2021-08-08 18:18:01 +01:00
modmuss50
a02b4463f9 21w19a 2021-05-12 20:23:04 +01:00
modmuss50
23b3c92ea9 21w13a 2021-03-31 20:52:51 +01: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
modmuss50
880269e646 Bump version 2020-11-28 20:34:56 +00:00
Technici4n
fddcc0d88f Cache the fuel time map in the fuel registry (#1108)
* Cache the fuel time map in the fuel registry

* Use a faster map for the fuel times

* Rebuild the fuel times map on the client side too

* Use more compatible mixins

* Replace a function overwrite by a TAIL inject

* Mixin formatting

* Indentation

* Make cache thread-safe, switch to boxed collection (IHM) since most
uses yield boxed results, refactor cache clearing

* fix import formatting

Co-authored-by: Player <player@player.to>
2020-11-28 19:48:27 +00:00
Thalia Nero
9f7a7423f3 Add module dependencies to maven POM (#1104) 2020-11-15 19:46:01 +00:00
modmuss50
059ea866ec update mappings 2020-06-09 22:29:07 +01:00
modmuss50
0d474ec430 1.16-pre1 2020-06-04 21:20:20 +01:00
modmuss50
da175ad6ad 20w22a 2020-05-29 15:56:10 +01:00
modmuss50
4a08d6b285 20w21a initial port 2020-05-20 19:39:37 +01:00
modmuss50
88afe607db Update gradle, loom, mappings, loader 2020-04-03 20:44:38 +01:00
modmuss50
c808269fb2 20w14a 2020-04-02 19:28:36 +01:00
Player
b7f9825dbb Add checkstyle verification for package names, fix non-API packages. 2019-11-03 20:14:45 +01:00
modmuss50
ce77399215 19w44a
Only yarn renames
2019-10-30 17:10:30 +00:00
Player
dfdb52d6e5 Add checkstyle, format existing code accordingly. 2019-10-27 15:40:26 +01:00
Prospector
5ed88c193a Add more metadata to the modules (#353)
* Add fabric-api-base as a dep to fabric-networking-v0
2019-09-09 01:48:43 +02:00
svipthedrunk
b494ebebbb Fixed most of the javadoc comments and removed unused imports
Mostly replaced instances of > with its correct html representation "&gt;"
Changed or removed some bad @link entries, mostly stuff due to overseen code changes
Could not find the referenced class VertexEditor at all, removed these references out of the docs

Some errors still exists due to referenced objects not in the classpath at the time the javadoc is build
Proposal do some gradle magic
2019-06-27 18:18:10 +02:00
Juuxel
05f11b75e4 Loot table manipulation API (#160) 2019-06-09 21:47:28 +02:00
Adrian Siekierka
45e1a1c86e recompile to fix #185, bump version of affected module 2019-05-18 12:05:32 +02:00
asie
59147463cc add proper depends lists to mods 2019-05-17 23:08:53 +02:00
Adrian Siekierka
f16189181b final module name refactor prior to release, hopefully 2019-05-11 23:48:33 +02:00