From 6aca9d8457e4a8df52047247170bdf720997a1b0 Mon Sep 17 00:00:00 2001 From: David Vierra Date: Mon, 13 Jul 2015 21:03:43 -1000 Subject: [PATCH] Add Command block entity ref --- src/mceditlib/anvil/entities.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/mceditlib/anvil/entities.py b/src/mceditlib/anvil/entities.py index 1b5d296..80256fa 100644 --- a/src/mceditlib/anvil/entities.py +++ b/src/mceditlib/anvil/entities.py @@ -313,6 +313,15 @@ class PCTileEntityRefBase(object): return self.chunk.blocktypes +class PCTileEntityControlRef(PCTileEntityRefBase): + tileEntityID = "Control" + + Command = nbtattr.NBTAttr("Command", nbt.TAG_String, "") + CustomName = nbtattr.NBTAttr("CustomName", nbt.TAG_String, "") + SuccessCount = nbtattr.NBTAttr("SuccessCount", nbt.TAG_Int, 0) + TrackOutput = nbtattr.NBTAttr("TrackOutput", nbt.TAG_Byte, 1) + + def convertStackTo17(stack, blocktypes): if stack["id"].tagID == nbt.ID_STRING: stack["id"] = nbt.TAG_Short(blocktypes.itemTypes.internalNamesByID[stack["id"].value]) @@ -359,6 +368,8 @@ _tileEntityClasses = { "Chest": PCTileEntityChestRef, "Trap": PCTileEntityChestRef, "Hopper": PCTileEntityChestRef, + "Control": PCTileEntityControlRef, + } def validate(ref):