Fix recycler recipe display.
This commit is contained in:
parent
1ac4881bfa
commit
6a72d5011a
1 changed files with 11 additions and 11 deletions
|
@ -190,17 +190,14 @@ public class ReiPlugin implements REIClientPlugin {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void registerFluidSupport(FluidSupportProvider support) {
|
public void registerFluidSupport(FluidSupportProvider support) {
|
||||||
support.register(new FluidSupportProvider.Provider() {
|
support.register(stack -> {
|
||||||
@Override
|
ItemStack itemStack = stack.getValue();
|
||||||
public CompoundEventResult<Stream<EntryStack<FluidStack>>> itemToFluid(EntryStack<? extends ItemStack> stack) {
|
if (itemStack.getItem() instanceof ItemFluidInfo) {
|
||||||
ItemStack itemStack = stack.getValue();
|
Fluid fluid = ((ItemFluidInfo) itemStack.getItem()).getFluid(itemStack);
|
||||||
if (itemStack.getItem() instanceof ItemFluidInfo) {
|
if (fluid != null)
|
||||||
Fluid fluid = ((ItemFluidInfo) itemStack.getItem()).getFluid(itemStack);
|
return CompoundEventResult.interruptTrue(Stream.of(EntryStacks.of(fluid)));
|
||||||
if (fluid != null)
|
|
||||||
return CompoundEventResult.interruptTrue(Stream.of(EntryStacks.of(fluid)));
|
|
||||||
}
|
|
||||||
return CompoundEventResult.pass();
|
|
||||||
}
|
}
|
||||||
|
return CompoundEventResult.pass();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -217,6 +214,9 @@ public class ReiPlugin implements REIClientPlugin {
|
||||||
}
|
}
|
||||||
|
|
||||||
private <R extends RebornRecipe> void registerMachineRecipe(DisplayRegistry registry, RebornRecipeType<R> recipeType) {
|
private <R extends RebornRecipe> void registerMachineRecipe(DisplayRegistry registry, RebornRecipeType<R> recipeType) {
|
||||||
|
if (recipeType == ModRecipes.RECYCLER) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
Function<R, Display> recipeDisplay = r -> new MachineRecipeDisplay<>((RebornRecipe) r);
|
Function<R, Display> recipeDisplay = r -> new MachineRecipeDisplay<>((RebornRecipe) r);
|
||||||
|
|
||||||
if (recipeType == ModRecipes.ROLLING_MACHINE) {
|
if (recipeType == ModRecipes.ROLLING_MACHINE) {
|
||||||
|
@ -234,7 +234,7 @@ public class ReiPlugin implements REIClientPlugin {
|
||||||
}
|
}
|
||||||
|
|
||||||
registry.registerFiller(RebornRecipe.class, recipe -> {
|
registry.registerFiller(RebornRecipe.class, recipe -> {
|
||||||
if (recipe instanceof RebornRecipe) {
|
if (recipe != null) {
|
||||||
return recipe.getRebornRecipeType() == recipeType;
|
return recipe.getRebornRecipeType() == recipeType;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Add table
Reference in a new issue