mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-16 02:39:48 -04:00
fix thread race condition in chunk render workers, closes #2902
This commit is contained in:
parent
428bbe8592
commit
096daeac75
@ -24,8 +24,8 @@ trait Rotatable extends RotationAware with internal.Rotatable {
|
|||||||
// Accessors
|
// Accessors
|
||||||
// ----------------------------------------------------------------------- //
|
// ----------------------------------------------------------------------- //
|
||||||
|
|
||||||
def pitch = if (getWorld != null && getWorld.isBlockLoaded(getPos)) getBlockType match {
|
def pitch = if (getWorld != null && getWorld.isBlockLoaded(getPos)) getWorld.getBlockState(getPos) match {
|
||||||
case rotatable if getWorld.getBlockState(getPos).getProperties.containsKey(PropertyRotatable.Pitch) => getWorld.getBlockState(getPos).getValue(PropertyRotatable.Pitch)
|
case rotatable if rotatable.getProperties.containsKey(PropertyRotatable.Pitch) => rotatable.getValue(PropertyRotatable.Pitch)
|
||||||
case _ => EnumFacing.NORTH
|
case _ => EnumFacing.NORTH
|
||||||
} else null
|
} else null
|
||||||
|
|
||||||
@ -35,9 +35,9 @@ trait Rotatable extends RotationAware with internal.Rotatable {
|
|||||||
case _ => EnumFacing.NORTH
|
case _ => EnumFacing.NORTH
|
||||||
}, yaw)
|
}, yaw)
|
||||||
|
|
||||||
def yaw = if (getWorld != null && getWorld.isBlockLoaded(getPos)) getBlockType match {
|
def yaw = if (getWorld != null && getWorld.isBlockLoaded(getPos)) getWorld.getBlockState(getPos) match {
|
||||||
case rotatable if getWorld.getBlockState(getPos).getProperties.containsKey(PropertyRotatable.Yaw) => getWorld.getBlockState(getPos).getValue(PropertyRotatable.Yaw)
|
case rotatable if rotatable.getProperties.containsKey(PropertyRotatable.Yaw) => rotatable.getValue(PropertyRotatable.Yaw)
|
||||||
case rotatable if getWorld.getBlockState(getPos).getProperties.containsKey(PropertyRotatable.Facing) => getWorld.getBlockState(getPos).getValue(PropertyRotatable.Facing)
|
case rotatable if rotatable.getProperties.containsKey(PropertyRotatable.Facing) => rotatable.getValue(PropertyRotatable.Facing)
|
||||||
case _ => EnumFacing.SOUTH
|
case _ => EnumFacing.SOUTH
|
||||||
} else null
|
} else null
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user