Created
February 6, 2023 12:07
-
-
Save MPThLee/2f0c5006a83a8ddd40d5a8ca3655f095 to your computer and use it in GitHub Desktop.
Remove Items in RefinedStorage Extra Disks - Infinite Item Disk.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# pip install nbt | |
from nbt import nbt | |
# list of deletion | |
l = ["supplementaries:quiver", | |
"mekanismtools:lapis_lazuli_helmet", | |
"mekanismtools:lapis_lazuli_chestplate", | |
"mekanismtools:lapis_lazuli_boots", | |
"mekanismtools:lapis_lazuli_leggings", | |
"minecraft:chainmail_helmet", | |
"minecraft:chainmail_chestplate", | |
"minecraft:chainmail_boots", | |
"minecraft:chainmail_leggings", | |
"minecraft:diamond_helmet", | |
"minecraft:diamond_chestplate", | |
"minecraft:diamond_boots", | |
"minecraft:diamond_leggings", | |
"minecraft:netherite_helmet", | |
"minecraft:netherite_chestplate", | |
"minecraft:netherite_boots", | |
"minecraft:netherite_leggings", | |
"minecraft:trident", | |
"mekanismtools:lapis_lazuli_sword"] | |
nbtfile = nbt.NBTFile('refinedstorage_disks.dat', 'rb') | |
for x in nbtfile["data"][0]: | |
if x["Data"]["Capacity"].__str__() == "-1" and x["Type"].__str__() == "refinedstorage:item": | |
tl = [] | |
tx = 0 | |
for i in range(len(x["Data"]["Items"])): | |
if x["Data"]["Items"][i]["Id"].__str__() in l: | |
tl.append(i) | |
for o in tl: | |
x["Data"]["Items"].__delitem__(o-tx) | |
tx += 1 | |
nbtfile.write_file("newnbt1.dat") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment