Compare commits

..

1 Commits

Author SHA1 Message Date
Shadowfacts 24b7896151
Add actual Redstone Controller model 2021-02-24 18:58:22 -05:00
1 changed files with 1 additions and 2 deletions

View File

@ -12,7 +12,6 @@ import net.minecraft.util.math.BlockPos
import net.minecraft.util.math.Direction
import net.minecraft.world.BlockView
import net.minecraft.world.World
import net.minecraft.world.WorldAccess
import net.shadowfacts.phycon.PhysicalConnectivity
import net.shadowfacts.phycon.network.FaceDeviceBlock
import java.util.*
@ -50,8 +49,8 @@ class RedstoneControllerBlock: FaceDeviceBlock<RedstoneControllerBlockEntity>(Se
return state.with(LIT, isPowered(context.world, context.blockPos, state[FACING]))
}
// todo: does this need to be separate from getStateForNeighborUpdate?
override fun neighborUpdate(state: BlockState, world: World, pos: BlockPos, neighborBlock: Block, neighborPos: BlockPos, bl: Boolean) {
// this can't be done in getStateForNeighborUpdate because getEmittedRedstonePower is defined in World not WorldAccess
if (!world.isClient) {
val wasLit = state[LIT]
val isLit = isPowered(world, pos, state[FACING])