Last active
September 6, 2016 14:01
-
-
Save Podshot/a3a8d71be2eaf65c2c728be817f1f8ef to your computer and use it in GitHub Desktop.
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"), | |
) | |
except ImportError, AttributeError: | |
inputs = ( | |
("Block", alphaMaterials["minecraft:stone[variant=granite]"]), | |
("Test", False), | |
("Test 2", 1), | |
("Using old inputs", "label"), | |
) | |
def perform(level, box, options): | |
pass |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment