1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-09-01 01:57:55 +00:00

Ensure the origin monitor is valid too

Blurh, still not sure if this is Correct or anything, but have no clue
what's causing this. Fixes #985. Hopefully.
This commit is contained in:
Jonathan Coates
2021-12-10 13:13:31 +00:00
parent 0e4b7a5a75
commit 1f6e0f287d

View File

@@ -95,7 +95,10 @@ class Expander
if( !isPositive )
{
TileEntity otherOrigin = level.getBlockEntity( otherMonitor.toWorldPos( 0, 0 ) );
if( otherOrigin == null || !origin.isCompatible( (TileMonitor) otherOrigin ) ) return false;
if( !(otherOrigin instanceof TileMonitor) || !origin.isCompatible( (TileMonitor) otherOrigin ) )
{
return false;
}
origin = (TileMonitor) otherOrigin;
}