Compare commits

..

1 Commits

Author SHA1 Message Date
Shadowfacts 7365faeca8
Add actual Redstone Controller model 2021-02-24 21:42:11 -05:00
1 changed files with 2 additions and 1 deletions

View File

@ -12,6 +12,7 @@ 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.*
@ -49,8 +50,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])