blockbench icon indicating copy to clipboard operation
blockbench copied to clipboard

[Issue] Geometries in "blocks" folder on bedrock fail to load textures when referenced by non-block resources

Open Kas-tle opened this issue 2 years ago • 2 comments

Description

When trying to open a geometry in the blocks folder of a bedrock resource pack, resolution of textures applied by attachables and entities fail.

Reproduction

  • Unzip the attached pack
  • Attempt to open any model, such as models/blocks/gmdl_14
  • Observe that no textures load for the model, despite the texture textures/geyser/geyser_custom/1 being referenced in attchable attachables/geyser_custom/gmdl_14.attachable.json
  • Observe the following error in console:
bedrock.js:408 Error: ENOENT: no such file or directory, open 'C:\manifest.json'
    at Object.openSync (node:fs:585:3)
    at Object.func [as openSync] (node:electron/js2c/asar_bundle:5:1812)
    at Object.readFileSync (node:fs:453:35)
    at e.readFileSync (node:electron/js2c/asar_bundle:5:9160)
    at BedrockBlockManager.getBlockFile (bedrock.js:352:46)
    at BedrockBlockManager.initBlock (bedrock.js:406:29)
    at parseGeometry (bedrock.js:729:66)
    at Codec.parse (bedrock.js:1050:4)
    at Codec.load (bedrock.js:922:8)
    at loadIfCompatible (io.js:69:12)
  • Rename models/blocks to an arbitrary name, such as models/geyser
  • Close and reopen the model
  • Observe that the texture is now automatically loaded correctly
  • Observe that there are no errors in console

Model Format

Appears to be related to the fact that anything loaded in the blocks folder is automatically loaded as a Bedrock Block, though these geometries can also be used by entities and attachables.

Blockbench Version

4.3.1, Desktop

OS

Windows 11

Kas-tle avatar Jul 31 '22 06:07 Kas-tle

Just realized I forgot the attachment... will upload when I have access to my computer. Apologies xD

Kas-tle avatar Aug 03 '22 00:08 Kas-tle

Here you go geyser_resources_cc.zip

Kas-tle avatar Aug 06 '22 20:08 Kas-tle

That is definitely intended, but I see why you would like it to load from attachables and entities as well.

It would just be difficult to achieve, since the block folder is the only indication that a model should be loaded as a block model and generally that's correct.

JannisX11 avatar Nov 18 '22 17:11 JannisX11

I guess perhaps some sort of global setting that is off by default and overrides the format? I can see why just adding a prompt would waste people's time in the majority of cases.

Kas-tle avatar Nov 18 '22 17:11 Kas-tle

How about opening the entity or attachable file automatically opens the model as an entity?

JannisX11 avatar Nov 18 '22 19:11 JannisX11

That would be cool and would actually solve other issues (e.g. less texture picking when a geometry is reused by multiple entity definitions).

Kas-tle avatar Nov 18 '22 20:11 Kas-tle