Skip to content

Instantly share code, notes, and snippets.

@tryashtar
Created January 14, 2019 09:34
Show Gist options
  • Select an option

  • Save tryashtar/47bcde0fb9cf1759d67647857e9d70dd to your computer and use it in GitHub Desktop.

Select an option

Save tryashtar/47bcde0fb9cf1759d67647857e9d70dd to your computer and use it in GitHub Desktop.
mcedit filter to make paintings invulnerable
displayName = "Invulnerable Paintings"
def perform(level, box, options):
for (chunk, slices, point) in level.getChunkSlices(box):
for e in chunk.Entities:
x = e["Pos"][0].value
y = e["Pos"][1].value
z = e["Pos"][2].value
if (x, y, z) in box:
if e["identifier"].value == "minecraft:painting":
e["Invulnerable"].value = 1
chunk.dirty = True
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment