-
-
Notifications
You must be signed in to change notification settings - Fork 686
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for custom blocks and skulls #3505
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…kulls Clean up skull block translation a bit
Change `davchoo` to `geyser` in geometry
21 block states vs 48 block states
Custom skulls can now be added by username, uuid, and textures Move skull nbt stuff from requestTexturesFromUsername to SkullBlockEntityTranslator Add requestTexturesFromUUID
# Conflicts: # core/src/main/java/org/geysermc/geyser/registry/BlockRegistries.java # core/src/main/java/org/geysermc/geyser/translator/protocol/bedrock/BedrockInventoryTransactionTranslator.java
Fix incorrect collision names used in CustomBlockComponentsBuilder
# Conflicts: # core/src/main/java/org/geysermc/geyser/GeyserImpl.java # core/src/main/java/org/geysermc/geyser/registry/provider/GeyserBuilderProvider.java
Convert CustomBlockPermutation into a record Change materialInstances in CustomBlockComponents Builder to materialInstance Reuse box components in CustomSkull
Should be easier to modify in needed in the future.
Should reduce memory & storage usage for Bedrock clients
This reverts commit 15fd535.
Add defaultBlockState to CustomBlockData
Remove defaultBlockState CustomBlockState field from GeyserCustomBlockData since it creates a circular reference
Fix missing providers when used in GeyserDefineCustomBlocksEvent
Signed-off-by: Joshua Castle <[email protected]>
Signed-off-by: Joshua Castle <[email protected]>
Signed-off-by: Joshua Castle <[email protected]>
Signed-off-by: Joshua Castle <[email protected]>
Redned235
approved these changes
Aug 5, 2023
LGTM! 😀 👍 |
👀 |
Camotoy
reviewed
Aug 8, 2023
...va/org/geysermc/geyser/translator/protocol/java/level/JavaLevelChunkWithLightTranslator.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Joshua Castle <[email protected]>
Signed-off-by: Joshua Castle <[email protected]>
davchoo
previously requested changes
Aug 9, 2023
api/src/main/java/org/geysermc/geyser/api/block/custom/NonVanillaCustomBlockData.java
Show resolved
Hide resolved
core/src/main/java/org/geysermc/geyser/registry/BlockRegistries.java
Outdated
Show resolved
Hide resolved
core/src/main/java/org/geysermc/geyser/registry/populator/CustomBlockRegistryPopulator.java
Outdated
Show resolved
Hide resolved
core/src/main/java/org/geysermc/geyser/registry/populator/BlockRegistryPopulator.java
Outdated
Show resolved
Hide resolved
core/src/main/java/org/geysermc/geyser/registry/populator/BlockRegistryPopulator.java
Outdated
Show resolved
Hide resolved
core/src/main/java/org/geysermc/geyser/registry/populator/BlockRegistryPopulator.java
Show resolved
Hide resolved
core/src/main/java/org/geysermc/geyser/registry/populator/BlockRegistryPopulator.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Joshua Castle <[email protected]>
Signed-off-by: Joshua Castle <[email protected]>
rtm516
requested changes
Aug 14, 2023
core/src/main/java/org/geysermc/geyser/pack/SkullResourcePackManager.java
Show resolved
Hide resolved
core/src/main/java/org/geysermc/geyser/registry/loader/ResourcePackLoader.java
Outdated
Show resolved
Hide resolved
core/src/main/java/org/geysermc/geyser/registry/mappings/versions/MappingsReader_v1.java
Outdated
Show resolved
Hide resolved
core/src/main/java/org/geysermc/geyser/registry/mappings/versions/MappingsReader_v1.java
Show resolved
Hide resolved
core/src/main/java/org/geysermc/geyser/registry/mappings/versions/MappingsReader_v1.java
Show resolved
Hide resolved
core/src/main/java/org/geysermc/geyser/registry/populator/CustomBlockRegistryPopulator.java
Outdated
Show resolved
Hide resolved
core/src/main/java/org/geysermc/geyser/registry/populator/CustomBlockRegistryPopulator.java
Outdated
Show resolved
Hide resolved
core/src/main/java/org/geysermc/geyser/registry/populator/CustomBlockRegistryPopulator.java
Outdated
Show resolved
Hide resolved
core/src/main/java/org/geysermc/geyser/registry/populator/CustomBlockRegistryPopulator.java
Outdated
Show resolved
Hide resolved
core/src/main/java/org/geysermc/geyser/registry/populator/CustomItemRegistryPopulator.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Joshua Castle <[email protected]>
Signed-off-by: Joshua Castle <[email protected]>
rtm516
requested changes
Aug 19, 2023
core/src/main/java/org/geysermc/geyser/registry/loader/ResourcePackLoader.java
Outdated
Show resolved
Hide resolved
rtm516
approved these changes
Aug 19, 2023
Signed-off-by: Joshua Castle <[email protected]>
Signed-off-by: Joshua Castle <[email protected]>
Signed-off-by: Joshua Castle <[email protected]>
LGTM! |
👍 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Major thanks to Amberichu for all her help with this! 🎉
This PR builds off of her initial skull and custom block registry system. It adds support for registration of custom blocks via both extensions and mappings. Via mappings, the user can override either specific blockstates, or all blockstates for a given block. A
blocks
section may be simply added to existing files incustom_mappings
. The structure of the mappings is described in the preview documentation.Preview documentation: https://pages.kastle.dev/geyser/custom-blocks/
In addition, there is support for registering specific skulls via a config file. These skulls are incorporated into a resource pack generated by Geyser on startup.
Preview documentation: https://pages.kastle.dev/geyser/custom-skulls/
I know we'll probably have a long road to getting this merged, but I'm ready to get started with whatever changes need to be made. Just let me know. Also feel free to commit to my branch directly if you so choose.
Accompanying PR has been made on the wiki for documentation of these new features. See GeyserMC/GeyserWiki#115
@Camotoy (to figure out the branch stuff)
Major Caveats
Break speeds will be completely broken for vanilla tools. This cannot be fixed at this time. We can likely fix for custom tools once Added tool break speeds & more #3381 is merged.Thanks to a suggestion from Camotoy, we can calculate the break time server side and simply break the block for the client when needed. See 29835a1Hit boxes cannot extend outside 1x1x1 block. This means blocks like walls and fences can effectively be jumped over by bedrock players. We could perhaps work around this by adding either solid entities or invisible blocks above blocks with a collision box that extend outside this size.I implemented the proposed workaround; see 7f85e90 and 5f5159d (primarily). The only minor inconvenience here is an unknown geometry warning will be displayed without a slight change to GeyserOptionalPack, but there is not other change in function beyond the content log error. Note that we still have the issue of being limited to cuboid shaped collision boxes, but for now this is a Mojang limitation we cannot control.Blocks are not overridden in the creative inventory. To accomplish this, we would need a way to programmatically map the blocks in each creative category. This would probably require futzing around with pmmp/bds-mod-mapping.This can now be done as long as the creative category and group is specified in the mappings.Given the above, I see this as primarily a cosmetic feature. We can do our best to make the components work, but it would be ill advised for anyone to rely on them working.