Industrial Revolution

Industrial Revolution

5M Downloads

[BUG] Coal Generator continues to burn coal even when full. Making it quite difficut to use.

douglasg14b opened this issue ยท 2 comments

commented

Description:

The coal generator keeps on burning coal even when full. This means it always burns coal at the maximum speed, regardless of energy actually used.

This makes the bloc quite tedious and frustrating to use, as it takes the automation part of machines away since it requires babysitting to not chew through all your coal.

Steps to Reproduce:

  1. Use the coal generator
  2. Let it fill up
  3. Watch it keep burning all the coal that goes into it

Technical Information:

  • Minecraft: 1.20.1
  • Fabric API: 0.81.6
  • Industrial Revolution: 1.16-BETA
  • Modpack: N/A

Logs:

No relevant logs, assumed this is a clogic bug

Details:

image\

The generator doesn't fill up all the way, and the code here means it just keeps on generating:

override fun shouldGenerate(): Boolean {
if (burnTime > 0) burnTime--
else if (energyCapacity > energy) {
val inventory = inventoryComponent?.inventory ?: return false
val invStack = inventory.getStack(2)
val item = invStack.item
if (!invStack.isEmpty && getFuelMap().containsKey(invStack.item)) {
burnTime = getFuelMap()[invStack.item] ?: return false
maxBurnTime = burnTime
invStack.decrement(1)
if (item.hasRecipeRemainder())
inventory.setStack(2, ItemStack(item.recipeRemainder))
}
markDirty()
}
return burnTime > 0 && energy < energyCapacity
}

commented

Fixed as of 1.16.2, thanks for reporting.

commented

Thanks @GabrielOlvH!