From 42c47a3a3e3b2236fcc08ebddf95a58cca259e12 Mon Sep 17 00:00:00 2001 From: asdflj <854865755@qq.com> Date: Tue, 3 Jan 2023 16:25:33 +0800 Subject: [PATCH] add super speed card support --- dependencies.gradle | 2 +- src/main/java/com/glodblock/github/FluidCraft.java | 2 ++ .../github/common/parts/PartSharedFluidBus.java | 14 +++++++++++--- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/dependencies.gradle b/dependencies.gradle index 35ddf8d541d..961f53d7d30 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -2,7 +2,7 @@ dependencies { compile('com.github.GTNewHorizons:NotEnoughItems:2.3.10-GTNH:dev') - compile('com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-127-GTNH:dev') + compile('com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-133-GTNH:dev') compile('curse.maven:cofh-core-69162:2388751') compile('com.github.GTNewHorizons:waila:1.5.22:dev') compileOnly('com.github.GTNewHorizons:ExtraCells2:2.5.25:dev') { transitive = false } diff --git a/src/main/java/com/glodblock/github/FluidCraft.java b/src/main/java/com/glodblock/github/FluidCraft.java index 195e2295f8c..95afb9e12b8 100644 --- a/src/main/java/com/glodblock/github/FluidCraft.java +++ b/src/main/java/com/glodblock/github/FluidCraft.java @@ -85,6 +85,8 @@ public static void postInit(FMLPostInitializationEvent event) { Upgrades.REDSTONE.registerItem(new ItemStack(ItemAndBlockHolder.FLUID_IMPORT_BUS), 1); Upgrades.SPEED.registerItem(new ItemStack(ItemAndBlockHolder.FLUID_EXPORT_BUS), 4); Upgrades.SPEED.registerItem(new ItemStack(ItemAndBlockHolder.FLUID_IMPORT_BUS), 4); + Upgrades.SUPERSPEED.registerItem(new ItemStack(ItemAndBlockHolder.FLUID_EXPORT_BUS), 4); + Upgrades.SUPERSPEED.registerItem(new ItemStack(ItemAndBlockHolder.FLUID_IMPORT_BUS), 4); Upgrades.CRAFTING.registerItem(new ItemStack(ItemAndBlockHolder.FLUID_EXPORT_BUS), 1); } diff --git a/src/main/java/com/glodblock/github/common/parts/PartSharedFluidBus.java b/src/main/java/com/glodblock/github/common/parts/PartSharedFluidBus.java index c9517dfbe1c..a72f5243723 100644 --- a/src/main/java/com/glodblock/github/common/parts/PartSharedFluidBus.java +++ b/src/main/java/com/glodblock/github/common/parts/PartSharedFluidBus.java @@ -115,10 +115,18 @@ public int calculateAmountToSend() { amount = amount * 4; case 1: amount = amount * 8; - case 0: - default: - return (int) Math.floor(amount); } + switch (this.getInstalledUpgrades(Upgrades.SUPERSPEED)) { + case 4: + amount = amount * 8; + case 3: + amount = amount * 12; + case 2: + amount = amount * 16; + case 1: + amount = amount * 32; + } + return (int) Math.floor(amount); } @Override