diff --git a/gradle.properties b/gradle.properties index 7ca8c68..d7caa40 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,14 +1,14 @@ minecraft_version=1.21 -neoforge_version=21.0.63-beta -ae2_version=19.0.8-alpha -mekanism_version=10.6.4.50 +neoforge_version=21.0.87-beta +ae2_version=19.0.11-alpha +mekanism_version=10.6.5.52 emi_version=1.1.10 jade_id=5493270 loader_version_range=[1,) neo_version_range=[21.0,) -ae2_version_range=[19.0.0,20.0.0) -mekanism_version_range=[10.6.0,11-) +ae2_version_range=[19.0.11-alpha,20.0.0) +mekanism_version_range=[10.6.5,11-) org.gradle.caching=true org.gradle.configuration-cache=true diff --git a/src/main/java/me/ramidzkh/mekae2/AppliedMekanistics.java b/src/main/java/me/ramidzkh/mekae2/AppliedMekanistics.java index 018e6a6..5bb54a4 100644 --- a/src/main/java/me/ramidzkh/mekae2/AppliedMekanistics.java +++ b/src/main/java/me/ramidzkh/mekae2/AppliedMekanistics.java @@ -6,10 +6,7 @@ import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.core.registries.Registries; import net.minecraft.resources.ResourceLocation; -import net.minecraft.world.entity.player.Player; -import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.block.Block; -import net.minecraft.world.level.block.entity.BlockEntity; import net.neoforged.api.distmarker.Dist; import net.neoforged.bus.api.EventPriority; import net.neoforged.bus.api.IEventBus; @@ -33,20 +30,12 @@ import appeng.api.behaviors.GenericSlotCapacities; import appeng.api.client.StorageCellModels; import appeng.api.features.P2PTunnelAttunement; -import appeng.api.implementations.blockentities.IChestOrDrive; import appeng.api.parts.RegisterPartCapabilitiesEvent; import appeng.api.stacks.AEKeyType; import appeng.api.stacks.AEKeyTypes; -import appeng.api.storage.StorageCells; -import appeng.api.storage.cells.IBasicCellItem; -import appeng.api.storage.cells.ICellGuiHandler; -import appeng.api.storage.cells.ICellHandler; import appeng.api.upgrades.Upgrades; import appeng.core.definitions.AEItems; import appeng.core.localization.GuiText; -import appeng.menu.MenuOpener; -import appeng.menu.locator.MenuLocators; -import appeng.menu.me.common.MEStorageMenu; import appeng.parts.automation.StackWorldBehaviors; @Mod(AppliedMekanistics.ID) @@ -122,20 +111,6 @@ private void registerGenericAdapters(RegisterCapabilitiesEvent event) { } private void initializeModels() { - StorageCells.addCellGuiHandler(new ICellGuiHandler() { - @Override - public boolean isSpecializedFor(ItemStack cell) { - return cell.getItem() instanceof IBasicCellItem basicCellItem - && basicCellItem.getKeyType() == MekanismKeyType.TYPE; - } - - @Override - public void openChestGui(Player player, IChestOrDrive chest, ICellHandler cellHandler, ItemStack cell) { - MenuOpener.open(MEStorageMenu.TYPE, player, - MenuLocators.forBlockEntity((BlockEntity) chest)); - } - }); - for (var tier : AMItems.Tier.values()) { var cell = AMItems.get(tier); var portable = AMItems.getPortableCell(tier); diff --git a/src/main/java/me/ramidzkh/mekae2/ae2/ChemicalP2PTunnelPart.java b/src/main/java/me/ramidzkh/mekae2/ae2/ChemicalP2PTunnelPart.java index cabdd6a..6bfa622 100644 --- a/src/main/java/me/ramidzkh/mekae2/ae2/ChemicalP2PTunnelPart.java +++ b/src/main/java/me/ramidzkh/mekae2/ae2/ChemicalP2PTunnelPart.java @@ -25,7 +25,7 @@ import mekanism.api.chemical.slurry.Slurry; import mekanism.api.chemical.slurry.SlurryStack; -import appeng.api.config.PowerUnits; +import appeng.api.config.PowerUnit; import appeng.api.parts.IPartItem; import appeng.api.parts.IPartModel; import appeng.items.parts.PartModels; @@ -140,7 +140,7 @@ public S insertChemical(int tank, S stack, Action action) { } if (action == Action.EXECUTE) { - part.queueTunnelDrain(PowerUnits.AE, (double) total / MekanismKeyType.TYPE.getAmountPerOperation()); + part.queueTunnelDrain(PowerUnit.AE, (double) total / MekanismKeyType.TYPE.getAmountPerOperation()); } return ChemicalBridge.withAmount(stack, stack.getAmount() - total); @@ -234,7 +234,7 @@ public S extractChemical(int tank, long maxAmount, Action action) { var result = input.get().extractChemical(tank, maxAmount, action); if (action.execute()) { - part.queueTunnelDrain(PowerUnits.AE, + part.queueTunnelDrain(PowerUnit.AE, (float) result.getAmount() / MekanismKeyType.TYPE.getAmountPerOperation()); } diff --git a/src/main/java/me/ramidzkh/mekae2/ae2/GenericStackChemicalStorage.java b/src/main/java/me/ramidzkh/mekae2/ae2/GenericStackChemicalStorage.java index ea9cf60..6ab63de 100644 --- a/src/main/java/me/ramidzkh/mekae2/ae2/GenericStackChemicalStorage.java +++ b/src/main/java/me/ramidzkh/mekae2/ae2/GenericStackChemicalStorage.java @@ -60,7 +60,7 @@ public long getTankCapacity(int tank) { @Override public boolean isValid(int tank, S stack) { var what = MekanismKey.of(stack); - return what == null || inv.isAllowed(what); + return what == null || inv.isAllowedIn(tank, what); } @Override diff --git a/src/main/java/me/ramidzkh/mekae2/data/RecipeProvider.java b/src/main/java/me/ramidzkh/mekae2/data/RecipeProvider.java index 11ab1d4..2dbec91 100644 --- a/src/main/java/me/ramidzkh/mekae2/data/RecipeProvider.java +++ b/src/main/java/me/ramidzkh/mekae2/data/RecipeProvider.java @@ -55,9 +55,10 @@ protected void buildRecipes(RecipeOutput output) { .requires(housing) .requires(cellComponent) .unlockedBy("has_cell_component" + tierName, has(cellComponent)) + .unlockedBy("has_chemical_housing", has(housing)) .save(output); ShapelessRecipeBuilder.shapeless(RecipeCategory.MISC, AMItems.getPortableCell(tier)::get) - .requires(AEBlocks.CHEST) + .requires(AEBlocks.ME_CHEST) .requires(cellComponent) .requires(AEBlocks.ENERGY_CELL) .requires(housing)