diff options
| author | Technici4n <13494793+Technici4n@users.noreply.github.com> | 2021-04-21 09:18:36 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-04-21 15:18:36 +0800 |
| commit | 7ab028205ba335b25fc89d1294f95e2f358475aa (patch) | |
| tree | 01ab62169f8f9c7d0ed9aa40a92058ba6a9695a8 /RoughlyEnoughItems-default-plugin/src/main | |
| parent | 31b160aefddead9518766db50de991abfb59affb (diff) | |
| download | RoughlyEnoughItems-7ab028205ba335b25fc89d1294f95e2f358475aa.tar.gz RoughlyEnoughItems-7ab028205ba335b25fc89d1294f95e2f358475aa.tar.bz2 RoughlyEnoughItems-7ab028205ba335b25fc89d1294f95e2f358475aa.zip | |
Fix bucket with null fluid (#522)
Diffstat (limited to 'RoughlyEnoughItems-default-plugin/src/main')
| -rw-r--r-- | RoughlyEnoughItems-default-plugin/src/main/java/me/shedaniel/rei/plugin/DefaultPlugin.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/RoughlyEnoughItems-default-plugin/src/main/java/me/shedaniel/rei/plugin/DefaultPlugin.java b/RoughlyEnoughItems-default-plugin/src/main/java/me/shedaniel/rei/plugin/DefaultPlugin.java index 03c71c2b3..14305cb81 100644 --- a/RoughlyEnoughItems-default-plugin/src/main/java/me/shedaniel/rei/plugin/DefaultPlugin.java +++ b/RoughlyEnoughItems-default-plugin/src/main/java/me/shedaniel/rei/plugin/DefaultPlugin.java @@ -419,8 +419,12 @@ public class DefaultPlugin implements REIPluginV0, BuiltinPlugin { recipeHelper.registerContainerClickArea(new Rectangle(78, 32, 28, 23), BlastFurnaceScreen.class, BLASTING); FluidSupportProvider.getInstance().registerProvider(itemStack -> { Item item = itemStack.getItem(); - if (item instanceof BucketItem) - return InteractionResultHolder.success(Stream.of(EntryStack.create(((BucketItem) item).content, Fraction.ofWhole(1)))); + if (item instanceof BucketItem) { + Fluid fluid = ((BucketItem) item).content; + if (fluid != null) { + return InteractionResultHolder.success(Stream.of(EntryStack.create(fluid, Fraction.ofWhole(1)))); + } + } return InteractionResultHolder.pass(null); }); // SubsetsRegistry subsetsRegistry = SubsetsRegistry.INSTANCE; |
