Fix wrong default ref class created for TileEntities
This commit is contained in:
parent
d47b184fa3
commit
a9dff5c6d9
@ -431,7 +431,7 @@ class _PCTileEntityRef(object):
|
||||
|
||||
def __call__(self, rootTag, chunk=None):
|
||||
id = rootTag["id"].value
|
||||
cls = _tileEntityClasses.get(id, PCEntityRefBase)
|
||||
cls = _tileEntityClasses.get(id, PCTileEntityRefBase)
|
||||
return cls(rootTag, chunk)
|
||||
|
||||
PCTileEntityRef = _PCTileEntityRef()
|
||||
|
@ -304,7 +304,10 @@ class NBTVectorAttr(NBTListAttr):
|
||||
return self
|
||||
|
||||
val = super(NBTVectorAttr, self).__get__(instance, owner)
|
||||
return Vector(*val)
|
||||
try:
|
||||
return Vector(*val)
|
||||
except TypeError:
|
||||
raise TypeError("NBT list too short for Vector: %s" % list(val))
|
||||
|
||||
|
||||
class KeyedVectorAttr(object):
|
||||
|
Reference in New Issue
Block a user