minecraft-data
minecraft-data copied to clipboard
images ?
see https://github.com/wurstmineberg/assets.wurstmineberg.de/tree/master/img/grid
It might be interesting for http://prismarinejs.github.io/minecraft-data purposes
What about just extracting them from the .jar when generating the docs?
I don't feel the need to have these in minecraft-data, as they are more of a (default, preinstalled) resource pack.
Also, legal issues should be considered before we redistribute them.
Yeah it's true that these images take 3MB.
Maybe they should be stored elsewhere (the mcdata docs are hosted by github though, so that would be somewhere else on github (/an other repo))
No clue about legal issues but http://minecraft.gamepedia.com/Data_values/Block_IDs is using these images just fine.
mojang's brand guidelines about "assets":
[who is using them] MUST [...] NOT include anything else around it that makes people think that you or what you are doing is official; approved or endorsed by us; or associated or connected with us; [...] sufficiently differentiate the use of any Name you are using from any other branding.
(last part regarding the PrismarineJS name)
So using them in the docs with a disclaimer should be fine.
On that theme https://github.com/deathcap/ProgrammerArt is interesting, if not vanilla mc.
Well, it's already been mentioned, but I think this repo should keep using as much of the mojangian data as it possibly can. Given the guidelines (and the track record of Mojang), I think it'd be safe to include their assets, properly categorized, if we put a disclaimer somewhere in the README.
:-1: for including Minecraft image assets in minecraft-data, not only would bloat the repo unnecessarily but a better solution imho is for graphical clients to support loading arbitrary resource/texture packs (e.g. using this module), which can include minecraft.jar if the user chooses, or a freely-redistributable resource pack like my own ProgrammerArt (CC), or Pixeludi Pack as used in TrueCraft
Worth noting, there are other NPM modules already with other texture packs: such as https://www.npmjs.com/package/painterly-textures and https://www.npmjs.com/package/isabella-texture-pack - if you want to publish textures I'd rather it be in a separate module, and minecraft-data stick to programmatically-useful structures like protocols, recipes etc.
On the other hand, I think including the texture image names could be a good idea — as the mapping between item name and texture is not straightforward, and it doesn't seem this data is currently available in minecraft-data.
For example, data/1.8/items.json:
{
"id": 295,
"displayName": "Seeds",
"stackSize": 64,
"name": "wheat_seeds"
},
this item has a texture of "textures/items/seeds_wheat.png"
edit: looks like this information is in the resource pack data (models/item/wheat_seeds.json - textures layer0: "items/seeds_wheat")
So, I'm going to try to figure out this issue for https://github.com/rom1504/minecraft-crafter/issues/2 (http://rom1504.github.io/web-minecraft-crafter/)
If I understand correctly I only need the texture names for https://github.com/deathcap/artpacks and then I should be able to use something like https://github.com/deathcap/inventory-window with an existing pack like https://github.com/deathcap/ProgrammerArt or mojang pack.
I think instead of bloating blocks.json even more, I'm going to make a textures.json than will be extracted from the vanilla minecraft assets files, and that will reference the blocks and items by their ids (or names ?)
How to get data from the client:
- open ~/.minecraft/versions/1.8.9/1.8.9.json
- at the end of the file, get client.jar url
- download it
- unzip it
- assets/minecraft/models/item contain json files
These json files seem to have to standard minecraft names (the property "name" in our blocks.json and items.json).
wheat_seeds.json contain:
{
"parent": "builtin/generated",
"textures": {
"layer0": "items/seeds_wheat"
},
"display": {
"thirdperson": {
"rotation": [ -90, 0, 0 ],
"translation": [ 0, 1, -2.5 ],
"scale": [ 0.55, 0.55, 0.55 ]
},
"firstperson": {
"rotation": [ 0, -135, 25 ],
"translation": [ 0, 4, 2 ],
"scale": [ 1.7, 1.7, 1.7 ]
}
}
}
seeds_wheat is the name of the texture image file.
That means it looks like all the information is available from the .jar in a structured way.
edit: an easier way to get the jar is simply https://s3.amazonaws.com/Minecraft.Download/versions/1.8.8/1.8.8.jar
edit2: It's now possible to get the jar by doing downloadMinecraft 1.8.8 1.8.8.jar client (https://github.com/rom1504/node-minecraft-wrap)
What do texture packs generally contain and how can we link it to standard block/item names ?
related http://hydra-media.cursecdn.com/minecraft.gamepedia.com/f/f5/ItemCSS.png
<span class="sprite item-sprite" style="background-position:-80px -0px;"><br></span>
Any idea when this may become a thing? instead of me having to keep a block to texture map in my code.
Done at https://github.com/rom1504/minecraft-assets
It's still kind of raw, so I'll close that issue when I tried to use these images and it works ok.
Would it make sense to put https://github.com/rom1504/minecraft-assets/blob/master/data/1.8.8/blocks_textures.json directly in minecraft-data ?
Yes. Maybe even the same type of thing for sounds later.
Only problem I see is it does not account for metadata.
I went with keeping it separate for now, and built a wrapper for node at https://github.com/rom1504/node-minecraft-assets/
I think it probably make sense to keep it separate, at least until it's more clear how stuff could go into mcdata.
Yes indeed it doesn't account for metadata, I need that kind of thing https://github.com/PrismarineJS/minecraft-jar-extractor/issues/3#issuecomment-198464127 for this, it's not completely easy. I think not having the metadata variation of images is ok for now.
The variant name is in the block's json file for the texture data if I recall.
Or am I wrong here.
No , each variation is in its one file, the names of these files are mapped to the block names in the client code.
I could make some python code to extract this data. (With out decompiling.) If that would help.
How would you extract that data without decompiling ?
Using jawa.
Ok yeah, that's a way to decompile.
On Wed, Mar 23, 2016, 13:18 Chibill [email protected] wrote:
Using jawa.
— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/PrismarineJS/minecraft-data/issues/78#issuecomment-200326006
No.. It's a Python module.... http://jawa.tkte.ch/
Jawa is a pure-python Java disassembler
disassembling means decompiling in this case.