Better Boilers

Better Boilers

386k Downloads

<development issue> Turbine controllers turn themselves into boiler controllers (or vice versa, depending on code)

LemmaEOF opened this issue ยท 1 comments

commented

Version affected: latest CI builds

Replicate: place down a boiler controller and turbine controller

Result: either the boiler controller will turn itself into a turbine controller, or the turbine controller will turn itself into a boiler controller

Flaw: TileEntityMultiblockController is fundamentally dependent on TileEntityBoilerController, requiring it for setControllerStatus and setBlockState (https://github.com/elytra/BetterBoilers/blob/master/src/main/java/com/elytradev/betterboilers/tile/TileEntityMultiblockController.java#L42), and the if-statement put in to mitigate doesn't fix

commented

I think I've found something functioning?

if (world.getBlockState(this.getPos()).getBlock() == ModBlocks.BOILER_CONTROLLER) {
  setControllerStatus(TileEntityBoilerController.ControllerStatus.ACTIVE, "msg.bb.noIssue");
} else {
  setControllerStatus(TileEntityTurbineController.ControllerStatus.ACTIVE, "msg.bb.noIssue");
}

It isn't giving me any problems at the moment, so it looks like this is doing ok.