diff --git a/src/modern-industrialization-4/build.gradle b/src/modern-industrialization-4/build.gradle index 3d6ae71..0f2b1db 100644 --- a/src/modern-industrialization-4/build.gradle +++ b/src/modern-industrialization-4/build.gradle @@ -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" diff --git a/src/modern-industrialization-4/java/badasintended/megane/impl/ModernIndustrialization.java b/src/modern-industrialization-4/java/badasintended/megane/impl/ModernIndustrialization.java index 715aebe..eb80a36 100644 --- a/src/modern-industrialization-4/java/badasintended/megane/impl/ModernIndustrialization.java +++ b/src/modern-industrialization-4/java/badasintended/megane/impl/ModernIndustrialization.java @@ -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; @@ -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; @@ -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 )) @@ -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