diff --git a/src/modern-industrialization-4/build.gradle b/src/modern-industrialization-4/build.gradle index 0f2b1db..f48c263 100644 --- a/src/modern-industrialization-4/build.gradle +++ b/src/modern-industrialization-4/build.gradle @@ -1,16 +1,7 @@ -repositories { - maven { - url "https://raw.githubusercontent.com/Technici4n/Technici4n-maven/master/" - content { - includeGroup "net.fabricmc.fabric-api" - } - } -} - dependencies { - implFor "curse.maven:modern-industrialization-405388:3341391" + implFor "curse.maven:modern-industrialization-405388:3386664" - modCompileOnly "net.fabricmc.fabric-api:fabric-transfer-api-v1:0.2.2+3185237c7d" + modCompileOnly fabricApi.module("fabric-transfer-api-v1", "0.37.0+1.16") } 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 eb80a36..52ee5c4 100644 --- a/src/modern-industrialization-4/java/badasintended/megane/impl/ModernIndustrialization.java +++ b/src/modern-industrialization-4/java/badasintended/megane/impl/ModernIndustrialization.java @@ -1,5 +1,7 @@ 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; @@ -24,14 +26,12 @@ 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; import org.jetbrains.annotations.Nullable; +@SuppressWarnings("UnstableApiUsage") public class ModernIndustrialization implements MeganeModule { @Override @@ -53,19 +53,19 @@ public void register(MeganeRegistrar registrar) { )) .fluid(TankBlockEntity.class, FluidProvider.of( t -> 1, - (t, i) -> t.resource().getFluid(), - (t, i) -> t.amount() / 81.0, + (t, i) -> t.getResource().getFluid(), + (t, i) -> t.getAmount() / 81.0, (t, i) -> ((ATankBlockEntity) t).getCapacity() / 81.0 )) .fluid(CreativeTankBlockEntity.class, FluidProvider.of( t -> 1, - (t, i) -> t.resource().getFluid(), + (t, i) -> t.getResource().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().getFluid(), + (t, i) -> t.getInventory().getFluidStacks().get(i).getResource().getFluid(), (t, i) -> t.getInventory().getFluidStacks().get(i).getAmount() / 81.0, (t, i) -> t.getInventory().getFluidStacks().get(i).getCapacity() / 81.0 )) @@ -105,7 +105,7 @@ public double getMax(MultiblockInventoryComponentHolder multiblockInventoryCompo t -> t.getInventory().getItemStacks().size(), (t, i) -> { ConfigurableItemStack stack = t.getInventory().getItemStacks().get(i); - return stack.resource().toStack(stack.getCount()); + return stack.getResource().toStack(stack.getCount()); } )) .inventory(999, MultiblockInventoryComponentHolder.class, new InventoryProvider() { @@ -124,7 +124,7 @@ public int size(MultiblockInventoryComponentHolder multiblockInventoryComponentH ConfigurableItemStack stack = slot < input.size() ? input.get(slot) : output.get(slot - input.size()); - return stack.resource().toStack(stack.getCount()); + return stack.getResource().toStack(stack.getCount()); } }) .progress(CrafterComponentHolder.class, new ProgressProvider() {