Commit graph

392 commits

Author SHA1 Message Date
Kas-tle
3fa7952936
1.20.80 Support and Protocol Changes (#4561)
* Make evil more harder

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

* Deregister more unused packets

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

* Add more unused packets

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

* Pin protocol to 68dc192

* Correction

* Update Protocol

* More kicking

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

* stop reading when there is no item to read (#9)

* Bump protocol

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

* 1.20.80

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

* Remove unused postinitchannel GeyserServerInitializer

* Pull protocol jitpack from cloudburst again

* Actually builds

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

* Bump protocol to fix BossEventPacket & EmotePacket

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

* Add remove before merge comment

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

* Bump protocol to fix BlockEntityDataPacket and ignore serverbound BossEventPacket

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

* Bump protocol & add more illegal/ignored packets

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

* Remove deprecated packet

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

* Ignore ClientCacheStatusPacket instead of disallow

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

* Define static serializers

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

* Less static class nonsense more correct order

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

* Remove unused import

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

* Bump protocol

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

* Move codec processing to CodecProcessor

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

* Falsify recipe symetry assumption

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

* Update Protocol for 2 wrong packet IDs & 5 wrong directions

* Jitpack protocol from Geyser repo

---------

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
Co-authored-by: chris <github@onechris.mozmail.com>
2024-04-23 09:16:18 -07:00
AJ Ferguson
810c9ced72
Fix filled cauldrons only showing as water (#4585)
* Fix filled cauldrons only showing as water

* Update comment
2024-04-20 17:21:39 -04:00
ookiegajwa
0cc2921eda
Translate scoreboard display name and number format (#4567)
The following caveats apply because selectively removing or modifying the score numbers on Bedrock cannot be done without removing all of them:
* "blank" and "styled" number formats are ignored for "list" and "sidebar" display slots
* The "fixed" number format is appended to the end of the "list" and "sidebar" entry names instead of replacing the score number
* The "below_name" slot has no limitations and displays identically to Java
2024-04-18 21:23:33 -04:00
AJ Ferguson
815456c549
Reset metadata and attributes if needed when respawning (#4566)
* Reset metadata and attributes if needed when respawning

* Minor edits

* Reset attributes in JavaLoginTranslator

* Fix client bug when updating absorption and health in the same tick
2024-04-18 00:16:41 -04:00
AJ Ferguson
576a1b7d7a
Remove map cache (#4576) 2024-04-17 17:53:56 -04:00
chris
7a20a190a0
Feature: Structure block translation (#4521)
* ported camotoy's attempt of implementing structure blocks, removal of a few TODO's

* no more parsing of java structure templates

* Don't attempt to re-request structure size

* ensure we can load structures in even if we know the size

* init: send correct structure size/offset/rotation to java, not fully working yet

* restore offsets so we are sending correct values to the java server regarding where we want the structure to be placed

* something something mirror

* attempt at proper offsets for mirroring AND rotations. this was not fun at all

* rotation, mirror, offsetting all seem to work

* undo import changes

* fix NPE

* Proper handling of empty structures, ensure that we can clear the structure block outline when a zero vector was sent for structure size

* oops

* Update core/src/main/java/org/geysermc/geyser/session/cache/StructureBlockCache.java

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

* Update core/src/main/java/org/geysermc/geyser/translator/level/block/entity/StructureBlockBlockEntityTranslator.java

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

* Update core/src/main/java/org/geysermc/geyser/translator/protocol/bedrock/BedrockStructureBlockUpdateTranslator.java

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

* Update core/src/main/java/org/geysermc/geyser/translator/protocol/bedrock/BedrockStructureTemplateDataRequestTranslator.java

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

* consolidate java structure sending into one method

* fix merge conflict
---------

Co-authored-by: rtm516 <rtm516@users.noreply.github.com>
2024-04-17 23:21:25 +02:00
AJ Ferguson
c8475d8100
Always remove entities from cache (#4577)
* Always remove entities from cache

* Despawn throwable entities in the void
2024-04-17 03:18:17 -04:00
Eclipse
ca0e226aac
Fix breaking of custom head blocks added by Polymer by adding a default fallback to block mappings (#4557) 2024-04-11 03:05:15 +02:00
chris
85908690a3
Revert inventory "fix" that's causing issues with quickly opening & closing inventories (#4523) 2024-03-27 01:47:21 +01:00
rtm516
4ea94f89a2
Fix entity pick request for cherry and bamboo boats (#4522) 2024-03-24 21:30:00 +00:00
chris
112f4ddb8d
Fix: Inventory handling when client tries to open the player inventory when it shouldn't (#4499)
* attempt at fixing <https://github.com/GeyserMC/Geyser/issues/4497>

* Fix wrong handling of OPEN_INVENTORY case in BedrockInteractTranslator
2024-03-15 17:33:48 +01:00
chris
c91ee53788
Fix virtual lecterns - again (#4494) 2024-03-14 10:27:49 +01:00
chris
39b05e284e
update protocol lib to resolve command crashing (#4493) 2024-03-13 12:25:30 -07:00
Kas-tle
a9467cf150
Temporary bad fix for command crashing (#4490)
Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
2024-03-13 02:54:39 -07:00
Kas-tle
1df63c6de8
Support Bedrock 1.20.70 (#4477)
* Support 1.20.70

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

* Update readme

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

* Use 1.20.70 mappings

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

* Creative lectern drops work but not survival yet

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

* Fix lectern book pickup in survival

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

* Add copyright notices to new files

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

* Temp fix for incorrect creative_items from Cloudburst/Data

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

* Fix item frame breaking in creative

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

* Clarify what to remove when 1.20.60 support is dropped

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

* Don't use dim change enum pre 1.20.70

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

---------

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
2024-03-11 00:29:27 -07:00
Kas-tle
a0fd720e7c
Fix client crash issue if empty recipe is sent (#4485)
* Fix client crash issue if empty recipe is sent

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

* More efficent order

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

* Recipes are recipies

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

---------

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
2024-03-11 00:03:37 -07:00
chris
32f66371d9
Should resolve https://github.com/GeyserMC/Geyser/issues/4121 (#4481) 2024-03-08 21:30:17 +00:00
chris
79154f3d0c
Fix: Lecterns not opening when there is no lectern cache (#4476)
... the LecternCache doesn't always exist. Oops.
2024-03-04 00:39:57 +01:00
chris
5d95bf65a6
Fix lecterns on 1.20.60, add support for virtual books (#4471)
* Fix lecterns on 1.20.60, start on virtual lecterns

* Fix: virtual books & actual books opening twice, resolve other issues, remove debug

* undo some unnecessary diff

* Don't try to send virtual books to pre 1.20.60 clients

* address review by camotoy
2024-03-02 03:21:31 +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
chris
19a3dc3c4b
Support Bedrock 1.20.60 (#4415)
* Start on 1.20.60 support

* fix dimension switching

* Fix custom item icons... thanks mojang

* fix custom blocks/custom skulls breaking all block mappings

* - replace 10000 with static final variable

* fix: creative items not being found

* versioned custom item registration

* fix compression level setting
* show 1.20.61 as supported
2024-02-06 20:11:17 +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
chris
87779dca88
Gracefully handle invalid stone cutter recipes (#4406)
* Gracefully handle invalid stone cutter recipes

Further various little fixes:
- bump source version in AP to 17 to silence build log spam
- remove unneeded close() on auto-closable resource
2024-01-22 19:21:12 +01:00
chris
16f9f0d94f
Don't try to show the server settings form to players who are not logged in (#4387)
* Don't show the server settings form to players who are not yet logged in

* Add brackets to if statement
2024-01-20 12:03:32 +01:00
Konicai
a13492e0ed Final 1.20.4 cleanup 2023-12-14 21:31:14 -05:00
Konicai
d3a4b13364 cleanup 2023-12-14 21:31:14 -05:00
Konicai
21a2c2332f translate trial spawners, cleanup 2023-12-14 21:31:14 -05:00
Konicai
22009054ab Crafter translation 2023-12-14 21:31:14 -05:00
Konicai
c7da8fe163 Better nullability annotations/handling for ItemStacks 2023-12-14 21:31:14 -05:00
Konicai
f38d82c19c Drop <1.20.50 2023-12-14 21:31:14 -05:00
Konicai
a89aa4e064 1.20.3: compiling protocol changes 2023-12-14 21:31:14 -05:00
千飞夏
3971650856
Fix collision problem with glass pane and iron bars (#4302)
* Fix collision problem,the wide for bedrock is 0.5 but for java is 0.5625 when only one side connect.

* Fixed an issue where the collision box was abnormal at the corner when two sides of the glass panel were connected.

* Merge similar methods, adjust code.

* More lenient judgment; reduce redundant code to avoid repeated calls.
2023-12-07 09:57:30 +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
b8481cc3cd
Fix: Recipe tags application
We only need to use recipe tags when there is more than one possible ingredient option. For example, before this, we applied a logs item tag to the planks recipe, which caused an issue with plank type suggestions. (#4321)
2023-12-01 20:38:25 +01:00
chris
11945db7a0
Clear mob spawners if the Java server so requests (#4232)
* Clear mob spawners if the Java server so requests

* Empty spawners by replacing the spawner block with a new one instead of adding an invalid identifier to them.
Unfortunately, sending one UpdateBlockPacket that replaces the spawner does not work, we need to set the spawner to air first. Cool. But at least we don't summon particles for all empty spawners now

* store position vector (address review by @konicai)

* remove empty line
2023-12-01 10:27:42 +01:00
Kas-tle
0f50a3cbe6
Re-implement subchunk v9 with proper index (#4287)
* Re-implement subchunk v9 with proper index

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

* typo in comment

---------

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
2023-11-28 20:33:07 -08:00
chris
44174fdc04
Add 1.20.50 Bedrock support (#4296)
* Start on 1.20.50

* Add 1.20.50 block_palette.1_20_50.nbt, creative_items.1_20_50.json and runtime_item_states.1_20_50.json

* fix stone and planks mappings

* add and do something with the new SetPlayerInventoryOptionsPacket

* Add readme version bump

* Cleanup/Explain the new BedrockSetPlayerInventoryOptionsTranslator
2023-11-21 23:31:56 +01:00
Camotoy
13339f1ed1
Dragon and piglin heads now animate on 1.20.2 servers 2023-11-11 17:14:15 -05:00
chris
81178ba2a0
Reset weather on dimension switch (#4283) 2023-11-11 02:25:02 +01:00
chris
9dad1acfe5
Feature: Add recipe unlocking on Bedrock edition (#4016)
* Start on 1.20.10+ recipe unlocking system

* Keeping track of multiple Bedrock recipes to unlock for a single Java recipe

* Unlock stonecutter recipes

* Stonecutter recipes

* Unlock tipped arrows/shulker box recipes even when Java doesnt (why..?), and dont send trims if Java doesn't

* Translate FurnaceDataRecipes

* Revert FurnaceRecipe translation, revert stone cutter recipe identifier caching - Bedrock does not need the smelting recipe, and doesn't (un)lock stonecutter recipes (yet...?)

* Remove debug message

* Make decorated pot crafting just a little bit smoother :p

* formatting

* Use itemTag descriptors to fix https://github.com/GeyserMC/Geyser/issues/3784

* Use hashmap instead to store item tag overrides

* remove unnecessary comment

* Address review by @Konicai

* Support for 1.20.30

* undo add whitespace

* Merge upstream, use FastUtil maps, rename a few methods

* Address Camotoy's review

* Fix formatting
2023-11-10 20:45:15 +01:00
chris
aa899af908
Clear bossbars & entity attributes on server switching (#4278)
* This ensures bossbars are cleared on server switch. Additionally, this clears the EntityCache - which should resolve issues around air supply/hearts persisting visually.

* - Also reset attributes on server switch, aswell as air
2023-11-08 00:23:56 +01:00
chris
a559cde654
Move "unknown entity definition" spam to debug level (#4270) 2023-11-04 16:06:23 +01:00
chris
ec526a798d
Send cooldown when punching air (#4257) 2023-11-03 17:22:55 +01:00
Kas-tle
8d2ebcf69b
Reduce Frequency of Crashes Due to Dispensers, Droppers, and Chiseled Bookshelves (#4248)
* Revert to subchunk v8; reduces freq of #4240

* Full resolution
2023-10-26 08:16:24 -07:00
Kas-tle
3fa35b2cb9
Restrict game packets to state; Closes #4191 (#4210)
Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
2023-10-12 06:02:57 -07:00
chris
3fdd6b41d0
Fix: Beacon effects broken since 1.20.2 (#4199)
Since 1.20.2, effect IDs start at 0, not 1. Bedrock of course doesn't respect that, so we need to subtract 1!
2023-10-08 12:33:17 +02:00
chris
dec62e94e2
Fix: Implement 1.20.30 START_FLYING and STOP_FLYING cases (#4198) 2023-10-08 00:31:23 +02:00
rtm516
30cca70e56
Tell the server we loaded the resource pack (#4183)
* Tell the server we loaded the resource pack
* Decline resource packs if they are not required

---------

Co-authored-by: onebeastchris <github@onechris.mozmail.com>
2023-10-07 22:38:44 +02:00
chris
3547fab228
Fix: Bedrock clients timing out due to present Java resource packs (#4176)
* fix: auto deny Java edition resource packs

* 1.20.2 bump on Fabric

* bump mcpl

* Bump required min version in the fabric.mod.json file
2023-10-03 17:15:30 +02:00
Konicai
c2cd99c829
Support Java 1.20.2 (#4112)
* Initial pass for 1.20.2, compiling
* Remove unused level events
* handle null GameProfile in ClientboundPlayerInfoUpdatePacket
* Handle level events BRUSH_BLOCK_COMPLETE and EGG_CRACK
* Account for null tag in DecoratedPotBlockEntityTranslator
* Explicitly show that 1.20.31 is supported
2023-09-29 17:14:49 -04:00