Skip to content

Commit

Permalink
update mi
Browse files Browse the repository at this point in the history
  • Loading branch information
deirn committed Jun 7, 2021
1 parent 28279fd commit 7b8bcdb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/modern-industrialization-4/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ repositories {
}

dependencies {
implFor "curse.maven:modern-industrialization-405388:3321898"
implFor "curse.maven:modern-industrialization-405388:3341391"

modCompileOnly "net.fabricmc.fabric-api:fabric-transfer-api-v1:0.1.0+7678d00a7d"
modCompileOnly "net.fabricmc.fabric-api:fabric-transfer-api-v1:0.2.2+3185237c7d"
}

apply from: "impl.gradle"
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package badasintended.megane.impl;

import java.util.List;

import aztech.modern_industrialization.blocks.creativetank.CreativeTankBlockEntity;
import aztech.modern_industrialization.blocks.tank.TankBlockEntity;
import aztech.modern_industrialization.inventory.ConfigurableFluidStack;
Expand All @@ -26,6 +24,9 @@
import badasintended.megane.impl.mixin.modern_industrialization.EnergyOutputsComponentHolder;
import badasintended.megane.impl.mixin.modern_industrialization.MultiblockInventoryComponentHolder;
import badasintended.megane.util.MeganeUtils;

import java.util.List;

import net.minecraft.fluid.Fluid;
import net.minecraft.item.ItemStack;
import org.jetbrains.annotations.NotNull;
Expand All @@ -52,19 +53,19 @@ public void register(MeganeRegistrar registrar) {
))
.fluid(TankBlockEntity.class, FluidProvider.of(
t -> 1,
(t, i) -> t.resource(),
(t, i) -> t.resource().getFluid(),
(t, i) -> t.amount() / 81.0,
(t, i) -> ((ATankBlockEntity) t).getCapacity() / 81.0
))
.fluid(CreativeTankBlockEntity.class, FluidProvider.of(
t -> 1,
(t, i) -> t.resource(),
(t, i) -> t.resource().getFluid(),
(t, i) -> -1,
(t, i) -> -1
))
.fluid(MachineBlockEntity.class, FluidProvider.of(
t -> t.getInventory().getFluidStacks().size(),
(t, i) -> t.getInventory().getFluidStacks().get(i).resource(),
(t, i) -> t.getInventory().getFluidStacks().get(i).resource().getFluid(),
(t, i) -> t.getInventory().getFluidStacks().get(i).getAmount() / 81.0,
(t, i) -> t.getInventory().getFluidStacks().get(i).getCapacity() / 81.0
))
Expand All @@ -87,7 +88,7 @@ ConfigurableFluidStack getFluidStack(int slot) {

@Override
public @Nullable Fluid getFluid(MultiblockInventoryComponentHolder multiblockInventoryComponentHolder, int slot) {
return getFluidStack(slot).getFluid();
return getFluidStack(slot).getFluid().getFluid();
}

@Override
Expand Down

0 comments on commit 7b8bcdb

Please sign in to comment.