Commit graph

154 commits

Author SHA1 Message Date
chris
b43e2db5dc
Merge branch 'master' into rp 2024-08-02 03:20:43 +02:00
Konicai
5019b5aded Fix Geyser Api BuildData directory 2024-07-31 20:01:31 -05:00
chris
f3ba5848c2 Extensions should specify geyser api version in the extension.yml (#3880)
* let extensions specify geyser api version instead of base api version

* fix spacing, @link formatting, properly check for compat

* Proper warning, update to API changes to also check patch version

* Bump base-api version

* adapt to new base api changes

* Actually bump to 2.4.1

* Update api/src/main/java/org/geysermc/geyser/api/extension/ExtensionDescription.java

* Address reviews

* Address reviews

* Update to latest base api changes; proper extension *human* version checking

* no need to apply a plugin, that's the default

---------

Co-authored-by: Konicai <71294714+Konicai@users.noreply.github.com>
2024-07-31 20:01:31 -05:00
chris
813d197887 Feature: API to switch items in the offhand/mainhand (#4819) 2024-07-31 20:01:31 -05:00
chris
48311f8771 Add a /geyser ping command (#4131)
* Init: Add /geyser ping command

* Block just console execution, not everything but console senders

* Use RTT as that seems to vary less wildly compared to getPing()

* Cleanup, use lang strings

* Add ping() method to GeyserConnection in api

* Update to cloud changes
2024-07-31 20:01:31 -05:00
Konicai
87ab51cb28 Cloud for commands (#3808)
Co-authored-by: onebeastchris <github@onechris.mozmail.com>
2024-07-31 20:01:31 -05:00
onebeastchris
e214fbe277 javadoc typos, log application type as info for now 2024-06-27 17:26:49 +02:00
chris
f56c182b94
Merge branch 'master' into rp 2024-06-20 12:29:41 +02:00
onebeastchris
ba78dbaf34 Add url codec creation method with no content key, remove boolean return to registerAll, fix typo 2024-06-20 12:28:08 +02:00
onebeastchris
2683b59406 Minor cleanup 2024-06-20 12:05:17 +02:00
chris
126d56d144
Fix: Ignore invalid block entity data sent by Java server (#4766)
* Proper block entity checks; ignore invalid block entity data sent by Java server

* fix intelliJ warning about potentially null block state

* Use auto-generated block entity types instead of hardcoding them

* undo some diff

* Update BlockRegistryPopulator.java

* Access block entity type of state by getting the block first

* deprecate JavaBlockState#hasBlockEntity

* Simplify check

* Add type check in JavaBlockEntityDataTranslator, ensure deprecated setBlockEntity() method still sets piston behavior

* nullability annotations

* yeet duplicate check
2024-06-19 23:48:55 +02:00
onebeastchris
86f645899f Code cleanup, less futures, more exceptions when needed 2024-06-19 23:35:36 +02:00
onebeastchris
507a79eb88 Merge remote-tracking branch 'refs/remotes/upstream/master' into rp
# Conflicts:
#	core/src/main/java/org/geysermc/geyser/GeyserImpl.java
#	core/src/main/java/org/geysermc/geyser/util/WebUtils.java
2024-06-19 20:09:10 +02:00
onebeastchris
8ae1150c80 Remove unused lectern code in ModWorldManager, fix spelling error in SessionLoginEvent 2024-06-07 19:47:21 +02:00
chris
0ca42308eb
Feature: Add API to show/hide GUI elements (#4705)
* Add API to show/hide GUI elements
* Bump version to 2.3.2
---------

Co-authored-by: Konicai <71294714+Konicai@users.noreply.github.com>
2024-06-03 21:00:08 +02:00
rtm516
b11a6d7176
Remove unofficial skin sources and add skin event for extensions (#4507)
* Remove ears and unoffical skin sources

* Remove supplyEars

* Cleanup and add SkinApplyEvent

* Add failed back to skin

* Accept suggestion on SkinGeometry

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

* Add javadoc and update copyright

* Remove old config options

* Make SkinApplyEvent a ConnectionEvent

* Add warning about third-party config options

* Update warning message

* Add javadoc to event

* Fix javadoc

* Ajust for review and bump version to 2.2.4

* Get rid of array and preserve original skin data

* Add originalSkin method to event

* Handle NonNull in SessionSkinApplyEvent

* Revert default copyright change

---------

Co-authored-by: chris <github@onechris.mozmail.com>
2024-05-14 14:22:54 +02:00
chris
e697eb3ae3
Feat: Make connection data exposed in api less prone to throw errors (#4604)
* Feat: Make connection data exposed in api less prone to throw errors

* address reviews

* review
2024-05-10 23:58:27 +02:00
onebeastchris
f7c65f38d1 properly annotate methods in the ServerTransferEvent 2024-05-02 12:51:32 +02:00
onebeastchris
f67c131b8d Forcibly disconnect players even if no server target was set in the JavaTransferEvent 2024-04-26 15:36:26 +02:00
onebeastchris
91a74603c7 idea: deal with cookies and transfer 2024-04-26 14:50:48 +02:00
rtm516
0972e4f4d7
Update CreativeCategory none to have the correct value (#4549) 2024-04-05 22:21:27 +01:00
rtm516
29bd896682
Fix CreativeCategory enum numbers (#4542) 2024-04-02 02:11:03 +01:00
Sage
fa441f1c7b
Add ConnectionRequestEvent (#4533)
* Add ConnectionRequestEvent and implement it

* Add debug message and use InetSocketAddress instead of string

* Provide both proxy and real client ip

And add some minor javadocs

* Make ProxyIp nullable

* Apply changes from pr

Co-authored-by: rtm516 <rtm516@users.noreply.github.com>

* Apply changes from pr

Co-authored-by: rtm516 <rtm516@users.noreply.github.com>

* Apply changes from pr

Co-authored-by: rtm516 <rtm516@users.noreply.github.com>

* Bump API version

* Dont JiJ common on mod platforms

---------

Co-authored-by: rtm516 <rtm516@users.noreply.github.com>
Co-authored-by: Kas-tle <26531652+Kas-tle@users.noreply.github.com>
2024-04-01 14:33:12 -07:00
rtm516
fbafdbb2a7
Allow NonVanillaCustomItemData to have a block assigned (#4530) 2024-03-31 12:01:59 +01:00
chris
b03818a0c4
Add attack damage indicator to custom items (#4495) 2024-03-18 19:41:36 +01:00
chris
0ad7c4325d
Fix: Workaround for recipes involving custom items to show up in the recipe book (#4484)
* Allow adding custom items to the creative inventory in order for recipes outputting said custom items to work

* yeet includeInCreativeInventory as it would break existing nonvanilla extensions - and is pretty pointless anyways

* rename mappings to `creative_group` and `creative_category`

* delete outdated comment
2024-03-10 23:38:38 +01:00
rtm516
3c4a1a82c9
Deprecate unit cube in block components (#4470)
* Depricate unit cube

* Didn't mean to remove that
2024-03-02 01:56:35 +01:00
Redned
97fc2de42f
NeoForge Platform Support (#3781)
* Initial work on Forge platform

* Rework modded platforms to use a common module

* Add support for integrated worlds on modded platforms

* Fix classload errors and move mixins to shared module

* Fix Fabric mixins and check min height in mod world manager

* Add Forge command support

* Add back modrinth publishing

* Don't apply application plugin to shared mod sources

* Fix docs

* Delete unused class

* Clean up repositories

* - Update to 1.20.2
- set custom refmap name
- fixed console commands crashing the server (hasPermission now accepts CommandSourceStack instead of Player)
- Forge wants fastutil relocated, so be it

Current issues:
- ClassNotFound exceptions with classes that are clearly present

* - Fix ClassNotFound errors on Forge due to weird Classloader
- Dont relocate gson

* merge upstream

* oh no

* Bump lombok, architectury-loom

* init: neoforge 1.20.4 support

* NeoForge builds

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>

* Archive neoforge artifacts

* transformForge -> transformNeoForge

* Neoforge boots!
* Fix mixins on neoforge
* Update build/pr file names
* Update mods.toml to new neoforge standard
* Fix refmap naming

* more fixes
- no need to include gson
- cleanup nullable/nonnull annotations
- add more info to geyser dumps on neoforge

* yeet platform executor

* yet another temp branch to figure out the runServer task

* yeet transitive dependency, that cant be right

* Attempt at getting the runServer task to work, part two

* Revert the changes for the runServer task, try and shut down the injector

* Remove spigot weird bug workaround, shut down properly
Also add a compileOnly dependency for the mod module to get rid of spammy false warnings

* Update to latest restart changes
- fix duplicate nodes crashing neoforge
- connector -> geyser in GeyserModCommandExecutor
- create command manager early to fix issues with permission gather event

* Consistent NeoForge spelling, move some dependencies to the version toml

* Add lombok to version catalogue

* Add plugins to version catalogue

* revert move to buildSrc

* Create `assets/geyser/icon.png` to reference icon from a single file on standalone/neoforge/fabric

* add fabric permissions api to libs.versions.toml

---------

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
Co-authored-by: onebeastchris <github@onechris.mozmail.com>
Co-authored-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
2024-02-23 17:58:39 +01:00
RK_01
aca368e332
Implemented ViaProxy bootstrap (#4201)
* Implemented ViaProxy bootstrap

* Applied requested changes to code

* Override indra settings to Java 17

* Removed explicit java source/target version

* Added ViaProxy artifact to build.yml

* Added ViaProxy artifact to pullrequest.yml

* Updated ViaProxy API usage

* Implemented floodgate support for ViaProxy

* Depend on stable ViaProxy release

* Initialize command manager and ping passthrough before Geyser#start

* Revert "Initialize command manager and ping passthrough before Geyser#start"

This reverts commit 39356071c4.

* Some ping passthrough improvements

* Merged code properly

* Updated ViaProxy API usage

* Implemented better command handling

* Updated ViaProxy and Geyser API usage

* Combine bootstrap and plugin into one class

* Minor code improvements

* Call Geyser shutdown on plugin disable

* Only call disable if Geyser was enabled once

* Don't send two shutdown done messages

* Use setter for enabled boolean
2024-02-19 22:25:49 +01:00
onebeastchris
a4fa2e611c Merge remote-tracking branch 'upstream/master' into rp
# Conflicts:
#	core/src/main/java/org/geysermc/geyser/network/UpstreamPacketHandler.java
#	core/src/main/java/org/geysermc/geyser/registry/loader/ProviderRegistryLoader.java
2024-02-16 17:19:23 +01:00
chris
6a51d8298f
Feature: Rework startup logic (#4377)
* This makes `geyser reload` work the same across all platforms. For example, it ensures that we reload the config to the greatest extent possible (with the exception of compression/injection settings). Additionally, this clears up issues where Extensions were previously disabled during reloading - instead, the new Pre and Post reload events allow extensions to reload whatever necessary on their own.
2024-02-14 12:50:50 +01:00
chris
f555dc0a92
Feature: Camera/Input locking API (#4332)
Adds API methods to control player cameras - including fancy transitions,  color fades, or simple input locks.
2024-01-31 11:21:06 +01:00
onebeastchris
2e776c4561 Allow null content key 2024-01-26 19:01:12 +01:00
onebeastchris
4d99250b27 Merge remote-tracking branch 'upstream/master' into rp 2024-01-25 14:44:38 +01:00
chris
61b3ffd0de
Feature: Allow setting a different port in the motd (#4293)
* Allow changing the broadcasted port using a system property. This may be needed if the port Geyser runs on & the port Bedrock players connect on do not match - e.g. due to port forwarding/different routing.

* initial stab at making the broadcast port an (unsafe) config option

* Automatically set broadcast port to be the bind port unless manually overridden

* Warn about broadcast port mismatch

* Use 0 instead of -1 as indicator to broadcast the port geyser is running on
2024-01-24 22:28:03 +01:00
rtm516
3f577f4128
Add fetching MC versions and Console from the extensions API (#4168)
* Add fetching MC versions and Console from the extensions API

* Address reviews, expose custom MinecraftVersion interface

* Rename of McVersion -> MinecraftVersionImpl; proper nonnull annotation

* fluent consoleCommandSource(), change MinecraftVersion#name() to versionString()

* Javadocs adjustments

* Create impl package and move `MinecraftVersionImpl` there

* api version bump

---------

Co-authored-by: onebeastchris <github@onechris.mozmail.com>
2024-01-24 22:20:30 +01:00
onebeastchris
d2622a477b Add a registerAll method to register a collection of resource packs easily 2024-01-16 00:47:52 +01:00
onebeastchris
0ac91ebc25 Merge remote-tracking branch 'upstream/master' into rp
# Conflicts:
#	core/src/main/java/org/geysermc/geyser/configuration/GeyserConfiguration.java
#	core/src/main/java/org/geysermc/geyser/network/UpstreamPacketHandler.java
2023-12-21 20:24:39 +01:00
chris
95d65350e4
Project wide syntax/annotation cleanup (#4238)
Co-authored-by: Konicai <71294714+Konicai@users.noreply.github.com>
2023-12-05 18:54:42 -05:00
chris
0ebb7232f9
Add SessionDisconnectEvent (#4052)
* Add SessionDisconnectEvent

* Move disconnect event calling to UpstreamSession, debug double calling issues

* Prevent duplicate disconnect calling

* Tidy up disconnection logic, ensure SessionDisconnectEvent is always fired - but only once. Fix /geyser reload command
2023-11-10 23:44:38 +01:00
onebeastchris
cdd2aba244 Merge remote-tracking branch 'upstream/master' into rp 2023-11-09 12:14:09 +01:00
onebeastchris
0004f5b051 Testing: Don't require application/zip or size or weird zip format, since it seems to work without it !? 2023-11-09 12:13:59 +01:00
chris
f40ca2004e
Add ability to set molang tags for custom items (#4041)
* Start on custom molang tags with custom items

* geyser_custom instead of geyser item tag

* Address reviews, add custom namespace ("geyser_custom") to tags

* use isBlank() instead of isEmpty()

* More efficient item tag setting
Co-authored-by: Konicai <71294714+konicai@users.noreply.github.com>

* tags instead of temp

* Merge in master, adapt to changes in the MappingsReader, delete unused ToolBreakSpeedsUtils class

* oops

* clean diff

* Change namespace from `geyser_custom` to just `geyser`

* Don't force a namespace at all; just like blocks don't

* Tags for items are now, as blocks, NonNull. Additionally, calling the .tags() builder multiple times will not add both sets of tags, but replace the existing tag set

* Remove @NotNull usage in favor of @NonNull

* Allow setting null for tags, but ensure that .tags() is always non-null

* Fix nullable annotation on tags method in the builder interface
2023-11-09 08:44:13 +01:00
onebeastchris
27c1562438 remove outdated javadocs 2023-10-17 19:21:24 +02:00
onebeastchris
b9c5bddb97 Remove CDNEntry; those do not work as expected.
Instead:
- add UrlPackCodec & GeyserUrlPackCodec
- try and provide the resource pack via a stream from the url - either because the client does not support packs via the url, or because it failed to get the packs
2023-10-17 19:06:11 +02:00
onebeastchris
94f2ea9b57 Rename cdn-resource-packs to resource-pack-urls, fix test, remove duplicate deprecation annotation 2023-10-10 23:02:37 +02:00
onebeastchris
f74d36a1f9 Remove forRemoval 2023-10-10 22:08:46 +02:00
onebeastchris
dbfc153b04 - Don't require configuring the packId, just the link instead
- Deprecate GeyserLoadResourcePacksEvent in favor of GeyserDefineResourcePacksEvent
- Load CDNentries properly
2023-10-10 21:45:42 +02:00
onebeastchris
02d6473dc5 Small tweaks: record formatting/javadocs 2023-10-10 15:48:25 +02:00
onebeastchris
68516a8b0b Initial stab at implementing 1.20.30's new CDN feature for resource packs 2023-10-10 15:26:13 +02:00