Skip to content

Commit b3a51f3

Browse files
committed
Fix gas nozzle equals() to be more sensible
1 parent 9e4b1b0 commit b3a51f3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

common/src/main/kotlin/org/valkyrienskies/clockwork/integration/cc/GasNozzlePeripheral.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@ class GasNozzlePeripheral(private val be: GasNozzleBlockEntity): IPeripheral {
2525
@LuaFunction fun getBalloonVolume() = be.balloonVolume
2626
@LuaFunction fun getLeaks() = if (be.hasPocket) be.currentIdealOutput.toInt() else 0
2727

28-
override fun equals(p0: IPeripheral?): Boolean = be.level?.getBlockState(be.blockPos)?.`is`(ClockworkBlocks.GAS_NOZZLE.get()) == true
28+
override fun equals(p0: IPeripheral?): Boolean = be.blockPos == (p0 as? GasNozzlePeripheral)?.be?.blockPos
2929
override fun getType(): String = "cw_gas_nozzle"
3030
}

0 commit comments

Comments
 (0)