prismarinejs / minecraft-jar-extractor Goto Github PK
View Code? Open in Web Editor NEWExtract structured data from the minecraft jar
Extract structured data from the minecraft jar
minecraft-jar-extractor/image_names.js
Line 235 in 95216bc
Take furnace.json
for example...
{
"parent": "minecraft:block/orientable",
"textures": {
"top": "minecraft:block/furnace_top",
"front": "minecraft:block/furnace_front",
"side": "minecraft:block/furnace_side"
}
}
Top doesn't really represent "furnace":
I wonder if it should use front
if present?
So people can examine it manually. See http://b.wiki.vg/1.6.1...1.6.2
23 | | on the topic of rendering chunk, it would help to have in minecraft-data the block models (not the shape, the model) and the textures uv (which texture to which block face) At the moment this data is missing. I know that for old versions the model was hardcoded, but some recent texture pack can also edit the model (in json)
image_names.js can be extended to copy more files from the client jar
$ node downloadDecompile.js 1.14 /tmp/the_output
Decompiled at /tmp/the_output/decompiled
$ node protocol_extractor.js /tmp/the_output/decompiled
fs.js:133
throw new ERR_INVALID_CALLBACK();
^
TypeError [ERR_INVALID_CALLBACK]: Callback must be a function
at maybeCallback (fs.js:133:9)
at Object.writeFile (fs.js:1179:14)
at write (/root/minecraft-jar-extractor/protocol_extractor.js:29:6)
at linesToProtocol (/root/minecraft-jar-extractor/protocol_extractor.js:49:3)
at fn (/root/minecraft-jar-extractor/node_modules/async/lib/async.js:638:34)
at Immediate.<anonymous> (/root/minecraft-jar-extractor/node_modules/async/lib/async.js:554:34)
at processImmediate (internal/timers.js:443:21)
To avoid having to write the mapping manually.
That would make the process one step.
Better have some check for dir existence to avoid decompiling every time.
/image_name.js:249
const itemTextures = mcData.itemsArray.map(item => {
^
TypeError: Cannot read property 'map' of undefined
at getItems (/home/minecraft/server/mc_assets/assets-extract/image_name.js:249:41)
at /home/minecraft/server/mc_assets/assets-extract/image_name.js:302:5
at /home/minecraft/server/mc_assets/assets-extract/get_minecraft_files.js:19:7
at ZipFile.<anonymous> (/home/minecraft/server/mc_assets/assets-extract/node_modules/extract-zip/index.js:40:11)
at emitNone (events.js:86:13)
at ZipFile.emit (events.js:185:7)
at FdSlicer.<anonymous> (/home/minecraft/server/mc_assets/assets-extract/node_modules/yauzl/index.js:182:10)
at FdSlicer.g (events.js:292:16)
at emitNone (events.js:86:13)
at FdSlicer.emit (events.js:185:7)
at onCloseDone (/home/minecraft/server/mc_assets/assets-extract/node_modules/fd-slicer/index.js:74:12)
at /home/minecraft/server/mc_assets/assets-extract/node_modules/graceful-fs/graceful-fs.js:57:14
at FSReqWrap.oncomplete (fs.js:123:15)
I am getting this error here trying to run for 1.17.1
/minecraft-jar-extractor/node_modules/yggdrasil/src/Client.js:14
else options.token = options.token ?? uuid.v4()
^
SyntaxError: Unexpected token ?
at Module._compile (internal/modules/cjs/loader.js:723:23)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object.<anonymous> (/home/minecraft/server/mc_assets/minecraft-jar-extractor/node_modules/yggdrasil/src/index.js:1:16)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object.<anonymous> (/home/minecraft/server/mc_assets/minecraft-jar-extractor/node_modules/minecraft-wrap/lib/wrap_client.js:4:13)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.