Commit graph

1476 commits

Author SHA1 Message Date
onebeastchris
ba6b90c288 Account for packet potentially being null in the PacketErrorEvent
Some checks failed
Java CI with Gradle / build (push) Has been cancelled
Deploy / build (push) Has been cancelled
2024-12-23 02:58:28 +08:00
onebeastchris
29f4e867de Merge remote-tracking branch 'upstream/master' into feature/1.21.4
Some checks failed
Java CI with Gradle / build (push) Has been cancelled
Deploy / build (push) Has been cancelled
# Conflicts:
#	protocol/build.gradle.kts
2024-12-12 09:20:16 +08:00
chris
667e02d38c
1.21.2 release (#870)
Some checks failed
Java CI with Gradle / build (push) Has been cancelled
Deploy / build (push) Has been cancelled
* 1.21.2 release

* Update minecraftauth, adventure to latest releases
2024-12-12 09:11:01 +08:00
Valaphee The Meerkat
c99cc90b45
Fix varlong serialization
Some checks failed
Java CI with Gradle / build (push) Has been cancelled
Deploy / build (push) Has been cancelled
Fix varlong serialization
2024-12-09 23:40:45 +08:00
onebeastchris
d069361202 Add packet class to PacketErrorEvent, add missing EntityEvent
Some checks failed
Java CI with Gradle / build (push) Has been cancelled
Deploy / build (push) Has been cancelled
2024-12-06 21:04:34 +08:00
onebeastchris
9332151a49 Gracefully fail on unknown types/values in ClientboundBlockEventPacket, update to 1.21.4 release
Some checks failed
Java CI with Gradle / build (push) Has been cancelled
Deploy / build (push) Has been cancelled
2024-12-05 20:14:07 +08:00
chris
ce8109ef3b
Merge pull request #872 from AlexProgrammerDE/feature/1.21.4
Some checks are pending
Java CI with Gradle / build (push) Waiting to run
Deploy / build (push) Waiting to run
Merge master into 1.21.4 again
2024-12-05 15:31:01 +08:00
AlexProgrammerDE
052730fd32 Implement missing ticking 2024-12-05 08:20:03 +01:00
AlexProgrammerDE
0ed0f311f4 Merge remote-tracking branch 'upstream/master' into feature/1.21.4 2024-12-05 08:14:42 +01:00
basaigh
25df601193
1.21.4-rc3
Some checks failed
Java CI with Gradle / build (push) Has been cancelled
Deploy / build (push) Has been cancelled
2024-12-01 21:22:30 +00:00
basaigh
aa7844fe8b 24w46a
Some checks failed
Java CI with Gradle / build (push) Has been cancelled
Deploy / build (push) Has been cancelled
2024-11-28 18:35:33 +00:00
onebeastchris
54d3fc21a6 Fix TrailParticleData typo
Some checks are pending
Java CI with Gradle / build (push) Waiting to run
Deploy / build (push) Waiting to run
2024-11-28 00:43:54 +08:00
onebeastchris
e7fb86682b Let's *actually* run on feature branches 2024-11-28 00:32:12 +08:00
onebeastchris
120d7276a6 let's publish snapshots! 2024-11-28 00:10:39 +08:00
Alex
6b2ec667c1
Improve MCPL ticking data and behaviour (#865)
Some checks failed
Java CI with Gradle / build (push) Has been cancelled
Deploy / build (push) Has been cancelled
* Move packets to proper packages & implement game thread metadata for every packet

* Add new ticking info for 1.21.3

Notable info:
ServerboundSelectBundleItemPacket is not ticked, it's instant
ClientboundSetHeldSlotPacket is already ticked as it is just renamed ClientboundSetCarriedItemPacket

* Expose packet handler executor

* Do not tick delimiter packet

* Allow server to define packet handler executor factory

* Update protocol/src/main/java/org/geysermc/mcprotocollib/network/packet/Packet.java

Co-authored-by: chris <github@onechris.mozmail.com>

---------

Co-authored-by: chris <github@onechris.mozmail.com>
2024-11-28 00:06:58 +08:00
Alex
9037cb30eb
Move reusable methods to a separate helper class (#863)
Some checks are pending
Java CI with Gradle / build (push) Waiting to run
Deploy / build (push) Waiting to run
* Move reusable methods to a separate helper class

This way we allow other apps such as Geyser LocalSession to use these currently private methods without needing to copy over the code.

* Remove unused field
2024-11-27 21:07:43 +08:00
basaigh
38921fd992 24w45a 2024-11-27 00:16:41 +00:00
basaigh
2e07e5b805 24w44a 2024-11-26 23:25:09 +00:00
Eclipse
8150091888
Fix equippable component writing (#868)
Some checks failed
Java CI with Gradle / build (push) Has been cancelled
Deploy / build (push) Has been cancelled
2024-11-07 19:03:03 +08:00
basaigh
88188c5b39
Merge pull request #867 from AJ-Ferguson/lock-nbt
Read lock data component as compound nbt
2024-11-07 10:07:35 +00:00
AJ Ferguson
f82aa5bc87 Read lock data component as compound nbt 2024-11-07 04:44:11 -05:00
Camotoy
d5f5ae0dc4
Merge remote-tracking branch 'origin/master' into feature/1.21.2
Some checks failed
Java CI with Gradle / build (push) Has been cancelled
Deploy / build (push) Has been cancelled
2024-11-02 21:17:06 -04:00
Camotoy
53dbc06342
Bump to 1.21.3 + small optimizations
Some checks failed
Java CI with Gradle / build (push) Has been cancelled
2024-11-02 21:13:31 -04:00
Eclipse
b3df3514c9
Remove properties from food properties that no longer exist (#866)
Some checks failed
Java CI with Gradle / build (push) Has been cancelled
2024-10-31 15:00:06 -04:00
chris
e71d7df8c1
release 1.21 (#861)
Some checks failed
Java CI with Gradle / build (push) Has been cancelled
Deploy / build (push) Has been cancelled
2024-10-30 15:30:34 -04:00
Camotoy
3b4afeb410
Old class removal and other touchups
Some checks failed
Java CI with Gradle / build (push) Has been cancelled
2024-10-22 23:22:32 -04:00
AJ Ferguson
fb2d30254a Fix packet id ClientboundEntityPositionSyncPacket
Some checks failed
Java CI with Gradle / build (push) Has been cancelled
2024-10-20 23:26:40 -04:00
AJ Ferguson
a4bfe67233 Add ParticleStatus to ServerboundClientInformationPacket 2024-10-20 22:39:05 -04:00
Camotoy
293f62ecf1
Add CREAKING_HEART block entity type
Some checks are pending
Java CI with Gradle / build (push) Waiting to run
2024-10-19 22:33:29 -04:00
Camotoy
748ab283bf
Make RecipeBookAdd#Entry public 2024-10-19 22:13:03 -04:00
Camotoy
f4c07f23b5
Merge remote-tracking branch 'origin/master' into feature/1.21.2
Some checks failed
Java CI with Gradle / build (push) Has been cancelled
2024-10-17 14:08:01 -04:00
basaigh
9603c57779 1.21.2-pre3
Some checks are pending
Java CI with Gradle / build (push) Waiting to run
2024-10-16 19:46:42 +01:00
basaigh
4c2ecc1ab9 1.21.2-pre1 2024-10-16 19:42:53 +01:00
basaigh
ca629e2fef Temp fix for RecipesTest and fix ItemStack size encoding. 2024-10-16 18:42:13 +01:00
basaigh
eb64c3850c Refactor Ingredient to HolderSet
Some checks failed
Java CI with Gradle / build (push) Has been cancelled
2024-10-13 16:15:58 +01:00
basaigh
39b50c44a7 24w40a(?)
Some checks are pending
Java CI with Gradle / build (push) Waiting to run
2024-10-12 22:01:37 +01:00
Alex
fda25b5929
Fix/proxy protocol (#862)
Some checks failed
Java CI with Gradle / build (push) Has been cancelled
Deploy / build (push) Has been cancelled
2024-10-10 11:59:34 -04:00
Alex
f8460356db
Split incoming/outgoing packet registry, transition protocol states correctly (#841)
Some checks failed
Java CI with Gradle / build (push) Has been cancelled
Deploy / build (push) Has been cancelled
* Initial code changes

* Make it compile

* Small inlining

* Make less detectable by anticheats and fix keepalive during configuration

* Fix keepalive edge case

* Properly switch inbound protocol in server listener

* Add flow control

* Make toggling automatic keepalive work in another way

* Remove ping pong packets again

* Address review

* Handle keepalive in configuration

* Only spawn keepalive after login is acknowledged

* Prevent very unlikely race conditions with keepalive being switched during a task

* Add debug log for packet serialization and state switching

* Add one more debug print

* Update protocol/src/main/java/org/geysermc/mcprotocollib/network/Session.java

Co-authored-by: chris <github@onechris.mozmail.com>

* Update protocol/src/main/java/org/geysermc/mcprotocollib/protocol/MinecraftProtocol.java

Co-authored-by: chris <github@onechris.mozmail.com>

* Update protocol/src/main/java/org/geysermc/mcprotocollib/protocol/MinecraftProtocol.java

Co-authored-by: chris <github@onechris.mozmail.com>

* Mark packet as nonnull

* Fix outbound writing race conditions

* Ensure packets are always sent on the event loop

This replicates the same approach Mojang uses in their networking code.

* Reduce log verbosity

* Put errors into debug

* Update protocol/src/main/java/org/geysermc/mcprotocollib/network/tcp/TcpClientSession.java

Co-authored-by: chris <github@onechris.mozmail.com>

* Add comment to always running in event loop

* Handle auto read earlier to prevent race conditions

* Make instance dynamic

* Revert "Make instance dynamic"

This reverts commit 7f8affbdc5.

* Make flush packet priority

* Do not hide original line that is the cause of the exception

* Cancel packet using exception rather than return

* Properly iterate through parents

* Set log level to debug for unit tests

* Revert "Properly iterate through parents"

This reverts commit 4e2b64d983.

* Revert "Cancel packet using exception rather than return"

This reverts commit 6507e77bbe.

* Add write length filter

* Reuse bytebuf for fake flush to avoid unnecessary allocations

* Make tests happy

* Remake dropping packets

* Update protocol/src/main/java/org/geysermc/mcprotocollib/network/tcp/TcpServer.java

Co-authored-by: chris <github@onechris.mozmail.com>

* Fix space

* Rename to flush packet

* Add mojmap reference

* Share keepalive code

* Fix compilation

* Revert a tiny bit closer to vanilla

* Inline lambda

* Inherit annotation

* Inherit annotation 2

* Use checkerframework annotation

* Fixup grammar slightly

* Add reset states method

* Add log marker for packet logging

---------

Co-authored-by: chris <github@onechris.mozmail.com>
2024-10-08 21:45:26 +08:00
basaigh
1702924c95 24w39a
Some checks failed
Java CI with Gradle / build (push) Has been cancelled
2024-10-03 17:23:35 +01:00
basaigh
2b3d8cbec1 24w38a 2024-10-03 17:07:45 +01:00
basaigh
25103382a3 24w37a 2024-10-03 16:26:47 +01:00
basaigh
7f7445f6f0 24w36a
Some checks failed
Java CI with Gradle / build (push) Has been cancelled
2024-09-25 23:07:03 +01:00
Alex
b2c9268633
Implement static compression and encryption pipeline (#858)
Some checks failed
Java CI with Gradle / build (push) Has been cancelled
Deploy / build (push) Has been cancelled
* Implement static compression and encryption pipeline

* Update protocol/src/main/java/org/geysermc/mcprotocollib/network/Session.java

Co-authored-by: chris <github@onechris.mozmail.com>

* Update protocol/src/main/java/org/geysermc/mcprotocollib/network/Session.java

Co-authored-by: chris <github@onechris.mozmail.com>

* Update protocol/src/main/java/org/geysermc/mcprotocollib/network/Session.java

Co-authored-by: chris <github@onechris.mozmail.com>

* Update Session.java

* Update protocol/src/main/java/org/geysermc/mcprotocollib/network/tcp/TcpSession.java

Co-authored-by: Konicai <71294714+Konicai@users.noreply.github.com>

* Use temp var

* Add nullable annotation

* enable -> create

* Rename encryption method

* Fix compression id

* Fix -1 compression in ServerListener

* Compress and encrypt in unit tests

---------

Co-authored-by: chris <github@onechris.mozmail.com>
Co-authored-by: Konicai <71294714+Konicai@users.noreply.github.com>
2024-09-20 00:40:36 +08:00
Alex
de6bbe5f82
Allow accessing backing class for a channel instead of only its factory (#859)
Some checks failed
Java CI with Gradle / build (push) Has been cancelled
Deploy / build (push) Has been cancelled
Some netty libraries that are poorly coded only accept classes. Example: https://github.com/CloudburstMC/Network/pull/42
2024-09-16 21:44:28 -04:00
Alex
4148fa9b1f
Static sizer and timeout handlers in the pipeline (#833)
Some checks failed
Java CI with Gradle / build (push) Has been cancelled
Deploy / build (push) Has been cancelled
* Improve pipeline

This simplifies all pipeline code and ensures some listeners like the sizer are always present. The code already assumed that the sizer is always there and thus causes issues. The sizer can be deactivated still now and has pretty much no performance losses from this. The profit from this PR is that there is less logic with modifying the PR and thus developers interacting with the channel can assume specific things about the order and placements of elements in the pipeline. This will be useful once ViaVersion is supported, and it is expected that certain elements always are in the pipeline and don't change. My plan is to also always have an encryption and compression handler in the pipeline that is controlled via AttributeKeys from netty, but for that first #828 needs to be merged. So this PR only completes the goal partially, but that's fine. PR is ready for review like it is right now.

* Revert some stuff

* Fix channel race condition

* Fix closing race condition

* Prevent client race conditions.

* Fix test failure, idk how, idk why, but it works now

* Address review

* Update protocol/src/main/java/org/geysermc/mcprotocollib/network/BuiltinFlags.java

Co-authored-by: Konicai <71294714+Konicai@users.noreply.github.com>

* Update protocol/src/main/java/org/geysermc/mcprotocollib/network/BuiltinFlags.java

Co-authored-by: Konicai <71294714+Konicai@users.noreply.github.com>

* Update protocol/src/main/java/org/geysermc/mcprotocollib/network/BuiltinFlags.java

Co-authored-by: chris <github@onechris.mozmail.com>

* Update protocol/src/main/java/org/geysermc/mcprotocollib/network/tcp/TcpServer.java

Co-authored-by: chris <github@onechris.mozmail.com>

* Update protocol/src/main/java/org/geysermc/mcprotocollib/network/BuiltinFlags.java

Co-authored-by: chris <github@onechris.mozmail.com>

* Update protocol/src/main/java/org/geysermc/mcprotocollib/network/BuiltinFlags.java

Co-authored-by: chris <github@onechris.mozmail.com>

* Update protocol/src/main/java/org/geysermc/mcprotocollib/network/tcp/TcpServer.java

Co-authored-by: chris <github@onechris.mozmail.com>

* Update protocol/src/main/java/org/geysermc/mcprotocollib/network/tcp/TcpServer.java

Co-authored-by: chris <github@onechris.mozmail.com>

* Update protocol/src/main/java/org/geysermc/mcprotocollib/network/tcp/TcpServer.java

Co-authored-by: chris <github@onechris.mozmail.com>

---------

Co-authored-by: Konicai <71294714+Konicai@users.noreply.github.com>
Co-authored-by: chris <github@onechris.mozmail.com>
2024-09-10 15:16:58 +08:00
masmc05
716f229e65
Support shouldAuthenticate = false (#856)
Some checks failed
Java CI with Gradle / build (push) Has been cancelled
Deploy / build (push) Has been cancelled
2024-09-03 00:34:43 +02:00
basaigh
2f2a2e2065 24w35a
Some checks failed
Java CI with Gradle / build (push) Has been cancelled
2024-08-29 15:41:37 +01:00
basaigh
ff9ab9edf0 24w34a 2024-08-29 15:03:51 +01:00
basaigh
c69a8c3537 24w33a 2024-08-24 15:15:45 +01:00
waterghost-2046
e2af5db487
Update README.md (#844) 2024-08-20 12:00:28 +02:00