Compare commits
1 Commits
24b7896151
...
7365faeca8
Author | SHA1 | Date |
---|---|---|
Shadowfacts | 7365faeca8 |
|
@ -12,6 +12,7 @@ import net.minecraft.util.math.BlockPos
|
||||||
import net.minecraft.util.math.Direction
|
import net.minecraft.util.math.Direction
|
||||||
import net.minecraft.world.BlockView
|
import net.minecraft.world.BlockView
|
||||||
import net.minecraft.world.World
|
import net.minecraft.world.World
|
||||||
|
import net.minecraft.world.WorldAccess
|
||||||
import net.shadowfacts.phycon.PhysicalConnectivity
|
import net.shadowfacts.phycon.PhysicalConnectivity
|
||||||
import net.shadowfacts.phycon.network.FaceDeviceBlock
|
import net.shadowfacts.phycon.network.FaceDeviceBlock
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
@ -49,8 +50,8 @@ class RedstoneControllerBlock: FaceDeviceBlock<RedstoneControllerBlockEntity>(Se
|
||||||
return state.with(LIT, isPowered(context.world, context.blockPos, state[FACING]))
|
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) {
|
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) {
|
if (!world.isClient) {
|
||||||
val wasLit = state[LIT]
|
val wasLit = state[LIT]
|
||||||
val isLit = isPowered(world, pos, state[FACING])
|
val isLit = isPowered(world, pos, state[FACING])
|
||||||
|
|
Loading…
Reference in New Issue