Skip to content

MCExtractAPI

Parameters

NameTypeDescription
mcdirectorystr
loggerbool

Methods

accept_eula

Parameters

NameTypeDescription
promptstr

get_docker

Parameters

NameTypeDescription
mcversionstr

extract

Extracts data and assets folders from the Minecraft jar.

Parameters

NameTypeDescription
jar_filestrThe client jar to extract.
assetsboolExtract the assets folder?, defaults to False
databoolExtract the data folder?, defaults to False
outputstrThe output folder, defaults to generate
accept_eulaboolSpecifies whether to automatically accept the Minecraft EULA Terms, defaults to False

generate

Use Minecraft's built-in data generator.

Parameters

NameTypeDescription
mcversionstrThe Minecraft version to download or path to the jar.
argslist
outputstrThe output folder, defaults to generate
accept_eulaboolSpecifies whether to automatically accept the Minecraft EULA Terms, defaults to False

map

Maps Minecraft's objects using an index file.

Parameters

NameTypeDescription
index_filestrThe JSON file used to map objects.
objects_directorystrThe directory that contains the objects to map, defaults to None
outputstrThe output folder, defaults to generate
accept_eulaboolSpecifies whether to automatically accept the Minecraft EULA Terms, defaults to False

Example

py
import mcextract

api = mcextract.MCExtractAPI()
api.extract("1.20.4/1.20.4.jar", True, True, accept_eula=False)
api.map("16.json", accept_eula=True)
api.generate("1.20.6", ['--client', '--server', '--reports'], accept_eula=True)

Not associated with or approved by Mojang Studios or Microsoft