ComputerCraft

ComputerCraft

21M Downloads

ComputerCraftAPI.getBundledRedstoneOutput always returns -1

Vexatos opened this issue ยท 5 comments

commented

ComputerCraftAPI.getBundledRedstoneOutput always returns -1 because its side variable is an int while the method being invoked takes an EnumFacing instance, making it throw an IllegalArgumentException: argument type mismatch. I guess this is an oversight but it makes it impossible to add bundled redstone support in 1.8.9 without accessing core CC code directly.

commented

Yep, this is a mistake. Will be fixed in next update. Thanks for spotting it.

commented

I figured since it looks like there should be an EnumFacing in the API. It probably won't hurt too much to "break" the API at this stage since there aren't many CC addons for 1.8.9 out there yet and this feature wouldn't be working anyway.

commented

Fixed for 1.79

commented

I am temporarily just using the core method. Works just fine.

commented

(in the mean time, feel free to use reflection to call the method ComputerCraftAPI.getBundledRedstoneOutput calls with proper arguments)