Comments (6)
Interesting data but it doesn't make the link between block/item id and block state, for example :
- http://minecraft.gamepedia.com/Stone/DV
- http://minecraft.gamepedia.com/Stone/BS
- there are 7 block state files (stone.json, granite.json,...) and none make that link
That means it's needed to extract that information from the wiki in a first step.
from minecraft-data.
Might be interesting :
flower_pot.json
{
"variants": {
"contents=empty": { "model": "flower_pot" },
"contents=rose": { "model": "flower_pot_rose" },
"contents=blue_orchid": { "model": "flower_pot_orchid" },
"contents=allium": { "model": "flower_pot_allium" },
"contents=houstonia": { "model": "flower_pot_houstonia" },
"contents=red_tulip": { "model": "flower_pot_tulip_red" },
"contents=orange_tulip": { "model": "flower_pot_tulip_orange" },
"contents=white_tulip": { "model": "flower_pot_tulip_white" },
"contents=pink_tulip": { "model": "flower_pot_tulip_pink" },
"contents=oxeye_daisy": { "model": "flower_pot_daisy" },
"contents=dandelion": { "model": "flower_pot_dandelion" },
"contents=oak_sapling": { "model": "flower_pot_oak" },
"contents=spruce_sapling": { "model": "flower_pot_spruce" },
"contents=birch_sapling": { "model": "flower_pot_birch" },
"contents=jungle_sapling": { "model": "flower_pot_jungle" },
"contents=acacia_sapling": { "model": "flower_pot_acacia" },
"contents=dark_oak_sapling": { "model": "flower_pot_dark_oak" },
"contents=mushroom_red": { "model": "flower_pot_mushroom_red" },
"contents=mushroom_brown": { "model": "flower_pot_mushroom_brown" },
"contents=dead_bush": { "model": "flower_pot_dead_bush" },
"contents=fern": { "model": "flower_pot_fern" },
"contents=cactus": { "model": "flower_pot_cactus" }
}
}
from minecraft-data.
Any new ideas on this issue? I need a mapping from the 16-bit metadata to the model, i.e. the blockstate and its variant. Of course, this is not completely possible because not all block state is persisted in the metadata, it should be possible to get a close-enough mapping for many blocks.
Do you think we could use an automatic import from a data source? The wiki does not seem like the best source, it can be informal, e.g. for Fence Gate.
Thus I think these information need to be added manually, or does someone have a better idea?
Edit: I got an idea: Maybe we can just execute the getStateFromMeta
methods of all block classes with 0..15
as parameter. They should not depend on the game status, so it should be pretty easy to execute them from a script.
A bit more info: Block.registerBlocks
populates Block.BLOCK_STATE_IDS
with a mapping of block IDs, textual ids (probably a canonical minecraft:...
name, though there might be multiple for one ID as far as I understand) and Block
instances. So we can just loop over this map to get all the Block
instances with their ids, and then call getStateFromMeta
to map block state ids (block id + meta combined, as stored in the world and sent over network) to Block-IBlockState
combinations which in turn can be mapped to the blockstate entries in the JSON file via the BlockStateMapper
.
from minecraft-data.
@Yogu I'm open to any way to extract that data, using the minecraft jar would definitely be a good way to do it.
If you feel like doing it please go ahead, I'll accept a PR with the resulting data, and would be interested by the extractor code !
from minecraft-data.
I made a small mod: forge-data-extractor that produces these files (whole list of files which is too large so the interesting file is not displayed).
What do you think would be helpful here? I think, the blockstate-ids.json
would fit nicely in the variants
part of blocks
, and the blockstates-without-models
could also be a good fit. However, we should first look into what these flags stand for, I just put in everything that was available.
from minecraft-data.
related https://github.com/PrismarineJS/minecraft-jar-extractor/blob/master/image_names.js and https://github.com/rom1504/minecraft-assets
@Yogu yes it could be useful, I'm not sure exactly where to put that in mcdata
from minecraft-data.
Related Issues (20)
- Support Minecraft PC 1.20.2 HOT 7
- Does this repository contain any pngs linked of any sort? HOT 1
- Review and fix protocol.json for 1.20.2 HOT 5
- blockMappings.json only available in v1.19.1?
- [1.20.2] Incorrect recipes, and inconsistent shape format HOT 2
- Support Minecraft PC 1.20.3 HOT 2
- Support Minecraft PC 1.20.4 HOT 1
- Several 1.20.2 recipes have invalid shape data (PC) HOT 2
- Create gh action bot to diff protocol files HOT 1
- 1.20.2 and 1.20.3 missing metadataKeys in entities.json. HOT 8
- Add sound id - sound name map for each version HOT 9
- Add blocks & items pc renames data HOT 1
- Add version: HOT 1
- Add version:
- Identifcation of experimental features/items? HOT 4
- why are the block IDs in this package different from the actual minecraft block IDs? HOT 2
- How can find the description for switches? HOT 4
- Issue with Block State (blocksB2J.json and blocksJ2B.json) Data in Version 1.20.30
- Tb
- Add version:
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from minecraft-data.