Giter Club home page Giter Club logo

Comments (7)

Querz avatar Querz commented on May 29, 2024 2

I do not plan to implement support for the bedrock edition world format anytime soon.
I will look into this however and see what I can do when I have the time :)

from mcaselector.

SandboChang avatar SandboChang commented on May 29, 2024 1

It appears Amulet can perform the chunk deletion, not sure about other operations. However their interace is rather sluggish and it is quite a pain to work with.

It would be wonderful if MCA can reference their work and implement bedrock support, while keeping the nice UI.

from mcaselector.

Querz avatar Querz commented on May 29, 2024

I have been looking into this, unfortunately there doesn't seem to be an official java library to read Mojangs custom LevelDB. Still investigating.

from mcaselector.

Tourniquet88 avatar Tourniquet88 commented on May 29, 2024

Heya, I'm also interested in Bedrock support.

https://github.com/tinfoiled/leveldb <- isn't that related to bedrock? At least it was referenced in the wiki (https://minecraft.gamepedia.com/Bedrock_Edition_level_format)

from mcaselector.

Querz avatar Querz commented on May 29, 2024

The problem with the library by Tinfoiled is that it only supports the ZLIB compression type, but newer Minecraft worlds actually use raw ZLIB compression. I found a fork of the original Java port of the LevelDB library with a usable raw ZLIB implementation here: https://github.com/CloudburstMC/leveldb

I'm currently trying to get this to work.

from mcaselector.

Querz avatar Querz commented on May 29, 2024

Does anyone have experience with Minecraft Bedrock textures and block models?

For Java Edition, I'm currently creating color mappings to render the top-down view in MCA Selector by looping over the block states json files, finding the top texture of each block, and then calculating the average color for this texture.

I couldn't find a way to do something similar for the Bedrock Edition: Apparently Bedrock Edition doesn't support block models, and it doesn't seem to be possible to infer from the vanilla resource pack to all possible block states and link them to textures.

Here is an example of the problem, looking at the rose bush:
In the Minecraft Java Edition assets, I first look at the file assets/minecraft/blockstates/rose_bush.json. It contains 2 variants for its upper and lower half:

{
  "variants": {
    "half=lower": {
      "model": "minecraft:block/rose_bush_bottom"
    },
    "half=upper": {
      "model": "minecraft:block/rose_bush_top"
    }
  }
}

Then, i can look up the models in assets/minecraft/models/block/rose_bush_bottom.json and assets/minecraft/models/block/rose_bush_top.json. Each one of them has a parent called minecraft:block/cross:

{
  "parent": "minecraft:block/cross",
  "textures": {
    "cross": "minecraft:block/rose_bush_bottom"
  }
}

I then look up assets/minecraft/models/block/cross.json. It is missing an up or top texture, so I use its particle texture, which is linked to #cross in assets/minecraft/models/block/rose_bush_top.json:

[...]
	"textures": {
        "particle": "#cross"
    },
[...]

So I take the cross texture, which is assets/minecraft/textures/block/rose_bush_bottom.png to calculate the average color, which is #454003 for rose_bush_bottom and #733d07 for rose_bush_top.

Based on the assets/minecraft/blockstates/rose_bush.json file, I can now create 2 mappings:

rose_bush:half=lower;454003
rose_bush:half=upper;733d07

This now can be matched to what Minecraft actually saves in the palette in the mca files:

{
    Name: "minecraft:rose_bush",
    Properties: {
        half: upper
    }
}

Now this doesn't seem to work for Bedrock. A rose bush is saved as just a double_plant with double_plant_type: rose:

{
    name: "minecraft:double_plant",
    version: 17825806,
    states: {
        upper_block_bit: 1b,
        double_plant_type: rose
    }
}

But in the vanilla resource pack there is no mention of those block states.

Is there a way to cleanly extract ALL block states from Minecraft Bedrock and link them to their textures? Creating and maintaining a mapping for ~1500 block states is not something i want to do manually.

from mcaselector.

Querz avatar Querz commented on May 29, 2024

Apparently Bedrock servers send a ton of data to the client during the connection process, including the complete block palette of all registered block states on the server (see https://wiki.vg/Bedrock_Protocol#Start_Game). This packet can be intercepted (e.g. here: https://github.com/pmmp/BedrockData).
This would leave me with a list of all block states in the game, but still couldn't produce a link to their textures.

from mcaselector.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.