mirror of
https://github.com/GTNewHorizons/AE2FluidCraft-Rework.git
synced 2026-11-16 10:34:40 +00:00
more fix to official ae crash
This commit is contained in:
1 parent
c45419a985
commit
99c6ccd85c
2 files changed
+28
No files matched your search
@@ -16,6 +16,7 @@ import com.glodblock.github.common.parts.PartFluidPatternTerminalEx;
|
||||
import com.glodblock.github.inventory.gui.GuiType;
|
||||
import com.glodblock.github.network.CPacketFluidPatternTermBtns;
|
||||
import com.glodblock.github.network.CPacketSwitchGuis;
|
||||
import com.glodblock.github.util.ModAndClassUtil;
|
||||
import com.google.common.base.Joiner;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
@@ -533,4 +534,20 @@ public class GuiFluidCraftConfirm extends AEBaseGui {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||
protected void addItemTooltip(ItemStack is, List<String> lineList)
|
||||
{
|
||||
if (isShiftKeyDown())
|
||||
{
|
||||
List l = is.getTooltip(this.mc.thePlayer, this.mc.gameSettings.advancedItemTooltips);
|
||||
if (!l.isEmpty())
|
||||
l.remove(0);
|
||||
lineList.addAll(l);
|
||||
}
|
||||
else if (ModAndClassUtil.isShiftTooltip)
|
||||
{
|
||||
lineList.add(GuiText.HoldShiftForTooltip.getLocal());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -4,6 +4,7 @@ import appeng.api.config.ActionItems;
|
||||
import appeng.api.config.Settings;
|
||||
import appeng.core.AEConfig;
|
||||
import appeng.core.localization.ButtonToolTips;
|
||||
import appeng.core.localization.GuiText;
|
||||
import cpw.mods.fml.common.Loader;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
@@ -21,9 +22,19 @@ public final class ModAndClassUtil {
|
||||
public static boolean isSearchStringTooltip;
|
||||
public static boolean isCraftStatus;
|
||||
public static boolean isSearchBar;
|
||||
public static boolean isShiftTooltip;
|
||||
|
||||
@SuppressWarnings("all")
|
||||
public static void init() {
|
||||
|
||||
try {
|
||||
Field d = GuiText.class.getDeclaredField("HoldShiftForTooltip");
|
||||
if (d == null) isShiftTooltip = false;
|
||||
isShiftTooltip = true;
|
||||
} catch (NoSuchFieldException e) {
|
||||
isShiftTooltip = false;
|
||||
}
|
||||
|
||||
try {
|
||||
Field d = AEConfig.instance.getClass().getDeclaredField("preserveSearchBar");
|
||||
if (d == null) isSearchBar = false;
|
||||
|
||||
Reference in new issue
Block a user