Skip to content

Commit

Permalink
Added: ALT+Mouseover shows full NBT tags for TileEntities.
Browse files Browse the repository at this point in the history
Without ALT, shows tags minus the "Items" tag.
  • Loading branch information
codewarrior0 committed Apr 11, 2013
1 parent 312c90a commit c3bc76b
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions editortools/select.py
Expand Up @@ -12,6 +12,7 @@
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE."""
import os
import traceback
from OpenGL import GL

from collections import defaultdict
Expand All @@ -31,6 +32,7 @@
from pymclevel.box import Vector, BoundingBox, FloatBox
from fill import BlockFillOperation
import tempfile
from pymclevel import nbt

SelectSettings = config.Settings("Selection")
SelectSettings.showPreviousSelection = SelectSettings("Show Previous Selection", True)
Expand Down Expand Up @@ -281,8 +283,13 @@ def describeBlockAt(self, pos):
text += "{id}: {pos}\n".format(id=t["id"].value, pos=[t[a].value for a in "xyz"])
except Exception, e:
text += repr(e)
if "Items" not in t:
text += str(t)
if "Items" in t and not pygame.key.get_mods() & pygame.KMOD_ALT:
text += "--Items omitted. ALT to view. Double-click to edit.--\n"
t = nbt.TAG_Compound(list(t.value))
del t["Items"]

text += str(t)

return text

@property
Expand Down

0 comments on commit c3bc76b

Please sign in to comment.