Commit graph

714 commits

Author SHA1 Message Date
modmuss50
ce7984c3e7 Bump version again due to partial release.
Some release steps completed without others leaving things in a weird state, going to fully re-release this version.
2021-03-17 20:28:23 +00:00
modmuss50
03bff30f22 21w11a 2021-03-17 19:14:28 +00:00
modmuss50
d748de6c71
Bump module version as well.
I shouldnt use github to do this stuff :)
2021-03-11 22:04:10 +00:00
modmuss50
a8de2ebd99
Bump version 2021-03-11 22:02:56 +00:00
haykam821
180d867766
Fix the onPlayerInteractEntity mixin causing a crash because the target method signature was not specified (#1364) 2021-03-11 22:02:25 +00:00
modmuss50
41a6855274 21w10a 2021-03-10 19:21:48 +00:00
modmuss50
a8e5632933 Bump version. 2021-03-08 21:03:54 +00:00
modmuss50
b510623339 Port FabricApiLookup to 1.17 2021-03-08 21:00:44 +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
modmuss50
0d6fddeefc Fix MixinServerPlayNetworkHandler not applying when the synthetic fields have been renamed.
This happens when using mojmap in dev.
2021-02-28 21:24:27 +00:00
modmuss50
7268309e55 21w08a 2021-02-24 20:30:53 +00:00
modmuss50
f9d6353a62 Bump version 2021-02-23 18:31:52 +00:00
Juuxel
2d24a8b238 Client-sided commands (#1115)
* Move command API icon to correct location

* Add client-sided command API

* Add jd note about threads

* Add license headers

* ArgumentBuilders => ClientArgumentBuilders

* Yeet custom prefixes

* Migrate testmod to lifecycle-events-v1

* Improve client command test

* Make client command test more similar to the server one

* Update to new yarn names

* Add handling for requires() in command suggestions

* Remove outdated TODO

* Playerification

* Clarify comments in ClientCommandInternals

* Use "s" instead of "it"

* Improve CommandSyntaxException logging

* Add missing import

* Add /fcc help command

* Add comments about server-client precedence rules

* Add missing license header

* Add /fabric-command-api-v1:client as an alias for /fcc

(cherry picked from commit 871300cf73)
2021-02-23 18:28:41 +00:00
modmuss50
40e100eb8e 21w07a - Fairly major mappings update 2021-02-17 19:11:45 +00:00
modmuss50
2a1dabb6d4 Bump Version 2021-02-14 19:02:40 +00:00
i509VCB
f1b599275a
Add registry for creating entity model layers and texture data (#1197)
* Add registry for creating entity model layers and texture data

* Add ApiStatus annotations and document factory method

* Helper -> Registry
2021-02-14 18:58:41 +00:00
modmuss50
524a2e859c Bump Version 2021-02-14 18:03:24 +00:00
modmuss50
5356521177 Post 1.17 cherry pick compile fix 2021-02-14 17:59:15 +00:00
Grayray
427fb25ae7 Update key-binding-api-v1 example (#1309)
Switches from events-lifecycle-v0 to lifecycle-events-v1

(cherry picked from commit 4ee10f8910)
2021-02-14 17:56:50 +00:00
PepperCode1
4270b5a63f Fix FabricMaterialBuilder.notSolid having the wrong return type (#1308)
Should be backwards compatible.

(cherry picked from commit cd0f1d33c1)
2021-02-14 17:56:45 +00:00
Player
6d07a7c2fa Make event registration thread safe (#1305)
(cherry picked from commit be996d2566)
2021-02-14 17:56:39 +00:00
i509VCB
6692ae6057 Remove all inter-module dependencies on fabric-networking-v0 (#1291)
This migrates all uses of v0 networking to v1 api, and changes the readme to not mention networking-v0 in the example for dependencies.

This effectively makes v0 removable if it breaks in the future beyond repair. Though I expect v0 to last quite a bit longer.

(cherry picked from commit bf770ed853)
2021-02-14 17:56:36 +00:00
modmuss50
2992645b97 21w06a 2021-02-10 18:58:49 +00:00
modmuss50
1eb2670e8a 21w05a 2021-02-03 19:53:20 +00:00
modmuss50
7053477453 Actually bump version 2021-01-27 19:29:29 +00:00
modmuss50
73abe4c989 Bump version 2021-01-27 19:12:02 +00:00
modmuss50
e568618094 Crash with a more helpful message when a screen fails to call super.init
(cherry picked from commit c045166c0f)
2021-01-27 19:10:12 +00:00
modmuss50
ac6a8f141e Modrith upload (#1280)
(cherry picked from commit 281de346c7)
2021-01-25 18:24:20 +00:00
i509VCB
9af2c302f9 Screen API v1 (#645)
* Implement screen api

* Actually update to 20w27a

* Split render and tick events to before and after

* Rename and update

* A bit of javadoc and profiler name fixes

* Add functional interface annotations, move render and ticking events to actual FabricScreen instance.

* Add after screen resize event

* Implement key and mouse click/press and release events.

* Move keyboard and mouse events to their own pojos

* Init and resize are the same thing. Maybe Screen#init needs a rename

* Add mouse scroll events

* checkstyle

* Refresh event instances after init

* Before init is nessecary to listen to addition/removal of child elements

* Polish up the javadoc and do a rename to the public api interface.

* Mappings updates on testmod

* javadoc formatting again

* Rework screen api design to be more ergonomic.

* Add remove event, some javadoc

* Add allow phase

* Module dependencies

* Fix null ticking when no screen is open

* Refer to GLFW constants in mouse click/release events

* Keyboard event GLFW constant javadoc

* Remove redundant qualifier

* Some docs, degetterifying

* Because global go brr add screen params back around

* Add module lifecycle to FMJ

(cherry picked from commit 8e23c1d877)
2021-01-25 18:19:58 +00:00
modmuss50
36b77c3e9f 21w03a 2021-01-20 19:50:47 +00: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
PepperCode1
f9381f3529 Fix javadoc and typo (#1270)
* Update RenderContext.java

* Update WorldRenderEvents.java

(cherry picked from commit d795f854a9)
2021-01-19 18:54:22 +00:00
Player
53f160a834 Bump version 2021-01-05 13:22:26 +01:00
LambdAurora
ea2e406d01 Fix dev env crash on Windows. 2021-01-05 13:21:54 +01:00
modmuss50
05c818887e Bump version 2021-01-03 16:35:12 +00:00
Mitchell Skaggs
42e2b8f61c Fix nether portal crash (#1256)
* Correct ordinal of `afterWorldChanged` mixin to the correct return

Co-authored-by: i509VCB <git@i509.me>

* Handle null entity when unable to be created

* Comply with Checkstyle

* Remove redundant ordinal and only use null return to check valid teleports

Co-authored-by: Player <player@player.to>

Co-authored-by: i509VCB <git@i509.me>
Co-authored-by: Player <player@player.to>
(cherry picked from commit c7d5c83208)
2021-01-03 16:33:22 +00:00
modmuss50
ce504de521 Bump versions 2021-01-01 14:50:26 +00:00
i509VCB
2e359e933a Workaround for shadowed fields from supermixins do not remap. (#1251)
(cherry picked from commit 49c073f9a3)
2021-01-01 14:49:02 +00:00
modmuss50
c6723711fd Bump versions 2020-12-30 17:26:06 +00:00
yyny
35ad3817d3 Allow passing UV coordinates as Vec2f (#1238)
* Allow passing UV coordinates as Vec2f

Rotating UV coordinates using vector math becomes extremely annoying when every `sprite` call requires the individual `u` and `v` coordinates to be extracted again.

This change will allow passing UV coordinates in a container that will always be available.

* Revert b0fe27e0d7

* Allow Vec2f UVs in MutableQuadView

This seems like the better place to put this.

* Fix return type

oops

* Add override in QuadEmitter

* Fix JavaDoc styling

* Duplicate JavaDoc and function definition

There is probably a way in Java to override the method while keeping the JavaDoc, but I can't be bothered, and this way, the user gets a more relevant JavaDoc anyway.

* Remove Trailing Whitespace

I'm pretty sure QuadEmitter allowed trailing whitespace, though...

* Fix JavaDoc styling in QuadEmitter

Also removes trailing whitespace

(cherry picked from commit 00f5b23648)
2020-12-30 17:16:16 +00:00
grondag
ed5162f849 Add WorldRenderEvents (#1182)
* Add WorldRenderEvents

* Fix typos

* Incorporate PR feedback

* Simplify context and block outline events

* Update implementation

* Ensure the BLOCK_OUTLINE mixin does nothing if BEFORE_BLOCK_OUTLINE mixin is disabled

* Document event order in class header

* Update fabric-rendering-v1/src/main/java/net/fabricmc/fabric/api/client/rendering/v1/WorldRenderEvents.java

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

* Add environment tag to nested type

* More envionment tags

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

(cherry picked from commit c26373137e)
2020-12-30 17:14:30 +00:00
Vincent Lee
7fbd501fc7 Provide replacement for ModelAppender that allows loading non-blockstate paths (#1178)
* Extend ModelAppender to allow loading non-blockstate paths

* Use a new interface instead of adding to the old one

* Rename new interface

(cherry picked from commit 6bec8f284f)
2020-12-30 17:11:02 +00:00
i509VCB
1d561d2678 Entity Events v1 (#957)
* Entity Events v1.

First up is an event fired after a living entity is damaged. All vanilla living entities except armor stands work with this event.

* Events related to killing of entities, changing world, player respawn/copyFrom

Death related:
an entity killing something and an entity being killed by an adversary

Player related:
After respawn, copy to

* Adversary stuff isn't needed

* checkstyle again

* Call AFTER_KILLED_OTHER on a ServerPlayerEntity upon death.

* Add event which is fired when a player first joined a server and add functional interface annotations

* Update build.gradle

* mispelled

* Some renames, test events, drop damage event

Damage events need further consideration in future

* Comments and null check

* Update for mappings

* Warning comment

* Remove first join event and teleport helper

First join does not work atm and teleport is in dimensions pr

* Module dependencies

* Javadoc tweaks

* The serverening

(cherry picked from commit 79b23bee5b)
2020-12-30 17:10:56 +00:00
i509VCB
60e92d82df Add contact links to issue template page (#1244)
* Add contact links to issue template page


Whoops

* Update .github/ISSUE_TEMPLATE/config.yml

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

* Update .github/ISSUE_TEMPLATE/config.yml

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

* Update .github/ISSUE_TEMPLATE/config.yml

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

Co-authored-by: haykam821 <24855774+haykam821@users.noreply.github.com>
(cherry picked from commit d9daf26edb)
2020-12-30 16:56:58 +00:00
Maity
06178adbda Fix example implementation of using FAPI modules for Groovy (#1237)
* Fix example implementation of using FAPI modules for Groovy

The previous implementation does not quite correctly describe what it does

* Improve description of adding dependencies

* Undo the last commit changes for Kotlin DSL

(cherry picked from commit a404f47683)
2020-12-30 16:56:54 +00:00
haykam821
6bc3f52d3f Fix missing metadata (#1233)
* Fix certain modules not having icons

* Add additional metadata to the fabric-particles-v1 module

(cherry picked from commit ae85d92960)
2020-12-30 16:56:49 +00:00
cs127
ce1444b45e Added Persian translation (#1161)
* added persian translation

* small change

(cherry picked from commit 6f23ac82f9)
2020-12-30 16:56:44 +00:00
Chloe Dawn
fd9375dd4f
Update networking API to 20w46a+, simplify mixin impl (#1245) 2020-12-30 16:46:02 +00:00
modmuss50
27f445e70d Fix merge.
Its always checkstyle...
2020-12-23 20:30:07 +00:00