Commit graph

453 commits

Author SHA1 Message Date
modmuss50
c1455e80c4 Version bump 2021-01-19 19:37:24 +00:00
i509VCB
9826cad8ac 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 19:02:02 +00:00
modmuss50
b254046e61 Bump version 2020-12-23 20:20:40 +00:00
i509VCB
7f3984e3f4
Backport networking v1 fixes from 1.16 to 1.15 (#1235)
* Fix registry sync being applied when its not supposed to be.

Fixes #1217
Fixes #1216

* Check channels the server can receive, not channels the client can (#1224)

* Fix v0 deprecation javadoc error (#1209)

Co-authored-by: modmuss50 <modmuss50@gmail.com>
2020-12-23 14:19:21 +00:00
i509VCB
463fa90e22 Fabric Networking API V1 (#1081)
* Networking api v1

Some final docs?

Licenses and testmod

Fix a bunch o imports and make things work for v1 (v0 is bork)

Make the testmod pass checkstyle and work

Docs for v1

* Deprecate v0 and implement using v1

* Drop files down one package due to package check error

* Fix issue with channel registration, add another testmod

* jaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaavadoc

* Make javadoc use `code`, move impl interface to package access

* this things

* Rename a few internal methods

* Mark all client side stuff client only, move client mixins

* Add null checks around the place, clarify some javadoc and method names

* Make FutureListeners uninstantiable

* Some internal nullable annotations

* An impl class I forgot to rename

* Some comments and clarify some client login handler javadoc

* Add a missing FunctionalInterface annotation

* Split play and login, move client stuff to right package

* No interface left behind

* Inline channel registries in api

* Login and play subpackages not needed

* Add helper method to create play custom packets

* hasGlobalChannel -> hasGlobalReceiver

* Just rename the collection method for now

* Inline PlayPacketSender into static methods

* Start on testmod idea for verifying dynamic registration

* Add client login events

* You don't say hello when talking to yourself.

Also more testmod stuff

* Make event names present tense

* Some javadoc and impl interface rename

* Change the test keybinding

* Begin working on dynamic reg

* Dynamic reg works, just need a lot of cleanup and reimpling global

* A few renames, readd global methods

* Try to reduce the amount of duplicate registration logic

* Reimplement dynamic accessors

* More impl

* Start reimplementing global receivers. Still very hacky solution.

* Reimplement some server global reciever stuff

* Add login init event for server login.

* Implement client login query start event

* Move event invocations into addon, don't dual register global recievers

* Finally reimplement global recievers for all networking phases

* A revelation: Send packets properly

This also finds the issue with screen getting the proper S2C channels, current on TODO list.

* Disconnect event does not need a packet sender

* Clarify, add methods to get channels net handler can recieve on client

* Unregister actually works now

* Bunch of null checks, add simpler login delay test for vanilla clients

* Add some debug logging entries, fix unregister on client's session reg

* Play channel event javadoc and rename login query handlers

* More channel -> channelName

* thisening

* Introduce the basics infrastructure for tracking global receivers

* Add more substantial javadoc to login connection events

* Javadoc, reimplement unreg methods on v0, 1 impl fix

* Implement tracking for global recievers

* Dont forget to start tracked sessions in 3/4 cases

* Global receiver docs and move methods in classes

* Complete null checks

* big boi javadoc part 1

* Finish the main javadoc, usage javadoc is left

* Set so has method is not needed

* Rename receiveable and sendable methods

* Add the two missing private ctors

* buildscript update to upstream

* Split out player finding stuff to networking player tracking API v1

Signed-off-by: liach <liach@users.noreply.github.com>

Forward v0 PlayerStream to new module, add entity track events

Rename module to player tracking

Well javadoc can make sense

Decide on tracking for the name

Update fabric-player-tracking-api-v1/src/main/java/net/fabricmc/fabric/api/networking/player/tracking/v1/package-info.java

Co-authored-by: Erlend Åmdal <erlend@aamdal.com>
Remove exceptions from javadoc that are not thrown

javadoc fix again

Handle a case where the player manager happens to be null

rename player tracking to player lookup

Yeet

* Cherrypick #1092

* Remove some redundant client networking methods, rename `(un)register` to `(un)registerReceiver`

* Simplify access to dynamic reg on client

* Param shifting, let users get sender.

* Warning about time and distance units

* Make sure these are client only

* Fix control flow in ClientPlayNetworking#send

* Correct example code javadoc

* javadoc correction in server login

* Put login delay tests behind system property

Also remove unnecessary junk added by old module that was merged together.

* Fix ordering so channel registrations during `PHASE`_INIT work

* Fix prod bug and an oversight

* Fix login when connecting to dedicated server

* Update registry sync to v0 to prevent issue with reg sync hanging client

* this is done

(cherry picked from commit fd11873744)
2020-12-09 20:32:24 +00:00
i509VCB
53275296f3 Add command to audit mixin environment in game (#1174)
* Add command to audit mixin environment in game

* Throw assertion error instead and add success message

Assertion errors will bypass the command exceptions being eaten.

(cherry picked from commit ab87788dbc)
2020-12-09 19:04:09 +00:00
modmuss50
96cce223bd Spin up a dedicated server on github actions + add run tasks for test mods. (#1163)
* Add test mod run tasks, add a very basic auto test server task

* License header

* Minor cleanup

* Fix bad depends

(cherry picked from commit ba858fb8b7)
2020-12-09 19:03:41 +00:00
modmuss50
40401c2d9d Set the java compiler --release arg when building on j9+.
Thanks to https://github.com/FabricMC/fabric-example-mod/pull/71 for this snippet.
2020-11-10 20:00:11 +00:00
modmuss50
48f4a83616 Version bump 2020-11-07 20:28:41 +00:00
Virtuoel
0e2079115c Fix items with sword tool tag not instantly breaking bamboo (#1110)
* Fix items with sword tool tag not instantly breaking bamboo

* Consolidate mixins

* Add Javadoc to injection
2020-11-07 20:13:42 +00:00
modmuss50
2297c32bb1 Merge remote-tracking branch 'origin/1.15' into 1.15 2020-11-07 20:10:59 +00:00
modmuss50
cb6aace0dc Remove build number from github 2020-11-07 20:10:28 +00:00
modmuss50
11c24c6cae Fix release 2020-11-07 20:10:24 +00:00
modmuss50
d5ca230c2d Publish releases using github actions (#1124)
* Publish releases using github actions

* # Conflicts:
#	build.gradle

* Remove build number + add task to check version has not already been released
2020-11-07 20:10:20 +00:00
modmuss50
de158c7e55 Version Bump 2020-10-05 19:41:08 +01:00
i509VCB
a760315f1d Write a proper readme (#1109)
* Write a proper readme

* Remove unnessecary comments

* Apply suggestions from code review

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

* Some changes for clarity

* Dev environment

Co-authored-by: haykam821 <24855774+haykam821@users.noreply.github.com>
2020-10-05 19:32:20 +01:00
Draylar
e6e5d8150e Add FabricChunkGeneratorType (#305)
* added dimensions-v1 & FabricChunkGeneratorType

* documentation & fixed supplier type

* fix issues; move to fabric-world-v1

* Fix build and add register

* change string param to identifier

* Factory to inner class of Type; move to object builders module.

* reformat type class

* clean up javadocs

* delete world package

* fix settings.gradle accidental change

* Merge branch '1.14' + checkstyle fixes

* remove trailing whitespace in settings.gradle

* change package to pass checkstyle

* v1 -> v1.gen

* Update fabric-object-builders-v0/src/main/java/net/fabricmc/fabric/api/world/v1/gen/FabricChunkGeneratorType.java

Co-Authored-By: liach <7806504+liach@users.noreply.github.com>

* make factory field final

* update javadocs

Co-authored-by: Dinolek <18579460+Dinolek@users.noreply.github.com>
Co-authored-by: liach <7806504+liach@users.noreply.github.com>
2020-10-05 19:31:49 +01:00
modmuss50
b125eefdec Bump version 2020-09-29 18:53:59 +01:00
i509VCB
3351c9d219
Copy over villager trade fix from 1.16 (#1106) 2020-09-29 18:46:37 +01:00
modmuss50
5452dd0911 Version bump 2020-09-18 18:47:19 +01:00
i509VCB
d6595b3d9e Fix bug with creating custom villager types and TradeOffer utilities. 2020-09-18 18:44:59 +01:00
modmuss50
0c90d94e36 Update gradle 2020-09-18 18:37:58 +01:00
modmuss50
df61ba6bd3 Update loom to 0.5 (#1060)
You may need to run `--refresh-dependencies` if you have odd issues. Please ask if you need help.
2020-09-18 18:34:49 +01:00
modmuss50
6b1a0d6d25 0.19.0 2020-08-21 17:37:22 +01:00
modmuss50
ec432e1979 1.15 cherry pick compile fixes 2020-08-21 17:31:07 +01:00
Geometrically
32491f53dd Block break event (#980)
* Block break event

* License headers + after event

* Before and after events, testmod

* Fix checkstyle

* Version bump, fix client method call

* Move to one event class

* Expand event parameters + javadoc

* Add cancelation event and move javadocs

* Move JavaDoc + Make success have same function as pass

* Fix success bug

* Fix documentation again, change approach

* Fix checkstyle

* Update fabric-events-interaction-v0/src/main/java/net/fabricmc/fabric/api/event/player/BlockBreakEvents.java

Co-authored-by: liach <7806504+liach@users.noreply.github.com>

* Update fabric-events-interaction-v0/src/main/java/net/fabricmc/fabric/api/event/player/BlockBreakEvents.java

Co-authored-by: liach <7806504+liach@users.noreply.github.com>

* Update fabric-events-interaction-v0/src/main/java/net/fabricmc/fabric/api/event/player/BlockBreakEvents.java

Co-authored-by: liach <7806504+liach@users.noreply.github.com>

* Update fabric-events-interaction-v0/src/main/java/net/fabricmc/fabric/api/event/player/BlockBreakEvents.java

Co-authored-by: liach <7806504+liach@users.noreply.github.com>

* Update fabric-events-interaction-v0/src/main/java/net/fabricmc/fabric/api/event/player/BlockBreakEvents.java

Co-authored-by: liach <7806504+liach@users.noreply.github.com>

* Update fabric-events-interaction-v0/src/main/java/net/fabricmc/fabric/api/event/player/BlockBreakEvents.java

Co-authored-by: liach <7806504+liach@users.noreply.github.com>

* Fix checkstyle

* Rename stuff

* fixes

* Update fabric-events-interaction-v0/src/main/java/net/fabricmc/fabric/api/event/player/PlayerBlockBreakEvents.java

Co-authored-by: i509VCB <i509vcb@gmail.com>

* Update fabric-events-interaction-v0/src/main/java/net/fabricmc/fabric/api/event/player/PlayerBlockBreakEvents.java

Co-authored-by: i509VCB <i509vcb@gmail.com>

* Update fabric-events-interaction-v0/src/main/java/net/fabricmc/fabric/impl/event/interaction/InteractionEventsRouter.java

Co-authored-by: i509VCB <i509vcb@gmail.com>

* Update fabric-events-interaction-v0/src/main/java/net/fabricmc/fabric/api/event/player/PlayerBlockBreakEvents.java

Co-authored-by: i509VCB <i509vcb@gmail.com>

* Rename Canceled Event Method Name

Co-authored-by: liach <7806504+liach@users.noreply.github.com>
Co-authored-by: i509VCB <i509vcb@gmail.com>
2020-08-21 17:27:12 +01:00
Juuxel
eb1e5e8520 Add FabricItemSettings and an API for custom item equipment slots (#956)
* Add FabricItemSettings and an API for custom item equipment slots

Closes #952.

* Bump module version

* Rename duck method to have fabric_ prefix and add Unique to mixin field

* Switch to FabricItemInternals + ExtraData like in FabricBlockSettings
2020-08-21 17:26:24 +01:00
shartte
db9ee7acda Fix dynamic tools not using their mining speed on modded blocks with mining level 0. (#1030) 2020-08-21 17:26:16 +01:00
modmuss50
7a905d1e9b Bump version 2020-08-13 18:20:12 +01:00
Juuxel
1778029ec0 Add ItemConvertible overload for BuiltinItemRendererRegistry (#955)
Closes #953.
2020-08-13 18:19:29 +01:00
modmuss50
650fc67bb0 Version Bump 2020-08-07 20:00:03 +01:00
i509VCB
cad0185e16 Add callback to allow registration of feature renderers. (#873)
* Add callback to allow registration of feature renderers.

* Laymans terms for those who don't map yarn for a living.

* Be a little less generic

* Dispatch events in a better spot, play with generics again, move to renderer-registries.

Also move this to render registries

* Handle players as well

* Tweak generics

* Hide acceptor impl

* Add actual testmod, fix where player events are fired, Simplify to returning a list.

* the old style worked fine

* registerRenderers

* Rename the event interface

* Javadoc fixes
2020-08-07 19:57:07 +01:00
modmuss50
f794278638 Version Bump 2020-07-29 20:05:49 +01:00
i509VCB
3d76399a1e Add world unload event (And functional interface annotations to events) (#895)
* Add world unload event

* Add functional interface annotations to all events
2020-07-29 20:00:08 +01:00
modmuss50
33df8bfb70 Fix ToolAttributeTest for 1.15 mappings 2020-07-24 16:45:22 +01:00
modmuss50
fd679945df Version bump 2020-07-24 16:43:03 +01:00
Snakefangox
dd72cbe428 Fix tool attributes mining levels (#855)
* Decoupled effective checks and mining speed

* Fixed typo

* Bump major for method sig change

* Fix semvar

* Re-add original API method

* Extend test mod

* Fix bug discovered by testing

* Change current to vanillaResult, update doc for postProcessMiningSpeed

* Remove </p> tag

* Add vanilla tests and rename vars
2020-07-24 16:42:36 +01:00
shartte
c2e942c659 Make Indigo more closely aligned with vanilla's behavior when (#901)
rendering flat-shaded quads. Use the cull-face (if present)
to determine where the light-value is being sampled from,
and use the light-face to apply diffuse lighting.
Also do not force the light-face to be set to the cull-face,
since some blocks use faces where these are both set and different
(see the insides of a Cauldron for example).
2020-07-24 16:41:08 +01:00
modmuss50
a990e9442e Version bump 2020-07-20 20:03:26 +01:00
shedaniel
06ca070952 Fix getBoundKey() recursion (#896)
* Fix getBoundKey() recursion

Signed-off-by: shedaniel <daniel@shedaniel.me>

* Change to underscore

Signed-off-by: shedaniel <daniel@shedaniel.me>
2020-07-20 19:44:20 +01:00
modmuss50
ae75e3bdf9 Version bump 2020-07-17 16:21:53 +01:00
modmuss50
dbdd067feb Backport Datapack reload events 2020-07-17 15:50:57 +01:00
i509VCB
564b358c7d Lifecycle Events: Part 2, Electric Boogaloo (#848)
* Add a few new server lifecycle events

Server starting, Load World, Before server resource reload, After server resource reload

* Save event

* Split world load into ServerWorldEvents, add failure event for data pack reload

* cause

* Merge fail and regular end.

* Present tense lol

* So we can just plainly specify the system properties

* use handleAsync instead
2020-07-17 15:09:58 +01:00
shartte
a2a03a90f8 Reuse TerrainFallbackConsumer to render vanilla models when (#870)
called from BlockModelRenderer. Fixes #869.
2020-07-17 15:08:53 +01:00
ㄗㄠˋ ㄑㄧˊ
57b0bb7ac0 github actions: add wrapper validation (#875)
It validates the checksums of Gradle Wrapper JAR files present in the source tree and fails if unknown Gradle Wrapper JAR files are found. https://github.com/gradle/wrapper-validation-action
2020-07-17 15:08:48 +01:00
modmuss50
e1769a8047 Disable actions cache, and increase gradle memory allocation a little. 2020-07-17 15:08:44 +01:00
modmuss50
16a64a2035 Github release publishing 2020-07-01 19:00:06 +01:00
modmuss50
c5d54d2e8f Bump version 2020-06-25 23:29:39 +01:00
modmuss50
451a3d52b8 Fix invalid testmod json 2020-06-25 22:41:39 +01:00
i509VCB
2f23104bdd
Lifecycle Events V1 [1.15] (#619)
* Lifecycle Events V1

Now includes Chunk and (Block)Entity (un)load events

* Add some tests to verify worlds are ticking in the log

* Lambda boogaloo

* Add some docs. Distinguish between a server starting to stop and server which has stopped.

* Split up test mods, some tweaks to (block)entity (un)load events.

Bind the ServerWorld being closed during shutdown to unload (block)entities.

* Shift around a few profiler variables and finalize

* Complete the tests, Block entities on server should be reliably tracked now.

Entities on the server obviously still need to be wrangled.

* Drop Server Entity Unload callback.

Believe me, this was a hard decision but it stands on the fact that about 20-40% of entities silently unload without going through the proper "unloadEntity" method in ServerWorld. No amount of debug hacks, double tracking unload events and even replacing the entity maps do not fix this issue. So I have decided to drop this from the feature set.

* checkstyle

* generic-events -> item-api

* Server start -> Server started

* Allow getting current server from Lifecycle

People have asked for this, but it is not encouraged for obvious reasons. Should be staged well enough to revert if we decide to.

* checkstyle lol

* update injection name

* Checkstyle lol: Redundant modifiers

* Add client starting, stopping and stopped callbacks.

* Loicenses

* Reorganize so each event category has it's own class.

Also this collapses the pretty widely reaching interfaces into more specific inner classes to avoid issues with generics.

* Some docs and slight name changes

* Add start tick callbacks to worlds, server and client

* Enhance some client related docs to life cycle

* Deprecate for reasons of discouraging singletonish server getter methods in lifecycle

* Add some description related to integrated server on server stopping.

* Add small test to verify tick starts are right spot of load

* Docs and a tiny bit more testing.

* Try clarifying client docs

* Drop a slightly unnessecary event

* Actually call and implement START_SERVER_TICK event

* Remove non-existent test

* again

* Refer to minecraft itself in client lifecycle docs

* Refer to Minecraft itself within ServerLifecycleEvents

* Remove primary server getters

* IJ DO YOU SPEAK RESOLVING IMPORTS

(cherry picked from commit c9257e8a11d8361469349f4171263121bb111af7)

* Prune the tests that shouldn't exist

* Listen here checkstyle you bugger

(cherry picked from commit 9701bba4002cec089c9d3738b1f226128078c130)

* Split up events to individual interfaces. Make Chunk events use WorldChunk instead.
2020-06-25 22:28:49 +01:00