mirror of
https://github.com/GTNewHorizons/AE2FluidCraft-Rework.git
synced 2026-11-18 03:15:26 +00:00
add energy and quantum bridge cards (#210)
Co-authored-by: Zereff06 <[email protected]>
This commit is contained in:
1 parent
75c8f55bb9
commit
d80127933a
15 files changed
+343
-10
No files matched your search
@@ -9,6 +9,7 @@ import appeng.core.AEConfig;
|
||||
import appeng.core.localization.ButtonToolTips;
|
||||
import appeng.core.localization.GuiText;
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import gregtech.api.enums.Mods;
|
||||
|
||||
public final class ModAndClassUtil {
|
||||
|
||||
@@ -34,6 +35,7 @@ public final class ModAndClassUtil {
|
||||
public static boolean WAILA = false;
|
||||
public static boolean AVARITIA = false;
|
||||
public static boolean HODGEPODGE = false;
|
||||
public static boolean NEW_HORIZONS_CORE_MOD = false;
|
||||
|
||||
public static boolean isV2;
|
||||
public static boolean isTypeFilter;
|
||||
@@ -148,5 +150,6 @@ public final class ModAndClassUtil {
|
||||
if (Loader.isModLoaded("Waila")) WAILA = true;
|
||||
if (Loader.isModLoaded("Avaritia")) AVARITIA = true;
|
||||
if (Loader.isModLoaded("hodgepodge")) HODGEPODGE = true;
|
||||
if (Loader.isModLoaded(Mods.Names.NEW_HORIZONS_CORE_MOD)) NEW_HORIZONS_CORE_MOD = true;
|
||||
}
|
||||
}
|
||||
@@ -49,6 +49,8 @@ public class NameConst {
|
||||
public static final String ITEM_WIRELESS_FLUID_PATTERN_TERMINAL = "wireless_fluid_pattern_terminal";
|
||||
public static final String ITEM_FLUID_PART = "fluid_part";
|
||||
public static final String ITEM_FLUID_STORAGE_HOUSING = "fluid_storage_housing";
|
||||
public static final String ITEM_QUANTUM_BRIDGE_CARD = "quantum_bridge_card";
|
||||
public static final String ITEM_ENERGY_CARD = "energy_card";
|
||||
|
||||
public static final String TT_KEY = FluidCraft.MODID + ".tooltip.";
|
||||
public static final String TT_FLUID_TERMINAL = TT_KEY + "fluid_terminal";
|
||||
@@ -93,6 +95,10 @@ public class NameConst {
|
||||
public static final String TT_ULTRA_TERMINAL = TT_KEY + "ultra_terminal";
|
||||
public static final String TT_ULTRA_TERMINAL_TIPS = TT_ULTRA_TERMINAL + ".tips";
|
||||
public static final String TT_ULTRA_TERMINAL_TIPS_DESC = TT_ULTRA_TERMINAL_TIPS + ".desc";
|
||||
public static final String TT_ENERGY_CARD = TT_KEY + "energy_card";
|
||||
public static final String TT_ENERGY_CARD_DESC = TT_ENERGY_CARD + ".desc";
|
||||
public static final String TT_QUANTUM_BRIDGE_CARD = TT_KEY + "quantum_bridge_card";
|
||||
public static final String TT_QUANTUM_BRIDGE_CARD_DESC = TT_QUANTUM_BRIDGE_CARD + ".desc";
|
||||
|
||||
public static final String WAILA_KEY = FluidCraft.MODID + ".waila.";
|
||||
public static final String WAILA_ENABLE = WAILA_KEY + "enable";
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.glodblock.github.util;
|
||||
|
||||
import static com.glodblock.github.common.item.ItemBaseWirelessTerminal.infinityBoosterCard;
|
||||
import static com.glodblock.github.common.item.ItemBaseWirelessTerminal.infinityEnergyCard;
|
||||
import static com.glodblock.github.util.Util.DimensionalCoordSide.hasEnergyCard;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
@@ -91,15 +93,19 @@ public final class Util {
|
||||
c.setValidContainer(false);
|
||||
}
|
||||
ticks++;
|
||||
|
||||
if (ticks > 10 && wt != null) {
|
||||
wt.extractAEPower(pm * ticks, Actionable.MODULATE, PowerMultiplier.CONFIG);
|
||||
if (!hasEnergyCard(wt.getItemStack())) {
|
||||
wt.extractAEPower(pm * ticks, Actionable.MODULATE, PowerMultiplier.CONFIG);
|
||||
}
|
||||
ticks = 0;
|
||||
}
|
||||
|
||||
return ticks;
|
||||
}
|
||||
|
||||
public static boolean hasInfinityBoosterCard(ItemStack is) {
|
||||
if (ModAndClassUtil.WCT && is.getItem() instanceof ItemBaseWirelessTerminal) {
|
||||
if (is.getItem() instanceof ItemBaseWirelessTerminal) {
|
||||
NBTTagCompound data = Platform.openNbtData(is);
|
||||
return data.hasKey(infinityBoosterCard) && data.getBoolean(infinityBoosterCard);
|
||||
}
|
||||
@@ -632,5 +638,13 @@ public final class Util {
|
||||
data.getString("name"));
|
||||
}
|
||||
|
||||
public static boolean hasEnergyCard(ItemStack is) {
|
||||
if (is.getItem() instanceof ItemBaseWirelessTerminal) {
|
||||
NBTTagCompound data = Platform.openNbtData(is);
|
||||
return (data.hasKey(infinityEnergyCard) && data.getBoolean(infinityEnergyCard));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user