mirror of
https://github.com/GTNewHorizons/AE2FluidCraft-Rework.git
synced 2026-11-16 10:04:41 +00:00
Cleanup (#253)
This commit is contained in:
1 parent
4a39cf4ece
commit
0df88f2305
63 files changed
+123
-187
No files matched your search
+8
-8
@@ -3,7 +3,7 @@
|
||||
gtnh.settings.blowdryerTag = 0.2.0
|
||||
|
||||
# Human-readable mod name, available for mcmod.info population.
|
||||
modName = Fluid Craft For AE2
|
||||
modName = AE2 Fluid Crafting
|
||||
|
||||
# Case-sensitive identifier string, available for mcmod.info population and used for automatic mixin JSON generation.
|
||||
# Conventionally lowercase.
|
||||
@@ -45,24 +45,24 @@ enableModernJavaSyntax = true
|
||||
|
||||
# Enables injecting missing generics into the decompiled source code for a better coding experience.
|
||||
# Turns most publicly visible List, Map, etc. into proper List<E>, Map<K, V> types.
|
||||
enableGenericInjection = false
|
||||
enableGenericInjection = true
|
||||
|
||||
# Generate a class with a String field for the mod version named as defined below.
|
||||
# If generateGradleTokenClass is empty or not missing, no such class will be generated.
|
||||
# If gradleTokenVersion is empty or missing, the field will not be present in the class.
|
||||
generateGradleTokenClass =
|
||||
generateGradleTokenClass = com.glodblock.github.FCTags
|
||||
|
||||
# Name of the token containing the project's current version to generate/replace.
|
||||
gradleTokenVersion = GRADLETOKEN_VERSION
|
||||
gradleTokenVersion = VERSION
|
||||
|
||||
# [DEPRECATED] Mod ID replacement token.
|
||||
gradleTokenModId = GRADLETOKEN_MODID
|
||||
gradleTokenModId =
|
||||
|
||||
# [DEPRECATED] Mod name replacement token.
|
||||
gradleTokenModName = GRADLETOKEN_MODNAME
|
||||
gradleTokenModName =
|
||||
|
||||
# [DEPRECATED] Mod Group replacement token.
|
||||
gradleTokenGroupName = GRADLETOKEN_GROUPNAME
|
||||
gradleTokenGroupName =
|
||||
|
||||
# [DEPRECATED]
|
||||
# Multiple source files can be defined here by providing a comma-separated list: Class1.java,Class2.java,Class3.java
|
||||
@@ -70,7 +70,7 @@ gradleTokenGroupName = GRADLETOKEN_GROUPNAME
|
||||
# The string's content will be replaced with your mod's version when compiled. You should use this to specify your mod's
|
||||
# version in @Mod([...], version = VERSION, [...]).
|
||||
# Leave these properties empty to skip individual token replacements.
|
||||
replaceGradleTokenInFile = FluidCraft.java
|
||||
replaceGradleTokenInFile =
|
||||
|
||||
# In case your mod provides an API for other mods to implement you may declare its package here. Otherwise, you can
|
||||
# leave this property empty.
|
||||
|
||||
@@ -36,9 +36,9 @@ import cpw.mods.fml.common.network.NetworkRegistry;
|
||||
dependencies = "required-after:appliedenergistics2@[rv3-beta-238,);required-after:CoFHCore;required-after:Baubles;after:waila;after:thaumicenergistics;after:ae2wct")
|
||||
public class FluidCraft {
|
||||
|
||||
public static final String MODID = "GRADLETOKEN_MODID";
|
||||
public static final String VERSION = "GRADLETOKEN_VERSION";
|
||||
public static final String MODNAME = "GRADLETOKEN_MODNAME";
|
||||
public static final String MODID = "ae2fc";
|
||||
public static final String VERSION = FCTags.VERSION;
|
||||
public static final String MODNAME = "AE2 Fluid Crafting";
|
||||
|
||||
@Mod.Instance(MODID)
|
||||
public static FluidCraft INSTANCE;
|
||||
|
||||
@@ -6,8 +6,6 @@ public class FCGuiLineField extends FCGuiTextField {
|
||||
|
||||
private final int _xPos;
|
||||
private final int _yPos;
|
||||
private final int _width;
|
||||
private final FontRenderer _fontRender;
|
||||
|
||||
public FCGuiLineField(FontRenderer fontRenderer, int xPos, int yPos, int width) {
|
||||
this(fontRenderer, xPos, yPos, width, 5);
|
||||
@@ -17,8 +15,6 @@ public class FCGuiLineField extends FCGuiTextField {
|
||||
super(fontRenderer, xPos, yPos, width, height);
|
||||
this._xPos = xPos;
|
||||
this._yPos = yPos;
|
||||
this._width = width;
|
||||
this._fontRender = fontRenderer;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -71,9 +71,9 @@ public class FCGuiTextField extends GuiTextField {
|
||||
mouseY = 15;
|
||||
}
|
||||
if (mouseX + length + 20 >= gui.width) {
|
||||
gui.drawTooltip(mouseX - length - 20, mouseY + 4 + offsetY, 0, this.getMessage());
|
||||
gui.drawTooltip(mouseX - length - 20, mouseY + 4 + offsetY, this.getMessage());
|
||||
} else {
|
||||
gui.drawTooltip(mouseX, mouseY + 4 + offsetY, 0, this.getMessage());
|
||||
gui.drawTooltip(mouseX, mouseY + 4 + offsetY, this.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,7 +59,6 @@ public class GuiDualInterface extends GuiUpgradeable {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
protected void addButtons() {
|
||||
this.priority = new GuiTabButton(
|
||||
this.guiLeft + 154,
|
||||
@@ -244,10 +243,6 @@ public class GuiDualInterface extends GuiUpgradeable {
|
||||
}
|
||||
}
|
||||
|
||||
private boolean isPart() {
|
||||
return this.host instanceof PartFluidInterface;
|
||||
}
|
||||
|
||||
private boolean isTile() {
|
||||
return this.host instanceof TileFluidInterface;
|
||||
}
|
||||
|
||||
@@ -74,9 +74,9 @@ public class GuiFluidCraftAmount extends FCGuiAmount {
|
||||
if (btn == this.craftingMode) {
|
||||
GuiImgButton iBtn = ((GuiImgButton) btn);
|
||||
|
||||
final Enum cv = iBtn.getCurrentValue();
|
||||
final Enum<?> cv = iBtn.getCurrentValue();
|
||||
final boolean backwards = Mouse.isButtonDown(1);
|
||||
final Enum next = Platform.rotateEnum(cv, backwards, iBtn.getSetting().getPossibleValues());
|
||||
final Enum<?> next = Platform.rotateEnum(cv, backwards, iBtn.getSetting().getPossibleValues());
|
||||
|
||||
iBtn.set(next);
|
||||
} else if (btn == this.submit && this.submit.enabled) {
|
||||
|
||||
@@ -55,7 +55,6 @@ public class GuiFluidCraftingWireless extends GuiItemMonitor {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public void initGui() {
|
||||
super.initGui();
|
||||
this.buttonList.add(
|
||||
|
||||
@@ -66,7 +66,6 @@ public class GuiFluidInterface extends AEBaseGui {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public void initGui() {
|
||||
super.initGui();
|
||||
this.switcher = new GuiTabButton(
|
||||
|
||||
@@ -36,7 +36,6 @@ public class GuiFluidPatternTerminal extends FCGuiEncodeTerminal {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public void initGui() {
|
||||
super.initGui();
|
||||
this.tabCraftButton = new GuiTabButton(
|
||||
|
||||
@@ -37,7 +37,6 @@ public class GuiFluidPatternTerminalEx extends FCGuiEncodeTerminal {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public void initGui() {
|
||||
super.initGui();
|
||||
|
||||
|
||||
@@ -39,7 +39,6 @@ public class GuiFluidStorageBus extends GuiUpgradeable {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
protected void addButtons() {
|
||||
this.clear = new GuiImgButton(this.guiLeft - 18, this.guiTop + 8, Settings.ACTIONS, ActionItems.CLOSE);
|
||||
this.partition = new GuiImgButton(this.guiLeft - 18, this.guiTop + 28, Settings.ACTIONS, ActionItems.WRENCH);
|
||||
|
||||
@@ -182,7 +182,6 @@ public class GuiInterfaceWireless extends FCBaseMEGui implements IDropToFillText
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void initGui() {
|
||||
super.initGui();
|
||||
@@ -382,7 +381,6 @@ public class GuiInterfaceWireless extends FCBaseMEGui implements IDropToFillText
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(offsetX + VIEW_LEFT, offsetY + HEADER_HEIGHT, 0);
|
||||
tooltipStack = null;
|
||||
masterList.hoveredEntry = null;
|
||||
drawViewport(mouseX - offsetX - VIEW_LEFT, mouseY - offsetY - HEADER_HEIGHT - 1);
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopAttrib();
|
||||
@@ -636,8 +634,6 @@ public class GuiInterfaceWireless extends FCBaseMEGui implements IDropToFillText
|
||||
GL11.glTranslatef(0.0f, 0.0f, SLOT_HOVER_Z);
|
||||
drawRect(colLeft, viewY + 1 + rowYTop, -2 + colRight, viewY - 1 + rowYBot, 0x77FFFFFF);
|
||||
GL11.glTranslatef(0.0f, 0.0f, -SLOT_HOVER_Z);
|
||||
masterList.hoveredEntry = entry;
|
||||
entry.hoveredSlotIdx = slotIdx;
|
||||
}
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
}
|
||||
@@ -659,9 +655,8 @@ public class GuiInterfaceWireless extends FCBaseMEGui implements IDropToFillText
|
||||
/**
|
||||
* A copy of super method, but modified to allow for depth testing.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void drawHoveringText(List textLines, int x, int y, FontRenderer font) {
|
||||
public void drawHoveringText(List<String> textLines, int x, int y, FontRenderer font) {
|
||||
if (!textLines.isEmpty()) {
|
||||
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
|
||||
RenderHelper.disableStandardItemLighting();
|
||||
@@ -971,7 +966,6 @@ public class GuiInterfaceWireless extends FCBaseMEGui implements IDropToFillText
|
||||
private final List<InterfaceWirelessSection> visibleSections = new ArrayList<>();
|
||||
private boolean isDirty;
|
||||
private int height;
|
||||
private InterfaceWirelessEntry hoveredEntry;
|
||||
|
||||
InterfaceWirelessList() {
|
||||
this.isDirty = true;
|
||||
@@ -1229,8 +1223,6 @@ public class GuiInterfaceWireless extends FCBaseMEGui implements IDropToFillText
|
||||
GuiFCImgButton optionsButton;
|
||||
GuiFCImgButton renameButton;
|
||||
|
||||
/** Nullable - icon that represents the interface */
|
||||
ItemStack selfRep;
|
||||
/** Nullable - icon that represents the interface's "target" */
|
||||
ItemStack dispRep;
|
||||
InterfaceWirelessSection section;
|
||||
@@ -1245,7 +1237,6 @@ public class GuiInterfaceWireless extends FCBaseMEGui implements IDropToFillText
|
||||
int numItems = 0;
|
||||
/** Should recipe be filtered out/grayed out? */
|
||||
boolean[] filteredRecipes;
|
||||
private int hoveredSlotIdx = -1;
|
||||
|
||||
InterfaceWirelessEntry(long id, String name, int rows, int rowSize, boolean online, boolean p2pOutput) {
|
||||
this.id = id;
|
||||
@@ -1284,8 +1275,6 @@ public class GuiInterfaceWireless extends FCBaseMEGui implements IDropToFillText
|
||||
}
|
||||
|
||||
InterfaceWirelessEntry setIcons(ItemStack selfRep, ItemStack dispRep) {
|
||||
// Kotlin would make this pretty easy :(
|
||||
this.selfRep = selfRep;
|
||||
this.dispRep = dispRep;
|
||||
|
||||
return this;
|
||||
|
||||
@@ -157,7 +157,6 @@ public class GuiLevelMaintainer extends AEBaseGui implements INEIGuiHandler {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public void initGui() {
|
||||
super.initGui();
|
||||
this.lastWorkingTick = this.refreshTick;
|
||||
@@ -395,9 +394,8 @@ public class GuiLevelMaintainer extends AEBaseGui implements INEIGuiHandler {
|
||||
private final FCGuiLineField line;
|
||||
private State state;
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public Component(Widget qtyInput, Widget batchInput, GuiFCImgButton submitBtn, GuiFCImgButton enableBtn,
|
||||
GuiFCImgButton disableBtn, FCGuiLineField line, List buttonList) {
|
||||
GuiFCImgButton disableBtn, FCGuiLineField line, List<GuiButton> buttonList) {
|
||||
this.qty = qtyInput;
|
||||
this.batch = batchInput;
|
||||
this.enable = enableBtn;
|
||||
|
||||
@@ -119,7 +119,6 @@ public class GuiLevelTerminal extends FCBaseMEGui implements IDropToFillTextFiel
|
||||
private final LevelTerminalList masterList = new LevelTerminalList();
|
||||
private final List<String> extraOptionsText = new ArrayList<>(2);
|
||||
private static final float ITEM_STACK_Z = 100.0f;
|
||||
private static final float SLOT_Z = 0.5f;
|
||||
private static final float ITEM_STACK_OVERLAY_Z = 200.0f;
|
||||
private static final float SLOT_HOVER_Z = 310.0f;
|
||||
private static final float TOOLTIP_Z = 410.0f;
|
||||
@@ -175,7 +174,6 @@ public class GuiLevelTerminal extends FCBaseMEGui implements IDropToFillTextFiel
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void initGui() {
|
||||
super.initGui();
|
||||
@@ -282,7 +280,6 @@ public class GuiLevelTerminal extends FCBaseMEGui implements IDropToFillTextFiel
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void drawScreen(final int mouseX, final int mouseY, final float btn) {
|
||||
terminalStyleBox.set(AEConfig.instance.settings.getSetting(Settings.TERMINAL_STYLE));
|
||||
@@ -385,7 +382,6 @@ public class GuiLevelTerminal extends FCBaseMEGui implements IDropToFillTextFiel
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(offsetX + VIEW_LEFT, offsetY + HEADER_HEIGHT, 0);
|
||||
tooltipStack = null;
|
||||
masterList.hoveredEntry = null;
|
||||
drawViewport(mouseX - offsetX - VIEW_LEFT, mouseY - offsetY - HEADER_HEIGHT - 1);
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopAttrib();
|
||||
@@ -588,7 +584,6 @@ public class GuiLevelTerminal extends FCBaseMEGui implements IDropToFillTextFiel
|
||||
long quantity = data.getLong(TLMTags.Quantity.tagName);
|
||||
long batch = data.getLong(TLMTags.Batch.tagName);
|
||||
State state = State.values()[data.getInteger(TLMTags.State.tagName)];
|
||||
NBTTagCompound linkTag = data.getCompoundTag(TLMTags.Link.tagName);
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(colLeft, viewY + rowYTop + 1, ITEM_STACK_Z);
|
||||
@@ -641,8 +636,6 @@ public class GuiLevelTerminal extends FCBaseMEGui implements IDropToFillTextFiel
|
||||
GL11.glTranslatef(0.0f, 0.0f, SLOT_HOVER_Z);
|
||||
drawRect(colLeft, viewY + 1 + rowYTop, -2 + colRight, viewY - 1 + rowYBot, 0x77FFFFFF);
|
||||
GL11.glTranslatef(0.0f, 0.0f, -SLOT_HOVER_Z);
|
||||
masterList.hoveredEntry = entry;
|
||||
entry.hoveredSlotIdx = slotIdx;
|
||||
}
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
}
|
||||
@@ -699,9 +692,8 @@ public class GuiLevelTerminal extends FCBaseMEGui implements IDropToFillTextFiel
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void drawHoveringText(List textLines, int x, int y, FontRenderer font) {
|
||||
public void drawHoveringText(List<String> textLines, int x, int y, FontRenderer font) {
|
||||
if (!textLines.isEmpty()) {
|
||||
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
|
||||
RenderHelper.disableStandardItemLighting();
|
||||
@@ -887,10 +879,6 @@ public class GuiLevelTerminal extends FCBaseMEGui implements IDropToFillTextFiel
|
||||
return;
|
||||
}
|
||||
|
||||
if (owCmd.onlineValid) {
|
||||
entry.online = owCmd.online;
|
||||
}
|
||||
|
||||
if (owCmd.itemsValid) {
|
||||
if (owCmd.allItemUpdate) {
|
||||
entry.fullItemUpdate(owCmd.items, owCmd.validIndices.length);
|
||||
@@ -981,7 +969,6 @@ public class GuiLevelTerminal extends FCBaseMEGui implements IDropToFillTextFiel
|
||||
private final List<LevelTerminalSection> visibleSections = new ArrayList<>();
|
||||
private boolean isDirty;
|
||||
private int height;
|
||||
private LevelTerminalEntry hoveredEntry;
|
||||
|
||||
LevelTerminalList() {
|
||||
isDirty = true;
|
||||
@@ -1223,8 +1210,6 @@ public class GuiLevelTerminal extends FCBaseMEGui implements IDropToFillTextFiel
|
||||
GuiFCImgButton highlightButton;
|
||||
GuiFCImgButton renameButton;
|
||||
GuiFCImgButton configButton;
|
||||
/** Nullable - icon that represents the interface */
|
||||
ItemStack selfItemStack;
|
||||
/** Nullable - icon that represents the interface's "target" */
|
||||
ItemStack displayItemStack;
|
||||
LevelTerminalSection section;
|
||||
@@ -1233,16 +1218,13 @@ public class GuiLevelTerminal extends FCBaseMEGui implements IDropToFillTextFiel
|
||||
int rows, rowSize;
|
||||
int guiHeight;
|
||||
int dispY = -9999;
|
||||
boolean online;
|
||||
boolean[] filteredRecipes;
|
||||
int numItems = 0;
|
||||
private int hoveredSlotIdx = -1;
|
||||
|
||||
LevelTerminalEntry(long id, String name, int rows, int rowSize, boolean online) {
|
||||
this.id = id;
|
||||
this.rows = rows;
|
||||
this.rowSize = rowSize;
|
||||
this.online = online;
|
||||
if (StatCollector.canTranslate(name)) {
|
||||
customName = StatCollector.translateToLocal(name);
|
||||
} else {
|
||||
@@ -1272,7 +1254,6 @@ public class GuiLevelTerminal extends FCBaseMEGui implements IDropToFillTextFiel
|
||||
}
|
||||
|
||||
LevelTerminalEntry setIcons(ItemStack selfItemStack, ItemStack displayItemStack) {
|
||||
this.selfItemStack = selfItemStack;
|
||||
this.displayItemStack = displayItemStack;
|
||||
|
||||
return this;
|
||||
|
||||
@@ -46,7 +46,6 @@ public class GuiRenamer extends AEBaseGui implements IDropToFillTextField {
|
||||
this.textField.setMaxStringLength(32);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void initGui() {
|
||||
super.initGui();
|
||||
|
||||
@@ -61,7 +61,6 @@ public abstract class FCBaseMEGui extends AEBaseMEGui {
|
||||
|
||||
public abstract void setOffsetY(int y);
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
protected void drawSwitchGuiBtns() {
|
||||
if (!drawSwitchGuiBtn) return;
|
||||
if (!termBtns.isEmpty()) {
|
||||
@@ -131,7 +130,6 @@ public abstract class FCBaseMEGui extends AEBaseMEGui {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
protected void addSwitchGuiBtns() {
|
||||
if (!drawSwitchGuiBtn) return;
|
||||
this.buttonList.addAll(termBtns);
|
||||
|
||||
@@ -39,7 +39,6 @@ public abstract class FCGuiAmount extends AEBaseGui {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public void initGui() {
|
||||
super.initGui();
|
||||
|
||||
|
||||
@@ -170,7 +170,6 @@ public abstract class FCGuiMonitor<T extends IAEStack<T>> extends FCBaseMEGui
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public void initGui() {
|
||||
Keyboard.enableRepeatEvents(true);
|
||||
|
||||
@@ -685,12 +684,13 @@ public abstract class FCGuiMonitor<T extends IAEStack<T>> extends FCBaseMEGui
|
||||
}
|
||||
|
||||
@Override
|
||||
public Enum getTypeFilter() {
|
||||
public Enum<?> getTypeFilter() {
|
||||
return this.configSrc.getSetting(Settings.TYPE_FILTER);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateSetting(final IConfigManager manager, final Enum settingName, final Enum newValue) {
|
||||
public void updateSetting(final IConfigManager manager, @SuppressWarnings("rawtypes") final Enum settingName,
|
||||
@SuppressWarnings("rawtypes") final Enum newValue) {
|
||||
if (this.SortByBox != null) {
|
||||
this.SortByBox.set(this.configSrc.getSetting(Settings.SORT_BY));
|
||||
}
|
||||
|
||||
+1
@@ -165,6 +165,7 @@ public class ContainerFluidPatternEncoder extends AEBaseContainer implements IPa
|
||||
.putConvertedStack(Objects.requireNonNull(Util.copyStackWithSize(stack, 1)));
|
||||
}
|
||||
}
|
||||
default -> {}
|
||||
}
|
||||
} else {
|
||||
super.doAction(player, action, slotId, id);
|
||||
|
||||
@@ -93,6 +93,7 @@ public class ContainerLevelMaintainer extends AEBaseContainer {
|
||||
createLevelValues(Objects.requireNonNull(Util.copyStackWithSize(stack, 1))));
|
||||
}
|
||||
}
|
||||
default -> {}
|
||||
}
|
||||
} else {
|
||||
super.doAction(player, action, slotId, id);
|
||||
|
||||
+1
@@ -155,6 +155,7 @@ public abstract class FCContainerEncodeTerminal extends ContainerItemMonitor
|
||||
slot.putStack(ItemFluidPacket.newStack(fluid));
|
||||
return;
|
||||
}
|
||||
default -> {}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+2
-1
@@ -224,7 +224,8 @@ public abstract class FCContainerMonitor<T extends IAEStack<T>> extends FCBaseCo
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateSetting(final IConfigManager manager, final Enum settingName, final Enum newValue) {
|
||||
public void updateSetting(final IConfigManager manager, @SuppressWarnings("rawtypes") final Enum settingName,
|
||||
@SuppressWarnings("rawtypes") final Enum newValue) {
|
||||
if (this.getGui() != null) {
|
||||
this.getGui().updateSetting(manager, settingName, newValue);
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@ public class EssentiaRepo extends FluidRepo {
|
||||
super(src, sortSrc);
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public void updateView() {
|
||||
this.view.clear();
|
||||
|
||||
@@ -97,6 +97,7 @@ public class FluidRepo implements IDisplayRepo {
|
||||
this.updateView();
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public void updateView() {
|
||||
this.view.clear();
|
||||
|
||||
@@ -48,7 +48,7 @@ public class BlockFluidBuffer extends FCBaseBlock {
|
||||
if (fs == null && ias != null) {
|
||||
player.addChatMessage(
|
||||
new ChatComponentText(
|
||||
Tooltip.fluidFormat(ias.getFluid().getLocalizedName(), ias.getStackSize())));
|
||||
Tooltip.fluidFormat(ias.getFluidStack().getLocalizedName(), ias.getStackSize())));
|
||||
return false;
|
||||
} else {
|
||||
tile.setFluid(fs);
|
||||
|
||||
@@ -23,8 +23,7 @@ public class BaseItemBlockContainer extends ItemBlock {
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
@SuppressWarnings("unchecked")
|
||||
public void addInformation(final ItemStack itemStack, final EntityPlayer player, final List toolTip,
|
||||
public void addInformation(final ItemStack itemStack, final EntityPlayer player, final List<String> toolTip,
|
||||
final boolean advancedToolTips) {
|
||||
blockType.addInformation(itemStack, player, toolTip, advancedToolTips);
|
||||
}
|
||||
|
||||
@@ -62,7 +62,6 @@ public abstract class FCBaseItemCell extends AEBaseItem implements IStorageFluid
|
||||
this.component = null;
|
||||
}
|
||||
|
||||
@SuppressWarnings("all")
|
||||
public FCBaseItemCell(final Optional<String> subName) {
|
||||
super(subName);
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ public class ItemBasicFluidStorageCell extends FCBaseItemCell
|
||||
this.totalBytes = kilobytes * 1024;
|
||||
this.component = whichCell;
|
||||
this.housingValue = housingValue;
|
||||
setUnlocalizedName(NameConst.ITEM_FLUID_STORAGE + kilobytes);
|
||||
setUnlocalizedName(NameConst.ITEM_FLUID_STORAGE + "." + kilobytes);
|
||||
|
||||
switch (this.component) {
|
||||
case Cell1kPart -> {
|
||||
|
||||
@@ -33,9 +33,8 @@ public class ItemEnergyCard extends FCBaseItem {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List toolTip, boolean flag) {
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List<String> toolTip, boolean flag) {
|
||||
if (isShiftKeyDown()) {
|
||||
toolTip.addAll(RenderUtil.listFormattedStringToWidth(NameConst.i18n(NameConst.TT_ENERGY_CARD_DESC)));
|
||||
} else {
|
||||
|
||||
@@ -41,9 +41,8 @@ public class ItemFluidDrop extends FCBaseItem {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(Item item, CreativeTabs tab, List list) {
|
||||
public void getSubItems(Item item, CreativeTabs tab, List<ItemStack> list) {
|
||||
if (CreativeTabs.tabMisc.equals(tab)) {
|
||||
list.add(newStack(new FluidStack(FluidRegistry.WATER, 1)));
|
||||
list.add(newStack(new FluidStack(FluidRegistry.LAVA, 1)));
|
||||
@@ -67,9 +66,8 @@ public class ItemFluidDrop extends FCBaseItem {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List tooltip, boolean flag) {
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List<String> tooltip, boolean flag) {
|
||||
FluidStack fluid = getFluidStack(stack);
|
||||
if (ItemFluidPacket.isDisplay(stack)) return;
|
||||
if (fluid != null) {
|
||||
|
||||
@@ -70,8 +70,7 @@ public class ItemFluidPacket extends FCBaseItem {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List tooltip, boolean flags) {
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List<String> tooltip, boolean flags) {
|
||||
FluidStack fluid = getFluidStack(stack);
|
||||
boolean display = isDisplay(stack);
|
||||
if (display) return;
|
||||
|
||||
@@ -44,7 +44,7 @@ public class ItemMultiFluidStorageCell extends FCBaseItemCell
|
||||
this.component = whichCell;
|
||||
this.housingValue = housingValue;
|
||||
this.maxType = 5;
|
||||
setUnlocalizedName(NameConst.ITEM_MULTI_FLUID_STORAGE + kilobytes);
|
||||
setUnlocalizedName(NameConst.ITEM_MULTI_FLUID_STORAGE + "." + kilobytes);
|
||||
|
||||
switch (this.component) {
|
||||
case Cell1kPart -> {
|
||||
|
||||
@@ -43,9 +43,8 @@ public class ItemPartFluidTerminal extends FCBaseItem implements IPartItem {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List toolTip, boolean flag) {
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List<String> toolTip, boolean flag) {
|
||||
if (isShiftKeyDown()) {
|
||||
toolTip.add(NameConst.i18n(NameConst.TT_FLUID_TERMINAL));
|
||||
} else {
|
||||
|
||||
@@ -43,9 +43,8 @@ public class ItemPartLevelTerminal extends FCBaseItem implements IPartItem {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List toolTip, boolean flag) {
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List<String> toolTip, boolean flag) {
|
||||
if (isShiftKeyDown()) {
|
||||
toolTip.add(NameConst.i18n(NameConst.TT_LEVEL_TERMINAL));
|
||||
} else {
|
||||
|
||||
@@ -33,9 +33,8 @@ public class ItemQuantumBridgeCard extends FCBaseItem {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List toolTip, boolean flag) {
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List<String> toolTip, boolean flag) {
|
||||
if (isShiftKeyDown()) {
|
||||
toolTip.addAll(
|
||||
RenderUtil.listFormattedStringToWidth(NameConst.i18n(NameConst.TT_QUANTUM_BRIDGE_CARD_DESC)));
|
||||
|
||||
@@ -226,8 +226,10 @@ public class PartFluidLevelEmitter extends PartUpgradeable implements IStackWatc
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStackChange(final IItemList o, final IAEStack fullStack, final IAEStack diffStack,
|
||||
final BaseActionSource src, final StorageChannel chan) {
|
||||
public void onStackChange(@SuppressWarnings("rawtypes") final IItemList o,
|
||||
@SuppressWarnings("rawtypes") final IAEStack fullStack,
|
||||
@SuppressWarnings("rawtypes") final IAEStack diffStack, final BaseActionSource src,
|
||||
final StorageChannel chan) {
|
||||
if (chan == StorageChannel.FLUIDS && fullStack.equals(this.getIAEFluidStack())) {
|
||||
this.lastReportedValue = fullStack.getStackSize();
|
||||
this.updateState();
|
||||
@@ -529,7 +531,8 @@ public class PartFluidLevelEmitter extends PartUpgradeable implements IStackWatc
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateSetting(final IConfigManager manager, final Enum settingName, final Enum newValue) {
|
||||
public void updateSetting(final IConfigManager manager, @SuppressWarnings("rawtypes") final Enum settingName,
|
||||
@SuppressWarnings("rawtypes") final Enum newValue) {
|
||||
this.configureWatchers();
|
||||
}
|
||||
|
||||
|
||||
@@ -485,7 +485,7 @@ public class PartFluidP2PInterface extends PartP2PTunnelStatic<PartFluidP2PInter
|
||||
}
|
||||
|
||||
@Override
|
||||
public void pasteMemoryCardData(PartP2PTunnel newTunnel, NBTTagCompound data) throws GridAccessException {
|
||||
public void pasteMemoryCardData(PartP2PTunnel<?> newTunnel, NBTTagCompound data) throws GridAccessException {
|
||||
this.duality.getConfigManager().readFromNBT(data);
|
||||
super.pasteMemoryCardData(newTunnel, data);
|
||||
}
|
||||
|
||||
@@ -152,7 +152,8 @@ public class PartFluidStorageBus extends PartUpgradeable
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateSetting(final IConfigManager manager, final Enum settingName, final Enum newValue) {
|
||||
public void updateSetting(final IConfigManager manager, @SuppressWarnings("rawtypes") final Enum settingName,
|
||||
@SuppressWarnings("rawtypes") final Enum newValue) {
|
||||
this.resetCache(true);
|
||||
this.getHost().markForSave();
|
||||
}
|
||||
@@ -447,7 +448,7 @@ public class PartFluidStorageBus extends PartUpgradeable
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveChanges(final IMEInventory cellInventory) {
|
||||
public void saveChanges(@SuppressWarnings("rawtypes") final IMEInventory cellInventory) {
|
||||
// NO-OP
|
||||
}
|
||||
|
||||
|
||||
@@ -284,7 +284,8 @@ public abstract class FCPart extends AEBasePart
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateSetting(final IConfigManager manager, final Enum settingName, final Enum newValue) {}
|
||||
public void updateSetting(final IConfigManager manager, @SuppressWarnings("rawtypes") final Enum settingName,
|
||||
@SuppressWarnings("rawtypes") final Enum newValue) {}
|
||||
|
||||
@Override
|
||||
public IInventory getViewCellStorage() {
|
||||
|
||||
@@ -323,8 +323,10 @@ public abstract class FCPartMonitor extends AbstractPartDisplay implements IPart
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStackChange(final IItemList o, final IAEStack fullStack, final IAEStack diffStack,
|
||||
final BaseActionSource src, final StorageChannel chan) {
|
||||
public void onStackChange(@SuppressWarnings("rawtypes") final IItemList o,
|
||||
@SuppressWarnings("rawtypes") final IAEStack fullStack,
|
||||
@SuppressWarnings("rawtypes") final IAEStack diffStack, final BaseActionSource src,
|
||||
final StorageChannel chan) {
|
||||
if (this.configuredFluid != null) {
|
||||
if (fullStack == null) {
|
||||
this.configuredFluid.setStackSize(0);
|
||||
|
||||
@@ -51,7 +51,8 @@ public class FluidCellHandler implements ICellHandler {
|
||||
|
||||
@Override
|
||||
public void openChestGui(final EntityPlayer player, final IChestOrDrive chest, final ICellHandler cellHandler,
|
||||
final IMEInventoryHandler inv, final ItemStack is, final StorageChannel chan) {
|
||||
@SuppressWarnings("rawtypes") final IMEInventoryHandler inv, final ItemStack is,
|
||||
final StorageChannel chan) {
|
||||
if (chan == StorageChannel.FLUIDS) {
|
||||
if (chest instanceof TileEntity te) {
|
||||
InventoryHandler
|
||||
@@ -61,7 +62,7 @@ public class FluidCellHandler implements ICellHandler {
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getStatusForCell(final ItemStack is, final IMEInventory handler) {
|
||||
public int getStatusForCell(final ItemStack is, @SuppressWarnings("rawtypes") final IMEInventory handler) {
|
||||
if (handler instanceof final FluidCellInventoryHandler ci) {
|
||||
return ci.getStatusForCell();
|
||||
}
|
||||
@@ -69,7 +70,7 @@ public class FluidCellHandler implements ICellHandler {
|
||||
}
|
||||
|
||||
@Override
|
||||
public double cellIdleDrain(final ItemStack is, final IMEInventory handler) {
|
||||
public double cellIdleDrain(final ItemStack is, @SuppressWarnings("rawtypes") final IMEInventory handler) {
|
||||
final IFluidCellInventory inv = ((IFluidCellInventoryHandler) handler).getCellInv();
|
||||
return inv.getIdleDrain(is);
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ public class TileFluidDiscretizer extends AENetworkTile implements IPriorityHost
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveChanges(IMEInventory cellInventory) {
|
||||
public void saveChanges(@SuppressWarnings("rawtypes") IMEInventory cellInventory) {
|
||||
markDirty();
|
||||
}
|
||||
|
||||
|
||||
@@ -295,22 +295,6 @@ public class TileLevelMaintainer extends AENetworkTile
|
||||
requests.updateStatus(idx, enable);
|
||||
}
|
||||
|
||||
private void readLinkFromNBT(NBTTagCompound data) {
|
||||
for (int i = 0; i < REQ_COUNT; i++) {
|
||||
final NBTTagCompound stackData = requests.getItemStack(i).getTagCompound();
|
||||
if (stackData != null && stackData.hasNoTags()
|
||||
&& !stackData.hasKey(TLMTags.Link.tagName)
|
||||
&& stackData.getCompoundTag(TLMTags.Link.tagName).hasNoTags()) {
|
||||
requests.updateLink(i, null);
|
||||
requests.updateState(i, State.Idle);
|
||||
} else {
|
||||
NBTTagCompound linkData = stackData.getCompoundTag(TLMTags.Link.tagName);
|
||||
requests.updateLink(i, AEApi.instance().storage().loadCraftingLink(linkData, this));
|
||||
if (!requests.isDone(i)) requests.updateState(i, State.Craft);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
|
||||
@@ -94,7 +94,7 @@ public class CoreModHooks {
|
||||
} else return aeStack.getStackSize();
|
||||
}
|
||||
|
||||
public static List<IMEInventoryHandler> craftingGridCacheGetCellArray(final CraftingGridCache instance,
|
||||
public static List<IMEInventoryHandler<?>> craftingGridCacheGetCellArray(final CraftingGridCache instance,
|
||||
final StorageChannel channel) {
|
||||
// Equivalent to original function, but using the proxy for fluid channel
|
||||
return channel == StorageChannel.ITEMS ? Arrays.asList(instance)
|
||||
|
||||
@@ -294,7 +294,6 @@ public class ItemReplacements {
|
||||
double idleDrain, int types) {
|
||||
if (replacement.isEnabled()) {
|
||||
ProxyItemStorageCell item = getOrBuildItemStorage();
|
||||
int meta = replacement.maybeStack(1).get().getItemDamage();
|
||||
ProxyItem.ProxyItemEntry storage = new ProxyItem.ProxyStorageEntry(
|
||||
replacement.maybeItem().get(),
|
||||
kilobytes,
|
||||
|
||||
@@ -55,7 +55,7 @@ public class ProxyItem extends FCBaseItem {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List info, boolean p_77624_4_) {
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List<String> info, boolean p_77624_4_) {
|
||||
int meta = stack.getItemDamage();
|
||||
ProxyItemEntry itemRepl = replacements.get(meta);
|
||||
if (itemRepl != null) {
|
||||
@@ -63,7 +63,7 @@ public class ProxyItem extends FCBaseItem {
|
||||
info.add(EnumChatFormatting.AQUA + itemRepl.replacement.getUnlocalizedName());
|
||||
info.add(EnumChatFormatting.GOLD + "Put in your inventory to get a replacement.");
|
||||
info.add(EnumChatFormatting.GOLD + "It will disappear if no replacement was found.");
|
||||
info.add(EnumChatFormatting.RED + "Report missing conversions on the Github.");
|
||||
info.add(EnumChatFormatting.RED + "Report missing conversions on the GitHub.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+5
-1
@@ -16,6 +16,10 @@ public class ProxyVoidStorageCell extends ItemVoidStorageCell {
|
||||
private final String name = AEApi.instance().definitions().items().cellVoid().maybeStack(1).get()
|
||||
.getUnlocalizedName();
|
||||
|
||||
public ProxyVoidStorageCell() {
|
||||
this.setUnlocalizedName("ec2placeholder.storage.physical.void");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addCheckedInformation(ItemStack stack, EntityPlayer player, List<String> info,
|
||||
boolean displayMoreInfo) {
|
||||
@@ -23,7 +27,7 @@ public class ProxyVoidStorageCell extends ItemVoidStorageCell {
|
||||
info.add(EnumChatFormatting.AQUA + name);
|
||||
info.add(EnumChatFormatting.GOLD + "Put in your inventory to get a replacement.");
|
||||
info.add(EnumChatFormatting.GOLD + "It will disappear if no replacement was found.");
|
||||
info.add(EnumChatFormatting.RED + "Report missing conversions on the Github.");
|
||||
info.add(EnumChatFormatting.RED + "Report missing conversions on the GitHub.");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -48,11 +48,11 @@ public class Tooltip {
|
||||
public static String partFluidTerminalFluidFormat(FluidStack fs) {
|
||||
int fid = Util.getFluidID(fs.getFluid());
|
||||
if (fid == -1) {
|
||||
return fs.getFluid().getLocalizedName();
|
||||
return fs.getLocalizedName();
|
||||
} else if (Minecraft.getMinecraft().gameSettings.advancedItemTooltips) {
|
||||
return String.format("%s (#%s) %s", fs.getFluid().getLocalizedName(), fid, fid);
|
||||
return String.format("%s (#%s) %s", fs.getLocalizedName(), fid, fid);
|
||||
} else {
|
||||
return String.format("%s %s", fs.getFluid().getLocalizedName(), fid);
|
||||
return String.format("%s %s", fs.getLocalizedName(), fid);
|
||||
}
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -28,7 +28,7 @@ public class FluidInvWailaDataProvider extends BasePartWailaDataProvider {
|
||||
for (int i = 0; i < fluidInventory.getSlots(); i++) {
|
||||
FluidStack fs = fluidInventory.getFluidStackInSlot(i);
|
||||
if (fs == null) continue;
|
||||
currentToolTip.add(Tooltip.fluidFormat(fs.getFluid().getLocalizedName(), fs.amount));
|
||||
currentToolTip.add(Tooltip.fluidFormat(fs.getLocalizedName(), fs.amount));
|
||||
}
|
||||
}
|
||||
return currentToolTip;
|
||||
|
||||
+3
-1
@@ -27,7 +27,9 @@ public class FluidMonitorWailaDataProvider extends BasePartWailaDataProvider {
|
||||
if (part instanceof FCPartMonitor && accessor.getNBTData().hasKey(key)) {
|
||||
IAEFluidStack iaeFluidStack = Util.loadFluidStackFromNBT(accessor.getNBTData().getCompoundTag(key));
|
||||
if (iaeFluidStack != null) currentToolTip.add(
|
||||
Tooltip.fluidFormat(iaeFluidStack.getFluid().getLocalizedName(), iaeFluidStack.getStackSize()));
|
||||
Tooltip.fluidFormat(
|
||||
iaeFluidStack.getFluidStack().getLocalizedName(),
|
||||
iaeFluidStack.getStackSize()));
|
||||
}
|
||||
return currentToolTip;
|
||||
}
|
||||
|
||||
+3
-3
@@ -41,7 +41,7 @@ public class FluidInvWailaDataProvider extends BaseWailaDataProvider {
|
||||
ItemStack is = inv.getStackInSlot(i);
|
||||
if (is != null && is.getItem() instanceof ItemFluidPacket) {
|
||||
FluidStack fs = ItemFluidPacket.getFluidStack(is);
|
||||
currentToolTip.add(Tooltip.fluidFormat(fs.getFluid().getLocalizedName(), fs.amount));
|
||||
currentToolTip.add(Tooltip.fluidFormat(fs.getLocalizedName(), fs.amount));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -53,9 +53,9 @@ public class FluidInvWailaDataProvider extends BaseWailaDataProvider {
|
||||
if (ft.getFluidInSlot(i) == null) continue;
|
||||
FluidStack fs = ft.getFluidInSlot(i).getFluidStack();
|
||||
if (prefix) {
|
||||
currentToolTip.add(Tooltip.tileFluidInterfaceFormat(fs.getFluid().getLocalizedName(), fs.amount, i));
|
||||
currentToolTip.add(Tooltip.tileFluidInterfaceFormat(fs.getLocalizedName(), fs.amount, i));
|
||||
} else {
|
||||
currentToolTip.add(Tooltip.fluidFormat(fs.getFluid().getLocalizedName(), fs.amount));
|
||||
currentToolTip.add(Tooltip.fluidFormat(fs.getLocalizedName(), fs.amount));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -146,11 +146,12 @@ public class MEMonitorIFluidHandler implements IMEMonitor<IAEFluidStack> {
|
||||
|
||||
private void postDifference(Iterable<IAEFluidStack> a) {
|
||||
if (a != null) {
|
||||
Iterator<?> i = this.listeners.entrySet().iterator();
|
||||
Iterator<Map.Entry<IMEMonitorHandlerReceiver<IAEFluidStack>, Object>> i = this.listeners.entrySet()
|
||||
.iterator();
|
||||
|
||||
while (i.hasNext()) {
|
||||
Map.Entry<IMEMonitorHandlerReceiver<IAEFluidStack>, Object> l = (Map.Entry) i.next();
|
||||
IMEMonitorHandlerReceiver key = l.getKey();
|
||||
Map.Entry<IMEMonitorHandlerReceiver<IAEFluidStack>, Object> l = i.next();
|
||||
IMEMonitorHandlerReceiver<IAEFluidStack> key = l.getKey();
|
||||
if (key.isValid(l.getValue())) {
|
||||
key.postChange(this, a, this.getActionSource());
|
||||
} else {
|
||||
@@ -184,7 +185,7 @@ public class MEMonitorIFluidHandler implements IMEMonitor<IAEFluidStack> {
|
||||
return true;
|
||||
}
|
||||
|
||||
public IItemList<IAEFluidStack> getAvailableItems(IItemList out, int iteration) {
|
||||
public IItemList<IAEFluidStack> getAvailableItems(IItemList<IAEFluidStack> out, int iteration) {
|
||||
|
||||
for (IAEFluidStack fs : this.cache) {
|
||||
out.addStorage(fs);
|
||||
@@ -202,10 +203,6 @@ public class MEMonitorIFluidHandler implements IMEMonitor<IAEFluidStack> {
|
||||
return this.cache;
|
||||
}
|
||||
|
||||
private StorageFilter getMode() {
|
||||
return this.mode;
|
||||
}
|
||||
|
||||
public void setMode(StorageFilter mode) {
|
||||
this.mode = mode;
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ public class MouseRegionManager {
|
||||
if (region.containsMouse(mX, mY)) {
|
||||
List<String> tooltip = region.handler.getTooltip();
|
||||
if (tooltip != null) {
|
||||
((AEBaseGui) gui).drawTooltip(mX, mY, 0, String.join("\n", tooltip));
|
||||
((AEBaseGui) gui).drawTooltip(mX, mY, String.join("\n", tooltip));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@ public class FluidFilter {
|
||||
case FLUIDS -> {
|
||||
return item instanceof ItemFluidDrop;
|
||||
}
|
||||
default -> {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,8 @@ package com.glodblock.github.nei.object;
|
||||
|
||||
public class IllegalOrderStackID extends RuntimeException {
|
||||
|
||||
private static final long serialVersionUID = -3782749325355674453L;
|
||||
|
||||
public IllegalOrderStackID(int id) {
|
||||
super("Illegal type id: " + id);
|
||||
}
|
||||
|
||||
@@ -7,11 +7,8 @@ import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import com.glodblock.github.inventory.InventoryHandler;
|
||||
import com.glodblock.github.inventory.gui.GuiType;
|
||||
import com.glodblock.github.inventory.item.IClickableInTerminal;
|
||||
import com.glodblock.github.util.BlockPos;
|
||||
import com.glodblock.github.util.Util;
|
||||
|
||||
import appeng.container.AEBaseContainer;
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessage;
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
|
||||
import cpw.mods.fml.common.network.simpleimpl.MessageContext;
|
||||
@@ -109,7 +106,6 @@ public class CPacketLevelTerminalCommands implements IMessage {
|
||||
@Override
|
||||
public IMessage onMessage(CPacketLevelTerminalCommands message, MessageContext ctx) {
|
||||
EntityPlayerMP player = ctx.getServerHandler().playerEntity;
|
||||
AEBaseContainer con = (AEBaseContainer) player.openContainer;
|
||||
switch (message.action) {
|
||||
case EDIT -> {
|
||||
TileEntity tile = DimensionManager.getWorld(message.dim)
|
||||
@@ -134,34 +130,7 @@ public class CPacketLevelTerminalCommands implements IMessage {
|
||||
message.side,
|
||||
originalGui);
|
||||
}
|
||||
case ENABLE -> {
|
||||
if (con.getTarget() instanceof IClickableInTerminal clickableInterface) {
|
||||
Util.DimensionalCoordSide intMsg = clickableInterface.getClickedInterface();
|
||||
TileEntity tile = DimensionManager.getWorld(intMsg.getDimension())
|
||||
.getTileEntity(intMsg.x, intMsg.y, intMsg.z);
|
||||
}
|
||||
}
|
||||
case DISABLE -> {
|
||||
if (con.getTarget() instanceof IClickableInTerminal clickableInterface) {
|
||||
Util.DimensionalCoordSide intMsg = clickableInterface.getClickedInterface();
|
||||
TileEntity tile = DimensionManager.getWorld(intMsg.getDimension())
|
||||
.getTileEntity(intMsg.x, intMsg.y, intMsg.z);
|
||||
}
|
||||
}
|
||||
case ENABLE_ALL -> {
|
||||
if (con.getTarget() instanceof IClickableInTerminal clickableInterface) {
|
||||
Util.DimensionalCoordSide intMsg = clickableInterface.getClickedInterface();
|
||||
TileEntity tile = DimensionManager.getWorld(intMsg.getDimension())
|
||||
.getTileEntity(intMsg.x, intMsg.y, intMsg.z);
|
||||
}
|
||||
}
|
||||
case DISABLE_ALL -> {
|
||||
if (con.getTarget() instanceof IClickableInTerminal clickableInterface) {
|
||||
Util.DimensionalCoordSide intMsg = clickableInterface.getClickedInterface();
|
||||
TileEntity tile = DimensionManager.getWorld(intMsg.getDimension())
|
||||
.getTileEntity(intMsg.x, intMsg.y, intMsg.z);
|
||||
}
|
||||
}
|
||||
default -> {}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -124,7 +124,8 @@ public class CPacketTransferRecipe implements IMessage {
|
||||
}
|
||||
// using exists item to fill slot
|
||||
if (message.shift && !storageList.isEmpty()) {
|
||||
for (OrderStack stack : message.inputs) {
|
||||
for (@SuppressWarnings("rawtypes")
|
||||
OrderStack stack : message.inputs) {
|
||||
if (stack.getStack() instanceof FluidStack || stack.getItems() == null) continue;
|
||||
IAEItemStack iaeItemStack = AEApi.instance().storage()
|
||||
.createItemStack((ItemStack) stack.getStack());
|
||||
|
||||
@@ -218,7 +218,8 @@ public class DualityFluidInterface implements IGridTickable, IStorageMonitorable
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateSetting(IConfigManager manager, Enum settingName, Enum newValue) {}
|
||||
public void updateSetting(IConfigManager manager, @SuppressWarnings("rawtypes") Enum settingName,
|
||||
@SuppressWarnings("rawtypes") Enum newValue) {}
|
||||
|
||||
@Override
|
||||
public void onFluidInventoryChanged(IAEFluidTank inventory, int slot) {
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.glodblock.github.util;
|
||||
import java.util.Comparator;
|
||||
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
import com.glodblock.github.common.item.ItemFluidDrop;
|
||||
|
||||
@@ -20,16 +21,20 @@ public class FluidSorters {
|
||||
|
||||
@Override
|
||||
public int compare(final IAEItemStack o1, final IAEItemStack o2) {
|
||||
final Fluid f1 = ItemFluidDrop.getAeFluidStack(o1).getFluid();
|
||||
final Fluid f2 = ItemFluidDrop.getAeFluidStack(o2).getFluid();
|
||||
final FluidStack fs1 = ItemFluidDrop.getAeFluidStack(o1).getFluidStack();
|
||||
final FluidStack fs2 = ItemFluidDrop.getAeFluidStack(o2).getFluidStack();
|
||||
final Fluid f1 = fs1.getFluid();
|
||||
final Fluid f2 = fs2.getFluid();
|
||||
if (getDirection() == SortDir.ASCENDING) {
|
||||
return this
|
||||
.secondarySort(Util.getFluidModName(f2).compareToIgnoreCase(Util.getFluidModName(f1)), f1, f2);
|
||||
return this.secondarySort(
|
||||
Util.getFluidModName(f2).compareToIgnoreCase(Util.getFluidModName(f1)),
|
||||
fs1,
|
||||
fs2);
|
||||
}
|
||||
return this.secondarySort(Util.getFluidModName(f1).compareToIgnoreCase(Util.getFluidModName(f2)), f2, f1);
|
||||
return this.secondarySort(Util.getFluidModName(f1).compareToIgnoreCase(Util.getFluidModName(f2)), fs2, fs1);
|
||||
}
|
||||
|
||||
private int secondarySort(final int compareToIgnoreCase, final Fluid f1, final Fluid f2) {
|
||||
private int secondarySort(final int compareToIgnoreCase, final FluidStack f1, final FluidStack f2) {
|
||||
if (compareToIgnoreCase == 0) {
|
||||
return f2.getLocalizedName().compareToIgnoreCase(f1.getLocalizedName());
|
||||
}
|
||||
|
||||
@@ -73,7 +73,6 @@ public final class RenderUtil {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public static List<String> listFormattedStringToWidth(String str) {
|
||||
return Minecraft.getMinecraft().fontRenderer.listFormattedStringToWidth(str, 150);
|
||||
}
|
||||
|
||||
@@ -287,8 +287,9 @@ public final class Util {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public static ModContainer getFluidMod(Fluid fluid) {
|
||||
return GameData.findModOwner(String.format("%s:%s", getFluidModID(fluid), fluid.getName()));
|
||||
return GameData.findModOwner(FluidRegistry.getDefaultFluidName(fluid));
|
||||
}
|
||||
|
||||
public static int getFluidID(Fluid fluid) {
|
||||
|
||||
@@ -17,6 +17,7 @@ item.wireless_fluid_terminal.name=Wireless Fluid Terminal
|
||||
item.wireless_level_terminal.name=Wireless Level Terminal
|
||||
item.wireless_fluid_pattern_terminal.name=Wireless Fluid Pattern Terminal
|
||||
item.wireless_interface_terminal.name=Wireless Interface Terminal
|
||||
item.wireless_ultra_terminal.name=Universal Wireless Terminal
|
||||
item.wireless_ultra_terminal.WIRELESS_CRAFTING_TERMINAL.name=Universal Wireless Terminal - Crafting
|
||||
item.wireless_ultra_terminal.WIRELESS_FLUID_PATTERN_TERMINAL.name=Universal Wireless Terminal - Pattern
|
||||
item.wireless_ultra_terminal.WIRELESS_FLUID_TERMINAL.name=Universal Wireless Terminal - Fluid
|
||||
@@ -49,6 +50,7 @@ item.fluid_storage.singularity.name=ME Fluid Digital Singularity Storage Cell
|
||||
item.fluid_storage.void.name=ME Fluid Void Cell
|
||||
item.fluid_storage.Universe.name=ME Fluid Artificial Universe Storage Cell
|
||||
item.fluid_storage.infinity.water.name=ME Fluid Infinity Water Storage Cell
|
||||
item.fluid_part.name=ME Fluid Storage Component
|
||||
item.fluid_part.0.name=%s1k%s ME Fluid Storage Component
|
||||
item.fluid_part.1.name=%s4k%s ME Fluid Storage Component
|
||||
item.fluid_part.2.name=%s16k%s ME Fluid Storage Component
|
||||
@@ -57,6 +59,7 @@ item.fluid_part.4.name=%s256k%s ME Fluid Storage Component
|
||||
item.fluid_part.5.name=%s1024k%s ME Fluid Storage Component
|
||||
item.fluid_part.6.name=%s4096k%s ME Fluid Storage Component
|
||||
item.fluid_part.7.name=%s16384k%s ME Fluid Storage Component
|
||||
item.fluid_storage_housing.name=ME Storage Housing
|
||||
item.fluid_storage_housing.0.name=ME Fluid Storage Housing
|
||||
item.fluid_storage_housing.1.name=ME Advanced Fluid Storage Housing
|
||||
item.fluid_storage_housing.2.name=ME Multi-Fluid Storage Housing
|
||||
@@ -195,3 +198,16 @@ error.unknown=Unknown
|
||||
key.OpenTerminal=Open Wireless Universal Terminal
|
||||
|
||||
itemGroup.ae2fc=Fluid Craft For AE2
|
||||
|
||||
item.ec2placeholder.oc.upgrade.name=[EC2 PLACEHOLDER] ME Upgrade
|
||||
item.ec2placeholder.part.base.name=[EC2 PLACEHOLDER] ME Fluid Bus
|
||||
item.ec2placeholder.pattern.fluid.name=[EC2 PLACEHOLDER] ME Fluid Pattern
|
||||
item.ec2placeholder.storage.casing.name=[EC2 PLACEHOLDER] Storage Housing
|
||||
item.ec2placeholder.storage.component.name=[EC2 PLACEHOLDER] ME Storage Component
|
||||
item.ec2placeholder.storage.fluid.name=[EC2 PLACEHOLDER] ME Fluid Storage
|
||||
item.ec2placeholder.storage.physical.advanced.quantum.name=[EC2 PLACEHOLDER] ME Quantum Storage
|
||||
item.ec2placeholder.storage.physical.advanced.singularity.name=[EC2 PLACEHOLDER] ME Digital Singularity
|
||||
item.ec2placeholder.storage.physical.name=[EC2 PLACEHOLDER] ME Storage
|
||||
item.ec2placeholder.storage.physical.void.name=[EC2 PLACEHOLDER] ME Void Storage
|
||||
item.ec2placeholder.terminal.fluid.wireless.name=[EC2 PLACEHOLDER] Wireless Fluid Terminal
|
||||
item.ec2placeholder.terminal.universal.wireless.name=[EC2 PLACEHOLDER] Wireless Universal Terminal
|
||||
@@ -1,7 +1,7 @@
|
||||
[
|
||||
{
|
||||
"modid": "ae2fc",
|
||||
"name": "AE2 Fluid Crafting",
|
||||
"modid": "${modId}",
|
||||
"name": "${modName}",
|
||||
"description": "Lets you do Crafting... with Fluids!",
|
||||
"version": "${modVersion}",
|
||||
"mcversion": "${minecraftVersion}",
|
||||
|
||||
Reference in new issue
Block a user