Package: mcworldtools
MCWorldToolsUseful tools for Minecraft worlds such as removing unused chunks and finding blocks, command blocks or entities.Tested from1.7.10up to1.18.2.Installationpip install mcworldtoolsUsageYou can simply run the commandmcworldtoolsin a Minecraft world folder.The script will tell you the name of your Minecraft world and - if possible, it may not be in older versions - the Minecraft version of your world.After that you can choose which tool you want to use by stating the number of the tool.WarningDoNOTuse these tools for a world that is currently opened (i.e. in Minecraft Singleplayer or by a Minecraft server).
Doing so may lead to unintended consequences. I do NOT take any responsibility for your Minecraft world if you do that.Further usagemcworldtools [-h] [-w WORLD] [-t TOOL] [-o OUTPUT_FILE] [-f {plain,json,yaml}] [--confirm]Arguments-h --helpShow the help message and exit.-v --versionShow the installed version and exit.-w WORLD, --world WORLDUse a different world folder than the current working directory. You can provide this option multiple times for multiple words.-t TOOL, --tool TOOLChoose the tool to use beforehand.-o OUTPUT_FILE, --output-file OUTPUT_FILESelect a file to write the output statistics to. This option is mandatory when searching for something.-f {plain,json,yaml}, --output-format {plain,json,yaml}The output file format. May beplain(default),jsonoryaml.-i INPUT_FILE, --input-file INPUT_FILESelect a file to read input values from. Seebelowfor more information.--confirmAutomatically confirm any confirmation requests.Dimension notesYou can state dimensions in input files or when you are asked for locations when removing blocks or command blocks.Dimensions will be returned when finding blocks, command blocks or entities.A dimension may be one ofoverworld,netherorend.
Please note that when using this tool on server worlds where nether and end are in seperate folders (world_netherandworld_the_end) and you are executing the script on one of these, the dimension will beoverworldbecause there is no way of detecting to which dimension the world folder is belonging.The dimensionsnetherandendwill only be used if the nether and end files are in a folder namedWORLD_FOLDER/DIM-1(nether) orWORLD_FOLDER/DIM1(end).Input filesThe content of the input files stated in the command have to be in valid json format.You don't have to specify anything in the input file, but you won't get asked for something that you specified. That is useful for automated tasks.Here is what you can change with these input files:Remove unused chunks{"inhabited_time":0}inhabited_time- The time for how long a player may have been in a chunk for it to be deleted (in seconds). Defaults to 0.Find/remove command blocksPossibility 1: Finding command blocks{"action":1,"only_executing":false,"dimension":"overworld"}action-1for finding command blocks.only_executing- If enabled, only command blocks that are either powered or in automatic mode will be found.dimension- The dimension in which command blocks should be searched. Set tonullfor all dimensions. Seedimension notesfor more information.Possibility 2: Removing command blocks{"action":2,"locations":[{"dimension":"overworld","x":3,"y":72,"z":6},{"dimension":"nether","x":5,"y":129,"z":200}]}action-2for removing command blocks.locations- A list of locations where command blocks should be removed. Fordimensionsee thedimension notes.Find/remove entitiesPossibility 1: Finding entities{"action":1,"id":"minecraft:zombie","dimension":"overworld","nbt_keys":["OnGround","Age"]}action-1for finding entities.id- The entity id to filter entities. Set tonullfor all entities. You don't have to prepend it withminecraft:dimension- The dimension in which entities should be searched. Set tonullfor all dimensions. Seedimension notesfor more information.nbt_keys- A list of NBT keys to be included in the output. Set to[](empty list) for all NBT keys. Set tonullto not include any NBT keys.Possibility 2: Removing entities by id{"action":2,"remove_by":"id","id":"minecraft:zombie"}action-2for removing entities.remove_by-idfor removing by id.id- The id of which entities should be removed.Possibility 3: Removing entities by uuid{"action":2,"remove_by":"uuid","uuid":"325cdf04-8211-4f7d-8a47-79b291c1ca77"}action-2for removing entities.remove_by-uuidfor removing by uuid.uuid- The uuid of the entity to remove.Possibility 4: Removing all entities{"action":2,"remove_by":"all"}action-2for removing entities.remove_by-allfor removing all entities.