import filter_utils # Special import that is dynamically generated before the filter is loaded
print filter_utils.Available_Attributes() # Currently prints ['editor', 'materials']
print filter_utils.editor # Replaces the injected global 'editor' variable, points to a LevelEditor instance, old injected way still works
inputs = (
("Block", filter_utils.materials["minecraft:stone[variant=granite]"]), # Gives the level's materials, instead of haveing to import alphaMaterials or pocketMaterials from pymclevel.materials
("Using new inputs", "label"),
from EventedList import EventedList
class Test:
def __init__(self):
self.old = [0,1,2,3,4,5,6,7,8,9,10]
self.list = EventedList(self.old)
self.list.register(self.testAppend, self.list.append)
self.list.register(self.testInsert, self.list.insert)
View mcedit_waypoints.dat format
NBTFile: {2 Entries}
TAG_Compound(u'LastPosition'): {3 Entries}
TAG_Int(u'Dimension'): 0
TAG_List(u'Coordinates'): [3 TAG_Float(s)]
TAG_Float: 95.6182479858
TAG_Float: 59.3979263306
TAG_Float: -373.019592285
# Example Filter that can be updated
VERSION = "0.0.0"
def perform(level, box, options):
global editor
View Builder.cs
using UnityEngine;
using UnityEditor;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using Stopwatch = System.Diagnostics.Stopwatch;
public class Builder {
private static string[] levels = new string[] {"Assets/<Scene File.unity>"};
# Define the 'libraries' variable just like you would for inputs
# ====Notes====
# * ALWAYS check if the library is available, even if you mark it as '"optional": False'
# * If this ability is abused, it can\will be removed at any of the developers discretion, so please don't abuse it
# * The "path" field starts from a 'lib' subfolder in the 'Filters' directory
# * Keep the libraries small, MCEdit downloads the entire file, not just parts that are used in the filter
# * In reference to the note above, MCEdit downloads the libraries on the main thread, so the entire panel may take awhile to show up
# * These libraries can be other file types too, but you have to parse them and remember Note #3
View macros.json
"Macros": {
"Test": {
"Number of steps": 3,
"0": {
"Inputs": {
"Biome": "Ocean"
"Name": "Setbiome"
# Thanks to TexelElf for this faster method of version independent editor grabbing code
def perform(level, box, options):
global editor
import inspect
editor = inspect.stack()[1][0].f_locals.get('self', None).editor
View Filter
# Anywhere in your filter as long as it is not inside a function. Should be on the same column as "displayName"
VERSION = "<Filter Version. Checked against the Update Page's version>"
UPDATE_URL = "<URL that points to the filters update page. This should be in the Page Format above>"
# Rest of filter