I want to add a type of powered rail that has a direction, relative of the rail's shape. This would allow for propelling stationary minecarts and more strict railway systems. Currently, I have added the block, and minecarts can travel on it, but it does not propel the rail like a powered rail block.
class DirectionalPoweredRailBlock(properties: Properties) : PoweredRailBlock(properties) {
companion object {
val FORWARD: BooleanProperty = BooleanProperty.create("forward")
}
init {
this.registerDefaultState(this.defaultBlockState().setValue(FORWARD, true))
}
override fun createBlockStateDefinition(builder: StateDefinition.Builder<Block, BlockState>) {
super.createBlockStateDefinition(builder)
builder.add(FORWARD)
}
}