Skip to content
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

Some blocks are not rendered (mostly blockentities) #122

Open
Wolf2323 opened this issue May 17, 2024 · 8 comments
Open

Some blocks are not rendered (mostly blockentities) #122

Wolf2323 opened this issue May 17, 2024 · 8 comments

Comments

@Wolf2323
Copy link

I've noticed that the decorated_pot is not rendering at all in the prismarine-web-client.

I'm not sure how difficult it would be to fix this issue, but I am considering attempting to fix it myself. Could you please look into this issue or provide some guidance on how to resolve it? Any advice or pointers would be greatly appreciated.

Thank you!

@zardoy
Copy link
Owner

zardoy commented May 17, 2024

I'm going to patch minecraft-assets by adding all missing models from Bluemap repository (including beds, pots, heads and maybe even basic banners). I'm completely out of time right now, it would be insane if you could help with this it one! The preferable way here is adding them to the source repository of minecraft-assets

Edit: I don't see pots in https://github.com/BlueMap-Minecraft/BlueMap/tree/master/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft need to look wether bluemap supports rendering them or not and why we don't support rendering them. Maybe the rendering is a bit tricker than I thought initially as the model must be computed on the fly?

@Wolf2323
Copy link
Author

I found this issue: BlueMap-Minecraft/BlueMap#145
And there is a live demo where a lot of the things are working from TyBraniff.
Here is the repo: https://github.com/TyBraniff/BlueMap

Who ever is faster in actually adding the missing models to minecraft-assets now ;)

@zardoy
Copy link
Owner

zardoy commented May 21, 2024

I found this issue: BlueMap-Minecraft/BlueMap#145

Thank you so much! You already saved me a lot of time! I see the files format is compatible and can easily be added here.

Who ever is faster in actually adding the missing models to minecraft-assets now ;)

definitely not me, if you could bring the files it would be insane!

@zardoy zardoy changed the title Rendering of decorated_pot not working Some blocks are not rendered (mostly blockentities) May 22, 2024
@zardoy
Copy link
Owner

zardoy commented May 22, 2024

Okay, updated test, so these blocks are not rendered currently:

  • Banners:

    • black_banner
    • blue_banner
    • brown_banner
    • cyan_banner
    • gray_banner
    • green_banner
    • light_blue_banner
    • light_gray_banner
    • lime_banner
    • magenta_banner
    • orange_banner
    • pink_banner
    • purple_banner
    • red_banner
    • white_banner
    • yellow_banner
  • Wall Banners:

    • black_wall_banner
    • blue_wall_banner
    • brown_wall_banner
    • cyan_wall_banner
    • gray_wall_banner
    • green_wall_banner
    • light_blue_wall_banner
    • light_gray_wall_banner
    • lime_wall_banner
    • magenta_wall_banner
    • orange_wall_banner
    • pink_wall_banner
    • purple_wall_banner
    • red_wall_banner
    • white_wall_banner
    • yellow_wall_banner
  • Candles:

    • black_candle
    • blue_candle
    • brown_candle
    • cyan_candle
    • gray_candle
    • green_candle
    • light_blue_candle
    • light_gray_candle
    • lime_candle
    • magenta_candle
    • orange_candle
    • pink_candle
    • purple_candle
    • red_candle
    • white_candle
    • yellow_candle
    • candle
  • Heads (easy):

    • creeper_head
    • dragon_head
    • piglin_head
    • player_head
    • skeleton_skull
    • wither_skeleton_skull
    • zombie_head
  • Wall Heads (easy):

    • creeper_wall_head
    • dragon_wall_head
    • piglin_wall_head
    • player_wall_head
    • skeleton_wall_skull
    • wither_skeleton_wall_skull
    • zombie_wall_head
  • Beds (easy):

    • black_bed
    • blue_bed
    • brown_bed
    • cyan_bed
    • gray_bed
    • green_bed
    • light_blue_bed
    • light_gray_bed
    • lime_bed
    • magenta_bed
    • orange_bed
    • pink_bed
    • purple_bed
    • red_bed
    • white_bed
    • yellow_bed
  • Hanging Signs (easy):

    • acacia_hanging_sign
    • bamboo_hanging_sign
    • birch_hanging_sign
    • cherry_hanging_sign
    • crimson_hanging_sign
    • dark_oak_hanging_sign
    • jungle_hanging_sign
    • mangrove_hanging_sign
    • oak_hanging_sign
    • spruce_hanging_sign
    • warped_hanging_sign
  • Wall Hanging Signs (easy):

    • acacia_wall_hanging_sign
    • bamboo_wall_hanging_sign
    • birch_wall_hanging_sign
    • cherry_wall_hanging_sign
    • crimson_wall_hanging_sign
    • dark_oak_wall_hanging_sign
    • jungle_wall_hanging_sign
    • mangrove_wall_hanging_sign
    • oak_wall_hanging_sign
    • spruce_wall_hanging_sign
    • warped_wall_hanging_sign
  • Other:

    • bubble_column
    • decorated_pot
    • end_gateway
    • end_portal
    • pink_petals
    • powder_snow_cauldron
    • repeater (bug in default state, needs investigation)
    • sea_pickle
    • snow (the same)
    • structure_void (?)
    • turtle_egg
    • water_cauldron - not sure

@Wolf2323
Copy link
Author

I am a bit confused. Initially, I thought I was adding the missing blocks to minecraft-assets, but now it seems like I need to add them to the code you referenced. As I am not very experienced with this project, could you please provide more detailed instructions on what exactly needs to be done and where I should make these additions?

Thank you.

@zardoy
Copy link
Owner

zardoy commented May 22, 2024

Initially, I thought I was adding the missing blocks to minecraft-assets

If you know how to do this go ahead, but I didn't receive a message from maintainers and am not sure whether these assets should be added to https://github.com/PrismarineJS/minecraft-jar-extractor or somewhere else. On the other hand I already have the code that adds additional block states / models. So we can just merge the files back to original repos once we figure out how to do this. here is a basic contribution guide

  • add handlers there
  • add states / models here (better to read states / models from json files, it was a terrible idea to inline them in the code). Also, note that there is no need to care for <1.13 versions.

Then run pnpm tsx prismarine-viewer/viewer/prepare/generateTextures.ts to generate new models (can replace there mcAssets.versions with specific version like ['1.20.2'] for faster process.
And run pnpm run-playground to test specific blocks render.

I promise I will merge asap once it's done!

Thanks for coming back and happy coding!

@Wolf2323
Copy link
Author

In this branch https://github.com/ResilientGroup/prismarine-web-client/tree/decorated_pot i started adding the decorated pot, but i already tried a lot, and now the texture is still missing. Can you help me how to continue?

image

@zardoy
Copy link
Owner

zardoy commented May 24, 2024

@Wolf2323 Great start, but please open a PR so I can work on your changes (or you can try adding textures yourself as I described below).

You don't see textures because you don't add them (to atlas). I read them like so:

if (variant.model !== modelName) continue

You can simplify everything by just reading the needed texture and adding it like so:

in case of decorated pot it should be easy. Just ensure that the final texture name in the model of the block matches the name of the key you use in generatedImageTextures

please let me know if it works for you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants