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):
|
def __call__(self, rootTag, chunk=None):
|
||||||
id = rootTag["id"].value
|
id = rootTag["id"].value
|
||||||
cls = _tileEntityClasses.get(id, PCEntityRefBase)
|
cls = _tileEntityClasses.get(id, PCTileEntityRefBase)
|
||||||
return cls(rootTag, chunk)
|
return cls(rootTag, chunk)
|
||||||
|
|
||||||
PCTileEntityRef = _PCTileEntityRef()
|
PCTileEntityRef = _PCTileEntityRef()
|
||||||
|
@ -304,7 +304,10 @@ class NBTVectorAttr(NBTListAttr):
|
|||||||
return self
|
return self
|
||||||
|
|
||||||
val = super(NBTVectorAttr, self).__get__(instance, owner)
|
val = super(NBTVectorAttr, self).__get__(instance, owner)
|
||||||
|
try:
|
||||||
return Vector(*val)
|
return Vector(*val)
|
||||||
|
except TypeError:
|
||||||
|
raise TypeError("NBT list too short for Vector: %s" % list(val))
|
||||||
|
|
||||||
|
|
||||||
class KeyedVectorAttr(object):
|
class KeyedVectorAttr(object):
|
||||||
|
Reference in New Issue
Block a user