BlesseNtumble / GalaxySpace

Addon for GalactiCraft 4
Apache License 2.0
68 stars 42 forks source link

Fuel Generator stops consuming fuel after a while #529

Closed v1993 closed 3 years ago

v1993 commented 3 years ago

  1. Minecraft version: 1.12.2
  2. Galacticraft version: 4.0.2.280
  3. GalaxySpace version: 2.0.16
  4. AsmodeusCore version (for 2.0.1 version and above): 0.0.24
  5. Side (Single player (SSP), Multiplayer (SMP), or SSP opened to LAN (LAN)): SS
  6. Other add-ons: none

    Description of the issue: I've been testing on creative map how different fuel processing approaches compare, so I put down Fuel Generator and added three buckets of fuel there, while having CESU nearby to measure energy output. After a while, I've checked this setup only to find that generator got stuck at 2937 fuel left, still generating energy but no longer consuming any fuel (so, making a free energy source). I've added another bucket of fuel, but it haven't changed anything.


Screenshot/Video: I don't think it's really needed, description says it all.


Attached log file (or url on pastebin.com): Not a crash.


v1993 commented 3 years ago

I think I've figured out what happens: energy is being produced faster than it gets drained. So it goes like this:

  1. Energy is outputted from generator.
  2. Energy gets added into internal energy buffer, filling it.
  3. smeltItem is called and calls canProcess.
  4. canProcess sees that energy buffer is full and returns false, so fuel is not consumed.

I'm not sure what the proper solution would be tho (probably to keep consuming fuel even if it energy buffer is full, like GC's coal generator does and to make it tier 2 machine if it isn't already).

v1993 commented 3 years ago

Oh, or you can just swap calls to produce and smeltItem (in TileEntityFuelGenerator.java) and this should fix the issue.