Skip to content

Commit

Permalink
plz technici4n no more mi update for 1.16
Browse files Browse the repository at this point in the history
closes #30
  • Loading branch information
deirn committed Aug 20, 2021
1 parent 7b8bcdb commit b19bd2d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 20 deletions.
13 changes: 2 additions & 11 deletions src/modern-industrialization-4/build.gradle
Original file line number Diff line number Diff line change
@@ -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"
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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
Expand All @@ -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
))
Expand Down Expand Up @@ -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<MultiblockInventoryComponentHolder>() {
Expand All @@ -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<CrafterComponentHolder>() {
Expand Down

0 comments on commit b19bd2d

Please sign in to comment.