Fix CapabilityCache reporting wrong block position and direction
This commit is contained in:
parent
f3b6926a45
commit
9fb57259bd
@ -46,6 +46,7 @@ import ru.dbotthepony.mc.otm.core.collect.WeakHashSet
|
||||
import ru.dbotthepony.mc.otm.core.get
|
||||
import ru.dbotthepony.mc.otm.core.math.BlockRotation
|
||||
import ru.dbotthepony.mc.otm.core.math.RelativeSide
|
||||
import ru.dbotthepony.mc.otm.core.math.plus
|
||||
import ru.dbotthepony.mc.otm.core.util.IntCounter
|
||||
import ru.dbotthepony.mc.otm.core.util.Savetables
|
||||
import ru.dbotthepony.mc.otm.core.util.TickList
|
||||
@ -280,9 +281,10 @@ abstract class MatteryBlockEntity(p_155228_: BlockEntityType<*>, p_155229_: Bloc
|
||||
|
||||
val creationVersion = ++currentVersion
|
||||
|
||||
val direction = blockRotation.side2Dir(side)
|
||||
|
||||
cache = BlockCapabilityCache.create(
|
||||
capability, level, blockPos,
|
||||
blockRotation.side2Dir(side),
|
||||
capability, level, blockPos + direction.normal, direction.opposite,
|
||||
{ !isRemoved || creationVersion != currentVersion },
|
||||
// IllegalStateException("Do not call getCapability on an invalid cache or from the invalidation listener!")
|
||||
// what a shame.
|
||||
|
Loading…
Reference in New Issue
Block a user