Commit graph

689 commits

Author SHA1 Message Date
Technici4n
6d5e24549f
Fix a WorldRenderEvents.BLOCK_OUTLINE bug (#1319)
* Fix bug related to immediate mode VCP

* Add testmod
2021-04-14 18:40:14 +01:00
PepperCode1
f801c28735
Allow more flexibility when registering BER (#1392) 2021-04-14 18:40:01 +01:00
Emma
4b2c998ef4
Add Greek translation (#1403) 2021-04-14 18:39:45 +01:00
Juuxel
42c13ca9b1
Add Finnish translation (#1416) 2021-04-14 18:39:39 +01:00
frqnny
6ee4ca443c
Add Mexican spanish translation (#1418)
* Create es_mx.json

* Update es_mx.json
2021-04-14 18:39:29 +01:00
modmuss50
351679a7de Bump version 2021-03-22 19:04:31 +00:00
A. Regnander
e74ab46e1e
Create sv_se.json (#1388)
* Create sv_se.json

* Update sv_se.json
2021-03-22 19:01:53 +00:00
Jason
f63a27820f
Fix sendError discrepency with client commands (#1358)
This fixes a discrepancy between how error messages are formatted in client commands vs server commands.
2021-03-22 19:01:44 +00:00
modmuss50
1e6c71f9bc Bump version. 2021-03-08 21:03:44 +00:00
Technici4n
dc716ea167
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>
2021-03-08 20:32:36 +00:00
modmuss50
f9b3753bc0 Bump version 2021-02-23 18:31:33 +00:00
Juuxel
871300cf73
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
2021-02-23 18:20:49 +00:00
modmuss50
9354966b6c Bump version 2021-02-14 18:03:04 +00:00
Grayray
4ee10f8910
Update key-binding-api-v1 example (#1309)
Switches from events-lifecycle-v0 to lifecycle-events-v1
2021-02-14 17:42:19 +00:00
PepperCode1
cd0f1d33c1
Fix FabricMaterialBuilder.notSolid having the wrong return type (#1308)
Should be backwards compatible.
2021-02-14 17:41:59 +00:00
Player
be996d2566
Make event registration thread safe (#1305) 2021-02-14 17:41:08 +00:00
i509VCB
bf770ed853
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.
2021-02-14 17:40:46 +00:00
modmuss50
4681c750b8 Bump version 2021-01-27 19:11:07 +00:00
modmuss50
c045166c0f Crash with a more helpful message when a screen fails to call super.init 2021-01-27 19:07:33 +00:00
modmuss50
281de346c7
Modrith upload (#1280) 2021-01-25 18:19:18 +00:00
i509VCB
8e23c1d877
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
2021-01-25 18:17:17 +00:00
modmuss50
ca58154ad5 Version bump 2021-01-19 19:37:47 +00:00
modmuss50
e83e160270 1.16.5 2021-01-19 18:58:03 +00:00
i509VCB
daa38b3d82
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
2021-01-19 18:48:09 +00:00
PepperCode1
d795f854a9
Fix javadoc and typo (#1270)
* Update RenderContext.java

* Update WorldRenderEvents.java
2021-01-19 18:47:29 +00:00
Player
0d4d7e3458 Bump version 2021-01-05 13:20:01 +01:00
LambdAurora
a173a375b3 Fix dev env crash on Windows. 2021-01-05 12:17:10 +00:00
modmuss50
8004b36dc0 Bump version 2021-01-03 16:34:56 +00:00
Mitchell Skaggs
c7d5c83208
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>
2021-01-03 16:32:33 +00:00
modmuss50
36111fa0e1 Bump version 2021-01-01 14:50:13 +00:00
i509VCB
49c073f9a3
Workaround for shadowed fields from supermixins do not remap. (#1251) 2021-01-01 14:48:35 +00:00
modmuss50
cbe9176f9d Bump versions 2020-12-30 17:25:51 +00:00
yyny
00f5b23648
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
2020-12-30 16:45:02 +00:00
grondag
c26373137e
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>
2020-12-30 16:44:23 +00:00
Vincent Lee
6bec8f284f
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
2020-12-30 16:43:51 +00:00
i509VCB
79b23bee5b
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
2020-12-30 16:43:22 +00:00
i509VCB
d9daf26edb
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>
2020-12-30 16:42:53 +00:00
Maity
a404f47683
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
2020-12-30 16:42:33 +00:00
haykam821
ae85d92960
Fix missing metadata (#1233)
* Fix certain modules not having icons

* Add additional metadata to the fabric-particles-v1 module
2020-12-30 16:42:13 +00:00
cs127
6f23ac82f9
Added Persian translation (#1161)
* added persian translation

* small change
2020-12-30 16:41:19 +00:00
modmuss50
552549d507 Bump version 2020-12-23 20:21:41 +00:00
modmuss50
67abea83c2
Fix a number of issues with reload listeners (#1240)
* Fix resource reload listeners not being sorted.
Fix missing/broken reload listener keys.
Add a debug log line for missing reload keys
Add some basic tests.

* Undo adding new keys, we can look at this later.

* use AssertionError

* Fix test on server
2020-12-23 20:07:58 +00:00
LambdAurora
91ea196a60
Hot fix for resource loader. (#1239) 2020-12-23 15:57:19 +00:00
LambdAurora
73b29211a6
Resource loader improvements (#1186)
* Add resource pack activation type, programmer art API, group mod resource packs.

* Add missing license headers.

* Cleanup and add documentation.

* Fix performance issues.

* Rename invoker.

* Add comment in ReloadableResourceManagerImplMixin.

* Add package-info to resource loader.
2020-12-23 15:05:43 +00:00
modmuss50
2a4333d39b Bump version 2020-12-17 08:50:51 +00:00
i509VCB
d3799feeea
Fix v0 deprecation javadoc error (#1209) 2020-12-17 08:45:07 +00:00
i509VCB
64c503a93e
Check channels the server can receive, not channels the client can (#1224) 2020-12-17 08:44:44 +00:00
modmuss50
be155ae2b1 Bump version 2020-12-12 15:24:19 +00:00
modmuss50
303b32e872 Fix registry sync being applied when its not supposed to be.
Fixes #1217
Fixes #1216
2020-12-12 15:23:09 +00:00
modmuss50
a03e9879ac Bump version 2020-12-10 18:33:57 +00:00