aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity
diff options
context:
space:
mode:
author梅天佑 <52530814+MeiTianyou@users.noreply.github.com>2023-05-16 23:20:41 +0800
committerGitHub <noreply@github.com>2023-05-16 17:20:41 +0200
commitcf0afb6f8246408293f5702c27487cc19aa16b41 (patch)
treebf84cf614e282cab72023cf05fa80762cd911c9a /src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity
parent04514282c08ebefdb3e68a46db34092f72be2316 (diff)
downloadGT5-Unofficial-cf0afb6f8246408293f5702c27487cc19aa16b41.tar.gz
GT5-Unofficial-cf0afb6f8246408293f5702c27487cc19aa16b41.tar.bz2
GT5-Unofficial-cf0afb6f8246408293f5702c27487cc19aa16b41.zip
Fixes several minor bugs (#630)
* Always store at least 2048 EU regardless of tier, so that the machine can work properly should close #11190 in GTNewHorizons/GT-New-Horizons-Modpack * change tooltip to match real formula should close #13238 in GTNewHorizons GT-New-Horizons-Modpack * shot in the dark to fix some chemical formulas * Fix hardcoded formula for ZrF_4 * fix nitinol formula * Add a method to count uppercase characters * A better shot at fixing chemical formulas Added ghetto detection of when there is more than 1 element in a grouping, even when their symbols combined don't exceed three characters (like hydroxide) * fix material components in ammonium tetrafluoroberyllate last in a series of commits designed to resolve #11340 in GTNewHorizons/GT-New-Horizons-Modpack * Add a method that only exposes the data orb selected by the circuot * Make the duplicator only check for recipes with the selected data orb Should close #11583 in GTNewHorizons/GT-New-Horizons-Modpack * Change TGS tooltip to reflect real behavior * Change TGS info in NEI to reflect true behavior Should close #11650 in GTNewHorizons/GT-New-Horizons-Modpack * Don't remove energy from the PSS when it attempts to fill a full hatch should resolve #13317 in GTNewHorizons/GT-New-Horizons-Modpack, where the issues was mistakenly identified as the PSS accepting power when it is full. In fact, it does stop accepting power when full, but it is constantly leaking power into hatches. However it should be noted that unless the PSS has no hatches, it pays a tax each tick which will of course mean that it is almost never going to be filled up. * Fix some minor errors due to writing all previous commmits with github's file-view edit feature try it sometime and suffer! also spotless apply * better formatting * off by one * add a line for power loss in the gui * fix 0iq moment * Revert "Don't remove energy from the PSS when it attempts to fill a full hatch" This reverts commit c20cc0b3a528872c8003bea2944aa1ad7a020e01. * typo * additional typo * Delete layout.json merp
Diffstat (limited to 'src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity')
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_ElementalDataOrbHolder.java16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_ElementalDataOrbHolder.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_ElementalDataOrbHolder.java
index 0aa1f5dd98..c1e0095726 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_ElementalDataOrbHolder.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_ElementalDataOrbHolder.java
@@ -40,7 +40,7 @@ public class GT_MetaTileEntity_Hatch_ElementalDataOrbHolder extends GT_MetaTileE
aTier,
17,
new String[] { "Holds Data Orbs for the Elemental Duplicator", "Can insert/extract the circuit slot",
- "Use Circuit to select a slot (1-16)", CORE.GT_Tooltip.get() });
+ "A circuit must be used to select a slot (1-16)", CORE.GT_Tooltip.get() });
}
public GT_MetaTileEntity_Hatch_ElementalDataOrbHolder(String aName, int aTier, String aDescription,
@@ -164,6 +164,20 @@ public class GT_MetaTileEntity_Hatch_ElementalDataOrbHolder extends GT_MetaTileE
return aContents;
}
+ public ItemStack getOrbByCircuit() {
+ ItemStack aCirc = getBaseMetaTileEntity().getStackInSlot(getCircuitSlot());
+ if (aCirc != null && ItemUtils.isControlCircuit(aCirc)) {
+ int slot = aCirc.getItemDamage() - 1; // slots are 0 indexed but there's no 0 circuit
+ if (slot < getBaseMetaTileEntity().getSizeInventory() - 1) {
+ return getBaseMetaTileEntity().getStackInSlot(slot);
+ } else {
+ return null;
+ }
+ } else {
+ return null;
+ }
+ }
+
@Override
public boolean canInsertItem(int aIndex, ItemStack aStack, int ordinalSide) {
if (aIndex == mInventory.length - 1 && ItemUtils.isControlCircuit(aStack)