This file contains 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
# 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 |
This file contains 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
# Thanks to TexelElf for this faster method of version independent editor grabbing code | |
def perform(level, box, options): | |
global editor | |
try: | |
editor | |
except: | |
import inspect | |
editor = inspect.stack()[1][0].f_locals.get('self', None).editor |
This file contains 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
{ | |
"Macros": { | |
"Test": { | |
"Number of steps": 3, | |
"0": { | |
"Inputs": { | |
"Biome": "Ocean" | |
}, | |
"Name": "Setbiome" | |
}, |
This file contains 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
# 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 |
This file contains 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
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>"}; |
This file contains 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
# Example Filter that can be updated | |
VERSION = "0.0.0" | |
UPDATE_URL = "http://podshot.github.io/update_json.json" | |
def perform(level, box, options): | |
global editor | |
try: | |
editor | |
except: |
This file contains 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
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 |
This file contains 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
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) |
This file contains 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
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 | |
try: | |
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"), | |
) |
This file contains 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
""" | |
Standalone chunk loader/reader from pymclevel with all the fancy repair/OOP stuff removed | |
""" | |
from __future__ import unicode_literals, print_function | |
import os | |
try: | |
from pymclevel import nbt | |
except ImportError: | |
import nbt | |
import struct |
OlderNewer