1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-11-01 06:03:00 +00:00

Fix crash on Fabric when attempting to use a non-fuel item as fuel. (#1275)

Co-authored-by: Jonathan Coates <git@squiddev.cc>
This commit is contained in:
Emma
2022-12-29 01:22:09 -07:00
committed by GitHub
parent e241575329
commit d2c7b944ab
4 changed files with 157 additions and 2 deletions

View File

@@ -242,7 +242,8 @@ public class PlatformHelperImpl implements PlatformHelper {
@Override
public int getBurnTime(ItemStack stack) {
return FuelRegistry.INSTANCE.get(stack.getItem());
@Nullable var fuel = FuelRegistry.INSTANCE.get(stack.getItem());
return fuel == null ? 0 : fuel;
}
@Nullable