Fixed potential NPE in rotatable class... probably.

Dem race conditions.
This commit is contained in:
Florian Nücke 2015-04-26 18:03:39 +02:00
parent f7ff8afdab
commit 673f3d9a8f

View File

@ -148,13 +148,13 @@ trait Rotatable extends RotationAware with internal.Rotatable {
else false
}
override def toLocal(value: EnumFacing) = if (value != null) {
override def toLocal(value: EnumFacing) = if (value != null) this.synchronized {
updateTranslation()
cachedTranslation(value.ordinal)
}
else null
override def toGlobal(value: EnumFacing) = if (value != null) {
override def toGlobal(value: EnumFacing) = if (value != null) this.synchronized {
updateTranslation()
cachedInverseTranslation(value.ordinal)
}