- the extensionmanagers `extension` method now takes in a extension id instead of name
- extension folders are now created using extension id's
- Extensions can load classes from other extensions now
- Added warning about external class loading
- Wherever applicable: store extensions internally by id instead of name
* 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
* Set BlockMapping.AIR, id is always 0, but this also ensures that the palette always has air
* Rename BlockMapping.AIR to DEFAULT, as it does not have to represent AIR, and statically set it
* init: spectator mode support
* properly set second abilitylayer for spectator mode
* Fixes https://github.com/GeyserMC/Geyser/issues/3318 by not sending changed flags in spectator mode
* Fix duplicate permission registration
* Register /<extensionid> help (and aliased ?) commands under the "geyser.command.exthelp.id" permission
* Fix: Show correct header for /geyser help vs /<extensionid> help
* Super cursed custom skulls custom block
* Rename some stuff
* Attempt to clean up some code
* Remove skull translation events and define custom blocks for custom skulls
Clean up skull block translation a bit
* Auto generate skull resource pack
Change `davchoo` to `geyser` in geometry
* Add config options for custom blocks and custom skull blocks
* Fix formatting and names for player skulls
* Use block states more efficiently for custom skulls
21 block states vs 48 block states
* Clean up custom block api a bit
* Apply some suggestions from Camotoy
* Move custom skull config stuff to its own file
Custom skulls can now be added by username, uuid, and textures
Move skull nbt stuff from requestTexturesFromUsername to
SkullBlockEntityTranslator
Add requestTexturesFromUUID
* Update custom block nbt for v534
* Disable collision box & selection box when box is empty
Fix incorrect collision names used in CustomBlockComponentsBuilder
* Add custom block stuff to provider registry loader
* More API changes
Convert CustomBlockPermutation into a record
Change materialInstances in CustomBlockComponents Builder to
materialInstance
Reuse box components in CustomSkull
* Convert skull floor geometries into a template
Should be easier to modify in needed in the future.
* Crop and reorder skull textures to eliminate unused space
Should reduce memory & storage usage for Bedrock clients
* Revert "Crop and reorder skull textures to eliminate unused space"
This reverts commit 15fd5353e1.
* Use identifier from CustomBlockData in SkullResourcePackManager
* Fix isIncorrectHeldItem check for custom skull blocks
Add defaultBlockState to CustomBlockData
* Fix adding duplicate block states for custom blocks with 0 properties
Remove defaultBlockState CustomBlockState field from
GeyserCustomBlockData since it creates a circular reference
* Add basis for overriding Bedrock block states
Fix missing providers when used in GeyserDefineCustomBlocksEvent
* Fix custom blocks in 1.19.50
* Decouple mappings from items
* Decouple mappings from items
* Null check
* Move to CustomBlockRegistryPopulator
* Remove name_hash from blocksTag/vanillaBlockStates
Fixes creative inventory contents with custom blocks registered
* Limit Bedrock versions to 1.19.40+
Custom blocks were released in 1.19.40
* Un-revert Crop and reorder skull textures to eliminate unused space
Should reduce memory & storage usage for Bedrock clients
Bug with top face flipping + per-face uv's was fixed in 1.19.40+
https://bugs.mojang.com/browse/MCPE-160073
Geometry is still offset by 0.5 to prevent lighting bugs
* Add validation custom block components and s/lightFilter/lightDampening/
Also validate custom block names
* Add display name component and add toggle for client block placing
The display name component allows blocks to use other locale keys.
placeAir will prevent the client from placing the default block state.
* Begin parsing block mappings (still much to do!)
* CustomBlockMapping stores block w/ all states
* Mappings almost :/
* Ok now they work at least
* Read most mapping components
* Block mappings mostly done
* Translate block item
* Add docs for custom blocks
* Add tags
* More docs
* Accidentally added name comp.
* Fix collide box and warn for >16 props
* add registerBlockItemOverride event + refactor
* Inventory overrides for multistate bedrock blocks
* Implement all remaining block components
* Minor cleanup and javadocs
* Update custom skull config example
* Address @Camotoy's review
Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
* Fix light_emission and light_dampening components
* Remove redundant populate method and remove BLOCKS_JSON after last use
* Fix inventories with block state overrides not opening
* API event for skull blocks & let register via URL
Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
* Use skin hash instead of URL
Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
* Address @davchoo's review
Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
* Rework MappingsReader_v1 to avoid passing maps around
* Treat all properties as string properties
There isn't a real need to check for boolean and int properties
* Fix block registry scan in MappingsReader
* Skin hashes can have less than 64 characters?
* Include entry when logging exceptions from block mappings
* Submodule
Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
* Fix block break speeds thanks to @Camotoy
Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
* Temporarily fix build on eclipse so I may work...
Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
* Custom tool breakspeed by server; Closes#3348
Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
* Account for if custom skulls are added on 1st run
Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
* Initial framework for extended collision boxes
Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
* Add some notes for the extended collision box impl
Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
* We have our extended collision registry
Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
* Notes for me
Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
* Extended collision boxes almost work
Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
* Extended collision boxes actually work
Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
* Consider all hitboxes in calculation
Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
* X is mirrored...
Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
* Extended collision boxes are much improved
Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
* Upstream fallout
Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
* Address @Redned235's review
Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
* Oops my bad that makes no sense :)
Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
* Ext collision box chunk translation optimization
Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
* Trunc skinhash to 32 chars due to 80 char limit
Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
* Use new transformation cmpnt vs legacy rotation
Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
* keep arr null on get extcolstor
Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
* Properly handle if extended collision box is below
Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
* Less ugly (realized it can go here)
Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
* Prevent 2x placement due to extended collision box
Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
* Properly build on eclipse via indra
Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
* Ensure enough bits in bedrockData for paletteIDs
Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
* Fix not needed whitespace
Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
* Update license headers to 2023
Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
* Use release indra over snapshot
Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
* Revert "Update license headers to 2023"
This reverts commit f750059e8e.
* Account for collisions in chunk section y0 layer
Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
* Fix extended collision @ air section bottom
Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
* Address @davchoo's review
Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
* Address @rtm516's review
Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
* More @rtm516's review
Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
* Address @Camotoy's review
Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
* Update javadocs
Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
* Address @davchoo's review
Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
* Lock extended collision to section
Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
* Clear ext col even when air
Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
* Let override vanilla items in creative inventory
Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
* Avoid creating 12 HashSets for every overrided block state
* Super minor nitpicks + Custom Skull NBT fix
* Check custom skull is within Bedrock bounds
Fixes NPE with custom skulls above y=320 or below y=-64
* Add static builder methods to match CustomItemData API
* Upstream
Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
* Initial API setup for modded blocks (no impl yet)
Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
* More work on nonvanilla blocks (nonfunctional)
Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
* Fix compile
Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
* Update submodules
Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
* Modded reg so far (not done)
Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
* Add non-vanilla registration and fix a few bugs
* Fixes for non-vanilla blocks
* Remove import
* CustomRegPop. go1st for now; must split for modded
Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
* Address silent change to geo component for blocks
Co-Authored-By: Unoqwy <pm@unoqwy.dev>
Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
* Seperate bedrock, vanilla, & nonvanilla block reg
Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
* Single event
Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
* Impl MaterialInstance as builder per @Redned235
Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
* Added creative category enum & added some missing overrides (#7)
* Add material instance to provider registry
Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
* oops
Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
* Fix case of correctBedrockIdentifier not found
Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
* Fix docs
Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
* Address @Camotoy's review
Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
* Address review from @davchoo
Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
* Set namespace of custom blocks vs ident direct
Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
* Address review from @rtm516
Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
* One more
Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
* Remove rogue space
* Geo component as builder
Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
* use super name
Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
* Bump version
Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
---------
Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: davchoo <davchoo@users.noreply.github.com>
Co-authored-by: davchoo <4722249+davchoo@users.noreply.github.com>
Co-authored-by: Unoqwy <pm@unoqwy.dev>
Co-authored-by: RednedEpic <redned235@gmail.com>
Co-authored-by: ImDaBigBoss <67973871+ImDaBigBoss@users.noreply.github.com>
Co-authored-by: rtm516 <rtm516@users.noreply.github.com>
* Renames for clarity and refactor convertToJavaMessage
* Bump adventure, velociy. Require CharacterAndFormat in MessageTranslator
* Fix deprecations related to DummyLegacyHoverEventSerializer
* Patch serialization of ScoreComponent until Adventure 1.15.0
* Cache the (clientbound) Keep Alive timestamp and use that for forwarding ping
* Use a Queue of keep alive IDs to handle KeepAlive packets sent in succession
* Don't force NetworkStackLatencyTranslator on the session's event loop
* Send clientbound NetworkStackLatencyPacket immediately
* Avoid sending negative NetworkStackLatencyPackets that are not from the form-image-hack in FormCache
* Downsize timestamps that would lead to overflow on the client
* Show proxy protocol ip for debug message
* Make sure that first message that contains proxy protocol also gets sent. This caused issues with serverlists and console players
* Validate NBT tags of written_book like Java edition
* Update page count and character count limits
The maximum number of characters allowed in Java's book edit screen is
1024 for each page and 16 for the title. However, the packet itself has
a limit of 8192 * 3 bytes for each page and 128 * 3 bytes for the title.
* Fix writable book losing changes when signing
Bedrock sends a 3 action InventoryTransactionPacket after the player
changes a page. This causes Geyser to send a ServerboundEditBookPacket
with an outdated NBT. The Java responses with a
ClientboundContainerSetSlotPacket that overwrites any NBT Changes from
BedrockBookEditTranslator.
* Add a comment for the title length check
* Specify color in Component.translatable
When shift-clicking the result item in a crafting table while holding an item in your hand, items would bug out completely and cause weird inventory desyncs.
* Add missing entities to getMountedHeightOffset and getHeightOffset
* Fix mount offset on Camels for more than 1 passenger
* Fix mount offset for Shulkers on Bamboo boats and minecarts with stuff
Also fix mount offsets for minecart and boat passengers
* Combine
* More missing mount offsets
* Fix mount offsets for entities riding players
* Check for hide attributes flag, and "Name" -> "AttributeName"
* Operation tag is not required?
* Only process each modifier once
* Ignore `minecraft:` namespace if present
* No `Operation` is implicitly ADD, fix knockback_resistance check
* Add Attribute Modifiers Display
Allows Bedrock players to view the Attribute modifiers display on the bottom of items.
* Fix handling for Knockback Resistance
For some reason, Knockback Resistance is multiplied by 10 in the display for addition, so this handles that oddball.
* Add null check for NBT
* Remove "contains" check
This is checked in the beginning of the addAttributes method so is not required here.
* Add curly brackets
Camotoy likes curly brackets I guess
* Use ModifierOperation enum instead of int for clarity
* Add SessionInitialize event
* Move to using GeyserConnection instead of BedrockServerSession
* Remove redundent re-expose
* Rename geyserSession to just session
* System property stuff
* Add geyserUdpPort/Address system properties as overrides for pluginUdpPort/Address
* Fix formatting for if-else statements
---------
Co-authored-by: Camotoy <20743703+Camotoy@users.noreply.github.com>
Adds an "unusable-space-block" setting in the config.yml to specify an item to indicate unavailable spaces in a bedrock inventory.
If the item is invalid, a barrier block is used & an error gets printed
commit c53bb38a47d1a48f0b5a72059e81c4354c2b8e90
Author: Camotoy <20743703+Camotoy@users.noreply.github.com>
Date: Mon Nov 14 15:12:29 2022 -0500
Final touch
commit f9ff9553eda7c80620a8e6f63e14f01adb39ac8b
Merge: b57109ddf886d7e5b4
Author: Camotoy <20743703+Camotoy@users.noreply.github.com>
Date: Mon Nov 14 14:54:28 2022 -0500
Merge branch 'master' of https://github.com/GeyserMC/Geyser into pull/3281
commit b57109ddf7
Author: Kevin Ludwig <signing@valaphee.com>
Date: Mon Sep 12 12:23:36 2022 +0200
Revert use entities for single chest inventories
commit fda66e83b9
Author: Kevin Ludwig <signing@valaphee.com>
Date: Sat Sep 10 11:49:40 2022 +0200
Use entities for single chest inventories, check if a block for server-side opened inventories can be placed either above or below, otherwise, close the inventory (same logic as with inventory translator found)
Huge thanks to Kastle for helping me disect this behavior.
- The Unbreakable NBT tag is not the only source for determining if an item should be treated as unbreakable. The damage NBT is also taken into account.
- Custom item options must be processed in an ascending order.
- Multiple conditions may be necessary for an item to be selected.
- Conditions do not have to be exact. See the comments in CustomItemTranslator for an explanation.
- Added a test so we don't break this behavior in the future.
Geyser installations will now get notified when a new Bedrock release is out and Geyser must be updated. The system works similarly to ViaVersion where OPs get a notification of an update when they join. The permission node for players to see update notifications is `geyser.update` and the backing JSON that controls this can be found at https://github.com/GeyserMC/GeyserSite/blob/gh-pages/versions.json. There is also a config option to disable update checking.
This update also fixes modern Paper installations not being able to see colored text logged from Geyser in the console.
This probably isn't needed anymore. This was introduced in https://github.com/GeyserMC/Geyser/pull/41 and is probably no longer needed since we never send movement before the player is spawned, and we don't allow movement to go through until the Bedrock player matches the unconfirmed teleport we create in JavaPlayerPositionTranslator. By removing this we should fix some instances of players kicked for 'flying' as players joining in the air would never respond to gravity until Bedrock finished loading.
* Remove Bedrock only banner patterns from the creative inventory
* Add sound for tadpole bucket
* Fix lily pad and frogspawn placing on mobile/single stacks
* Workaround? Fix? for bucket usage on mobile
* Simplify math and update position+rotation whenever ServerboundUseItemPacket is sent
* Rotate the player back after using an item and fix glass bottles
* ITEM_USE actionType 1 does not need the rotation fix
Increase delay for look back
* Add some checks
* Prevent buckets and spawn eggs from being unintentionally placed when interacting with special blocks
As of 1.19 Bedrock no longer sends a PlayerActionPacket with action=BLOCK_INTERACT. Bedrock now sends action=ITEM_USE_ON_START before and action=ITEM_USE_ON_STOP after using an item on a block. However, this is not useful as it is sent for all block interactions.
* Fix inventory transactions being rejected after restoreCorrectBlock
The held item's netId is always 0 in the InventoryTransactionPacket.
* Touch ups
* Fix lookAt for different poses and sneaking + cauldron + bucket interactions
Fix boat items being desynced when placing them very close to collision
Fix bottles being desynced when tapping above water
Resend the held item if we do encounter a desync
* Avoid getting blockstate twice and fix comment
* Use generated interaction data
* Fix glass bottles being double filled and phantom water bottles/water buckets
* Don't update the entire inventory on useItem
* Use Geyser's inventory copy for check
* Use ItemTranslator#getBedrockItemMapping to avoid NBT translation
* mappings
Co-authored-by: Camotoy <20743703+Camotoy@users.noreply.github.com>
ViaVersion has two entries in its fake chat registry that are not in the same order as Java. This commit supports that properly and renders subtitled text correctly.
Resolves#3023