PC-Logix / OpenFM

Streaming radio mod for Minecraft, with OpenComputers control support
MIT License
25 stars 17 forks source link

mc1.10.2 OpenFM-1.9.4-0.1.0.22 Redstone control not working #65

Closed tomevoll closed 6 years ago

tomevoll commented 6 years ago

Redstone control is not working, i tried both settings in the gui, none of them allow redstone to enable disable the radio, if you fix this could you add redstone to the speakers to, so a redstone will turn that speaker off?

tomevoll commented 6 years ago

I created a pull request,

if you don't want to change how redstone works, the main issue with redstone not working was the override in the blocks name has changed, onNeighborBlockChange no longer exist and is renamed to neighborChanged, with one extra parameter at the start, IBlockState.

Also line 160 in BlockRadio -> block.canProvidePower((IBlockState) block.getBlockState() Will throw an exception as it returns a BlockStateContainer and you can not cast it to a IBlockState.

I guess the @Override was missing on it so it was never noticed that it has changed.