Commit graph

13 commits

Author SHA1 Message Date
modmuss50
b83334a063 Split all duplicated packages (#2617)
* Move duplicated v0/v1 impl packages to v0 subpackages

Fixes #2616. The convention is adopted from the command API (v1)
whose impl classes have the v1 subpackage.

* Separate client code into its own packages everywhere

* Fix code style

* Fix code style, part 2

* Allow v0 in package names

* Allow v0 in package names (fixed)

(cherry picked from commit 9244241639)
2022-11-20 13:58:41 +00:00
modmuss50
75e98211bd
22w42a 🐫 (#2599)
Co-authored-by: shartte <shartte@users.noreply.github.com>
Co-authored-by: Juuz <6596629+Juuxel@users.noreply.github.com>
2022-10-22 20:38:33 +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
Technici4n
cca23f938e Fix #1912 and #1972: inventory updates in transactions (#1979) 2022-03-03 18:15:40 +00:00
Technici4n
f995ab4233 Fabric API Lookup (#1234)
# Fabric API Lookup API v1
## Introduction
This module allows Api instances to be associated with game objects without specifying how the association is implemented. This is useful when the same Api could be implemented more than once or implemented in different ways.

Many thanks to @Grondag for providing the original concept (#1072).
Thanks also go to @i509VCB, @Pyrofab, @sfPlayer1 and the others who were involved with the design of this module.

This is the foundation upon which can be built for example a fluid transfer api (#1166). Closes #1199.

## Flexible Api Querying
## Block Api Usage example
## Building blocks
This PR was changed a lot, please have a look at the README, the package info, and the javadoc for `BlockApiLookup` and `ApiLookupMap` for up-to-date documentation.

## More usage examples
FastTransferLib (https://github.com/Technici4n/FastTransferLib) is an experiment to build an item, fluid and energy transfer api on top of this module. (Which was until recently called `fabric-provider-api-v1`.)

## Missing things?
~~I could add an overload of `BlockApiLookup#find` with nullable `BlockState` and `BlockEntity` parameters, so that the caller can directly provide them if they are available for some reason.~~ Added in later commits.

There is no module to retrieve apis from items or entities yet because there were unsolved issues with those. The community can use the provided building blocks to experiment with their own implementations of `ItemStackApiLookup` and `EntityApiLookup` until the way forward becomes clear, but let's please not delay the `BlockApiLookup` because of that.

Co-authored-by: i509VCB <git@i509.me>
Co-authored-by: PepperBell <44146161+PepperCode1@users.noreply.github.com>
(cherry picked from commit dc716ea167)
2021-03-08 20:35:40 +00:00
Player
d86a720d2c
Checkstyle: Detect package names ending with ss as singular 2020-09-09 03:14:01 +00:00
modmuss50
63435d4b92
Restart Testmods (#593) 2020-05-03 16:56:50 +00:00
liach
1a47cd78f6
Update checkstyle and change tab width to be 4 than 8 (#518)
* Remove unnecessary chmod in travis script
* Update checkstyle and fix indent config
* Travis CI optimizations and checkstyle fixes
2020-04-11 18:21:53 +00:00
Juuxel
ce867d209a Make checkstyle always use English 2020-01-04 19:25:14 +00:00
Player
5a0f9a60f7 Fix checkstyle package check using client/server as the module name and missing suffix validation, adapt missed fabric-renderer-registry package 2019-11-27 13:24:36 +01:00
Player
6d6e6117b4 Fix checkstyle config not supporting windows line endings 2019-11-13 18:46:19 +01:00
Player
b7f9825dbb Add checkstyle verification for package names, fix non-API packages. 2019-11-03 20:14:45 +01:00
Player
dfdb52d6e5 Add checkstyle, format existing code accordingly. 2019-10-27 15:40:26 +01:00