diff --git a/dependencies.gradle b/dependencies.gradle index ffbac2b93..67d69c20f 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -35,7 +35,7 @@ */ dependencies { api('com.github.GTNewHorizons:NotEnoughItems:2.7.4-GTNH:dev') - api('com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-507-GTNH:dev') + api('com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-511-GTNH:dev') api('curse.maven:cofh-core-69162:2388751') api('com.github.GTNewHorizons:waila:1.8.2:dev') @@ -48,7 +48,7 @@ dependencies { compileOnly('com.github.GTNewHorizons:ExtraCells2:2.5.35:dev') { transitive = false } compileOnly('com.github.GTNewHorizons:ForestryMC:4.10.0:dev') compileOnly('com.github.GTNewHorizons:EnderIO:2.9.0:dev') - compileOnly('com.github.GTNewHorizons:GT5-Unofficial:5.09.51.29:dev') { + compileOnly('com.github.GTNewHorizons:GT5-Unofficial:5.09.51.33:dev') { exclude group: 'com.github.GTNewHorizons', module: 'AE2FluidCraft-Rework' exclude group: 'com.github.GTNewHorizons', module: 'Applied-Energistics-2-Unofficial' } diff --git a/gradle.properties b/gradle.properties index edbd1b38b..4f19ca8f1 100644 --- a/gradle.properties +++ b/gradle.properties @@ -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, Map 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. diff --git a/src/main/java/com/glodblock/github/FluidCraft.java b/src/main/java/com/glodblock/github/FluidCraft.java index 5f1d02406..49467a135 100644 --- a/src/main/java/com/glodblock/github/FluidCraft.java +++ b/src/main/java/com/glodblock/github/FluidCraft.java @@ -36,9 +36,9 @@ 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; diff --git a/src/main/java/com/glodblock/github/client/gui/FCGuiLineField.java b/src/main/java/com/glodblock/github/client/gui/FCGuiLineField.java index dd0064dc6..265c88f42 100644 --- a/src/main/java/com/glodblock/github/client/gui/FCGuiLineField.java +++ b/src/main/java/com/glodblock/github/client/gui/FCGuiLineField.java @@ -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 FCGuiLineField(FontRenderer fontRenderer, int xPos, int yPos, int width, super(fontRenderer, xPos, yPos, width, height); this._xPos = xPos; this._yPos = yPos; - this._width = width; - this._fontRender = fontRenderer; } @Override diff --git a/src/main/java/com/glodblock/github/client/gui/FCGuiTextField.java b/src/main/java/com/glodblock/github/client/gui/FCGuiTextField.java index 90f70f8a1..1442239f7 100644 --- a/src/main/java/com/glodblock/github/client/gui/FCGuiTextField.java +++ b/src/main/java/com/glodblock/github/client/gui/FCGuiTextField.java @@ -71,9 +71,9 @@ public void handleTooltip(int mouseX, int mouseY, AEBaseGui gui, int offsetY) { 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()); } } } diff --git a/src/main/java/com/glodblock/github/client/gui/GuiDualInterface.java b/src/main/java/com/glodblock/github/client/gui/GuiDualInterface.java index 487bb4d7f..4ddc12316 100644 --- a/src/main/java/com/glodblock/github/client/gui/GuiDualInterface.java +++ b/src/main/java/com/glodblock/github/client/gui/GuiDualInterface.java @@ -59,7 +59,6 @@ public GuiDualInterface(InventoryPlayer inventoryPlayer, IInterfaceHost te) { } @Override - @SuppressWarnings("unchecked") protected void addButtons() { this.priority = new GuiTabButton( this.guiLeft + 154, @@ -244,10 +243,6 @@ protected void actionPerformed(final GuiButton btn) { } } - private boolean isPart() { - return this.host instanceof PartFluidInterface; - } - private boolean isTile() { return this.host instanceof TileFluidInterface; } diff --git a/src/main/java/com/glodblock/github/client/gui/GuiFluidCraftAmount.java b/src/main/java/com/glodblock/github/client/gui/GuiFluidCraftAmount.java index 5fcc48302..b83cd84ef 100644 --- a/src/main/java/com/glodblock/github/client/gui/GuiFluidCraftAmount.java +++ b/src/main/java/com/glodblock/github/client/gui/GuiFluidCraftAmount.java @@ -74,9 +74,9 @@ protected void actionPerformed(final GuiButton btn) { 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) { diff --git a/src/main/java/com/glodblock/github/client/gui/GuiFluidCraftingWireless.java b/src/main/java/com/glodblock/github/client/gui/GuiFluidCraftingWireless.java index 6009e96ed..054cf43e1 100644 --- a/src/main/java/com/glodblock/github/client/gui/GuiFluidCraftingWireless.java +++ b/src/main/java/com/glodblock/github/client/gui/GuiFluidCraftingWireless.java @@ -55,7 +55,6 @@ protected void actionPerformed(final GuiButton btn) { } @Override - @SuppressWarnings("unchecked") public void initGui() { super.initGui(); this.buttonList.add( diff --git a/src/main/java/com/glodblock/github/client/gui/GuiFluidInterface.java b/src/main/java/com/glodblock/github/client/gui/GuiFluidInterface.java index f0a70f33f..1e70b9cd8 100644 --- a/src/main/java/com/glodblock/github/client/gui/GuiFluidInterface.java +++ b/src/main/java/com/glodblock/github/client/gui/GuiFluidInterface.java @@ -66,7 +66,6 @@ public void func_146977_a(final Slot s) { } @Override - @SuppressWarnings("unchecked") public void initGui() { super.initGui(); this.switcher = new GuiTabButton( diff --git a/src/main/java/com/glodblock/github/client/gui/GuiFluidPatternTerminal.java b/src/main/java/com/glodblock/github/client/gui/GuiFluidPatternTerminal.java index 9d0900a9a..af7410955 100644 --- a/src/main/java/com/glodblock/github/client/gui/GuiFluidPatternTerminal.java +++ b/src/main/java/com/glodblock/github/client/gui/GuiFluidPatternTerminal.java @@ -36,7 +36,6 @@ public GuiFluidPatternTerminal(final InventoryPlayer inventoryPlayer, final IWir } @Override - @SuppressWarnings("unchecked") public void initGui() { super.initGui(); this.tabCraftButton = new GuiTabButton( diff --git a/src/main/java/com/glodblock/github/client/gui/GuiFluidPatternTerminalEx.java b/src/main/java/com/glodblock/github/client/gui/GuiFluidPatternTerminalEx.java index 6ec82b0e6..4c4bcbcef 100644 --- a/src/main/java/com/glodblock/github/client/gui/GuiFluidPatternTerminalEx.java +++ b/src/main/java/com/glodblock/github/client/gui/GuiFluidPatternTerminalEx.java @@ -37,7 +37,6 @@ public GuiFluidPatternTerminalEx(final InventoryPlayer inventoryPlayer, final IW } @Override - @SuppressWarnings("unchecked") public void initGui() { super.initGui(); diff --git a/src/main/java/com/glodblock/github/client/gui/GuiFluidStorageBus.java b/src/main/java/com/glodblock/github/client/gui/GuiFluidStorageBus.java index d216071ce..b1630e51d 100644 --- a/src/main/java/com/glodblock/github/client/gui/GuiFluidStorageBus.java +++ b/src/main/java/com/glodblock/github/client/gui/GuiFluidStorageBus.java @@ -39,7 +39,6 @@ public GuiFluidStorageBus(InventoryPlayer inventoryPlayer, PartFluidStorageBus t } @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); diff --git a/src/main/java/com/glodblock/github/client/gui/GuiInterfaceWireless.java b/src/main/java/com/glodblock/github/client/gui/GuiInterfaceWireless.java index 5f3968ed5..3d81fd60b 100644 --- a/src/main/java/com/glodblock/github/client/gui/GuiInterfaceWireless.java +++ b/src/main/java/com/glodblock/github/client/gui/GuiInterfaceWireless.java @@ -182,7 +182,6 @@ private void setScrollBar() { } } - @SuppressWarnings("unchecked") @Override public void initGui() { super.initGui(); @@ -382,7 +381,6 @@ public void drawBG(final int offsetX, final int offsetY, final int mouseX, final 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 @@ private int drawEntry(InterfaceWirelessEntry entry, int viewY, int titleBottom, 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 ItemStack getHoveredStack() { /** * 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 textLines, int x, int y, FontRenderer font) { if (!textLines.isEmpty()) { GL11.glDisable(GL12.GL_RESCALE_NORMAL); RenderHelper.disableStandardItemLighting(); @@ -971,7 +966,6 @@ private class InterfaceWirelessList { private final List visibleSections = new ArrayList<>(); private boolean isDirty; private int height; - private InterfaceWirelessEntry hoveredEntry; InterfaceWirelessList() { this.isDirty = true; @@ -1229,8 +1223,6 @@ private class InterfaceWirelessEntry { 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 @@ private class InterfaceWirelessEntry { 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 @@ InterfaceWirelessEntry setLocation(int x, int y, int z, int dim, int side) { } InterfaceWirelessEntry setIcons(ItemStack selfRep, ItemStack dispRep) { - // Kotlin would make this pretty easy :( - this.selfRep = selfRep; this.dispRep = dispRep; return this; diff --git a/src/main/java/com/glodblock/github/client/gui/GuiLevelMaintainer.java b/src/main/java/com/glodblock/github/client/gui/GuiLevelMaintainer.java index db0c3ab50..dd737a086 100644 --- a/src/main/java/com/glodblock/github/client/gui/GuiLevelMaintainer.java +++ b/src/main/java/com/glodblock/github/client/gui/GuiLevelMaintainer.java @@ -157,7 +157,6 @@ public void postUpdate(List list) { } } - @SuppressWarnings("unchecked") public void initGui() { super.initGui(); this.lastWorkingTick = this.refreshTick; @@ -395,9 +394,8 @@ private class Component { 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 buttonList) { this.qty = qtyInput; this.batch = batchInput; this.enable = enableBtn; diff --git a/src/main/java/com/glodblock/github/client/gui/GuiLevelTerminal.java b/src/main/java/com/glodblock/github/client/gui/GuiLevelTerminal.java index c298c9fa7..63a058bba 100644 --- a/src/main/java/com/glodblock/github/client/gui/GuiLevelTerminal.java +++ b/src/main/java/com/glodblock/github/client/gui/GuiLevelTerminal.java @@ -119,7 +119,6 @@ public class GuiLevelTerminal extends FCBaseMEGui implements IDropToFillTextFiel private final LevelTerminalList masterList = new LevelTerminalList(); private final List 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 @@ private void setScrollBar() { } } - @SuppressWarnings("unchecked") @Override public void initGui() { super.initGui(); @@ -282,7 +280,6 @@ public void drawFG(final int offsetX, final int offsetY, final int mouseX, final } } - @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 void drawBG(final int offsetX, final int offsetY, final int mouseX, final 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 @@ private int drawEntry(LevelTerminalEntry entry, int viewY, int titleBottom, int 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 @@ private int drawEntry(LevelTerminalEntry entry, int viewY, int titleBottom, int 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 @@ private String getToBeRenderedStackSize(final long originalSize, TerminalFontSiz } } - @SuppressWarnings("unchecked") @Override - public void drawHoveringText(List textLines, int x, int y, FontRenderer font) { + public void drawHoveringText(List textLines, int x, int y, FontRenderer font) { if (!textLines.isEmpty()) { GL11.glDisable(GL12.GL_RESCALE_NORMAL); RenderHelper.disableStandardItemLighting(); @@ -887,10 +879,6 @@ private void parsePacketCmd(PacketEntry cmd) { 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 @@ private class LevelTerminalList { private final List visibleSections = new ArrayList<>(); private boolean isDirty; private int height; - private LevelTerminalEntry hoveredEntry; LevelTerminalList() { isDirty = true; @@ -1223,8 +1210,6 @@ private class LevelTerminalEntry { 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 @@ private class LevelTerminalEntry { 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 @@ LevelTerminalEntry setLocation(int x, int y, int z, int dim, int side) { } LevelTerminalEntry setIcons(ItemStack selfItemStack, ItemStack displayItemStack) { - this.selfItemStack = selfItemStack; this.displayItemStack = displayItemStack; return this; diff --git a/src/main/java/com/glodblock/github/client/gui/GuiRenamer.java b/src/main/java/com/glodblock/github/client/gui/GuiRenamer.java index 891992a13..a12af8d23 100644 --- a/src/main/java/com/glodblock/github/client/gui/GuiRenamer.java +++ b/src/main/java/com/glodblock/github/client/gui/GuiRenamer.java @@ -46,7 +46,6 @@ public GuiRenamer(InventoryPlayer ip, ITerminalHost monitorable) { this.textField.setMaxStringLength(32); } - @SuppressWarnings("unchecked") @Override public void initGui() { super.initGui(); diff --git a/src/main/java/com/glodblock/github/client/gui/base/FCBaseMEGui.java b/src/main/java/com/glodblock/github/client/gui/base/FCBaseMEGui.java index 0b0c8b254..b986b40c8 100644 --- a/src/main/java/com/glodblock/github/client/gui/base/FCBaseMEGui.java +++ b/src/main/java/com/glodblock/github/client/gui/base/FCBaseMEGui.java @@ -61,7 +61,6 @@ protected void initGuiDone() { public abstract void setOffsetY(int y); - @SuppressWarnings("unchecked") protected void drawSwitchGuiBtns() { if (!drawSwitchGuiBtn) return; if (!termBtns.isEmpty()) { @@ -131,7 +130,6 @@ protected void drawSwitchGuiBtns() { } } - @SuppressWarnings("unchecked") protected void addSwitchGuiBtns() { if (!drawSwitchGuiBtn) return; this.buttonList.addAll(termBtns); diff --git a/src/main/java/com/glodblock/github/client/gui/base/FCGuiAmount.java b/src/main/java/com/glodblock/github/client/gui/base/FCGuiAmount.java index 3db953319..7ae80c971 100644 --- a/src/main/java/com/glodblock/github/client/gui/base/FCGuiAmount.java +++ b/src/main/java/com/glodblock/github/client/gui/base/FCGuiAmount.java @@ -39,7 +39,6 @@ public FCGuiAmount(Container container) { } @Override - @SuppressWarnings("unchecked") public void initGui() { super.initGui(); diff --git a/src/main/java/com/glodblock/github/client/gui/base/FCGuiMonitor.java b/src/main/java/com/glodblock/github/client/gui/base/FCGuiMonitor.java index c25960bc7..30e93fb6f 100644 --- a/src/main/java/com/glodblock/github/client/gui/base/FCGuiMonitor.java +++ b/src/main/java/com/glodblock/github/client/gui/base/FCGuiMonitor.java @@ -170,7 +170,6 @@ protected void actionPerformed(final GuiButton btn) { } @Override - @SuppressWarnings("unchecked") public void initGui() { Keyboard.enableRepeatEvents(true); @@ -685,12 +684,13 @@ public Enum getSortDisplay() { } @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)); } diff --git a/src/main/java/com/glodblock/github/client/gui/container/ContainerFluidPatternEncoder.java b/src/main/java/com/glodblock/github/client/gui/container/ContainerFluidPatternEncoder.java index 0f27c6308..ab3f2886f 100644 --- a/src/main/java/com/glodblock/github/client/gui/container/ContainerFluidPatternEncoder.java +++ b/src/main/java/com/glodblock/github/client/gui/container/ContainerFluidPatternEncoder.java @@ -165,6 +165,7 @@ public void doAction(EntityPlayerMP player, InventoryAction action, int slotId, .putConvertedStack(Objects.requireNonNull(Util.copyStackWithSize(stack, 1))); } } + default -> {} } } else { super.doAction(player, action, slotId, id); diff --git a/src/main/java/com/glodblock/github/client/gui/container/ContainerLevelMaintainer.java b/src/main/java/com/glodblock/github/client/gui/container/ContainerLevelMaintainer.java index d8882f98d..c21a18e63 100644 --- a/src/main/java/com/glodblock/github/client/gui/container/ContainerLevelMaintainer.java +++ b/src/main/java/com/glodblock/github/client/gui/container/ContainerLevelMaintainer.java @@ -93,6 +93,7 @@ public void doAction(EntityPlayerMP player, InventoryAction action, int slotId, createLevelValues(Objects.requireNonNull(Util.copyStackWithSize(stack, 1)))); } } + default -> {} } } else { super.doAction(player, action, slotId, id); diff --git a/src/main/java/com/glodblock/github/client/gui/container/base/FCContainerEncodeTerminal.java b/src/main/java/com/glodblock/github/client/gui/container/base/FCContainerEncodeTerminal.java index 8ab459aeb..bf6b8cc3c 100644 --- a/src/main/java/com/glodblock/github/client/gui/container/base/FCContainerEncodeTerminal.java +++ b/src/main/java/com/glodblock/github/client/gui/container/base/FCContainerEncodeTerminal.java @@ -155,6 +155,7 @@ public void doAction(EntityPlayerMP player, InventoryAction action, int slotId, slot.putStack(ItemFluidPacket.newStack(fluid)); return; } + default -> {} } } diff --git a/src/main/java/com/glodblock/github/client/gui/container/base/FCContainerMonitor.java b/src/main/java/com/glodblock/github/client/gui/container/base/FCContainerMonitor.java index 80afc26c6..e9a1902ae 100644 --- a/src/main/java/com/glodblock/github/client/gui/container/base/FCContainerMonitor.java +++ b/src/main/java/com/glodblock/github/client/gui/container/base/FCContainerMonitor.java @@ -224,7 +224,8 @@ public void onListUpdate() { } @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); } diff --git a/src/main/java/com/glodblock/github/client/me/EssentiaRepo.java b/src/main/java/com/glodblock/github/client/me/EssentiaRepo.java index fe8496cdf..d0dce0312 100644 --- a/src/main/java/com/glodblock/github/client/me/EssentiaRepo.java +++ b/src/main/java/com/glodblock/github/client/me/EssentiaRepo.java @@ -27,6 +27,7 @@ public EssentiaRepo(final IScrollSource src, final ISortSource sortSrc) { super(src, sortSrc); } + @SuppressWarnings("deprecation") @Override public void updateView() { this.view.clear(); diff --git a/src/main/java/com/glodblock/github/client/me/FluidRepo.java b/src/main/java/com/glodblock/github/client/me/FluidRepo.java index 02b5405d6..a58466c0d 100644 --- a/src/main/java/com/glodblock/github/client/me/FluidRepo.java +++ b/src/main/java/com/glodblock/github/client/me/FluidRepo.java @@ -97,6 +97,7 @@ public void setViewCell(final ItemStack[] list) { this.updateView(); } + @SuppressWarnings("deprecation") @Override public void updateView() { this.view.clear(); diff --git a/src/main/java/com/glodblock/github/common/block/BlockFluidBuffer.java b/src/main/java/com/glodblock/github/common/block/BlockFluidBuffer.java index 15720dd02..ac07c3149 100644 --- a/src/main/java/com/glodblock/github/common/block/BlockFluidBuffer.java +++ b/src/main/java/com/glodblock/github/common/block/BlockFluidBuffer.java @@ -48,7 +48,7 @@ public boolean onActivated(World world, int x, int y, int z, EntityPlayer player 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); diff --git a/src/main/java/com/glodblock/github/common/item/BaseItemBlockContainer.java b/src/main/java/com/glodblock/github/common/item/BaseItemBlockContainer.java index 02f4b248f..34f6f35b8 100644 --- a/src/main/java/com/glodblock/github/common/item/BaseItemBlockContainer.java +++ b/src/main/java/com/glodblock/github/common/item/BaseItemBlockContainer.java @@ -23,8 +23,7 @@ public BaseItemBlockContainer(Block id) { @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 toolTip, final boolean advancedToolTips) { blockType.addInformation(itemStack, player, toolTip, advancedToolTips); } diff --git a/src/main/java/com/glodblock/github/common/item/FCBaseItemCell.java b/src/main/java/com/glodblock/github/common/item/FCBaseItemCell.java index d3f5b728b..39574f783 100644 --- a/src/main/java/com/glodblock/github/common/item/FCBaseItemCell.java +++ b/src/main/java/com/glodblock/github/common/item/FCBaseItemCell.java @@ -62,7 +62,6 @@ public FCBaseItemCell(long bytes, int perType, int totalType, double drain) { this.component = null; } - @SuppressWarnings("all") public FCBaseItemCell(final Optional subName) { super(subName); } diff --git a/src/main/java/com/glodblock/github/common/item/ItemBasicFluidStorageCell.java b/src/main/java/com/glodblock/github/common/item/ItemBasicFluidStorageCell.java index 1751fb437..f7bc8fb00 100644 --- a/src/main/java/com/glodblock/github/common/item/ItemBasicFluidStorageCell.java +++ b/src/main/java/com/glodblock/github/common/item/ItemBasicFluidStorageCell.java @@ -43,7 +43,7 @@ public ItemBasicFluidStorageCell(final CellType whichCell, final int housingValu 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 -> { diff --git a/src/main/java/com/glodblock/github/common/item/ItemEnergyCard.java b/src/main/java/com/glodblock/github/common/item/ItemEnergyCard.java index b78c8b9ec..36f61f670 100644 --- a/src/main/java/com/glodblock/github/common/item/ItemEnergyCard.java +++ b/src/main/java/com/glodblock/github/common/item/ItemEnergyCard.java @@ -33,9 +33,8 @@ public ItemEnergyCard register() { } @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 toolTip, boolean flag) { if (isShiftKeyDown()) { toolTip.addAll(RenderUtil.listFormattedStringToWidth(NameConst.i18n(NameConst.TT_ENERGY_CARD_DESC))); } else { diff --git a/src/main/java/com/glodblock/github/common/item/ItemFluidDrop.java b/src/main/java/com/glodblock/github/common/item/ItemFluidDrop.java index d31d66981..7c5414c6d 100644 --- a/src/main/java/com/glodblock/github/common/item/ItemFluidDrop.java +++ b/src/main/java/com/glodblock/github/common/item/ItemFluidDrop.java @@ -41,9 +41,8 @@ public ItemFluidDrop() { } @Override - @SuppressWarnings("unchecked") @SideOnly(Side.CLIENT) - public void getSubItems(Item item, CreativeTabs tab, List list) { + public void getSubItems(Item item, CreativeTabs tab, List 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 String getItemStackDisplayName(ItemStack stack) { } @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 tooltip, boolean flag) { FluidStack fluid = getFluidStack(stack); if (ItemFluidPacket.isDisplay(stack)) return; if (fluid != null) { diff --git a/src/main/java/com/glodblock/github/common/item/ItemFluidPacket.java b/src/main/java/com/glodblock/github/common/item/ItemFluidPacket.java index 846bda399..1ba8022af 100644 --- a/src/main/java/com/glodblock/github/common/item/ItemFluidPacket.java +++ b/src/main/java/com/glodblock/github/common/item/ItemFluidPacket.java @@ -70,8 +70,7 @@ public static boolean isDisplay(ItemStack stack) { } @Override - @SuppressWarnings("unchecked") - public void addInformation(ItemStack stack, EntityPlayer player, List tooltip, boolean flags) { + public void addInformation(ItemStack stack, EntityPlayer player, List tooltip, boolean flags) { FluidStack fluid = getFluidStack(stack); boolean display = isDisplay(stack); if (display) return; diff --git a/src/main/java/com/glodblock/github/common/item/ItemMultiFluidStorageCell.java b/src/main/java/com/glodblock/github/common/item/ItemMultiFluidStorageCell.java index 7a688e7c4..73c9ab814 100644 --- a/src/main/java/com/glodblock/github/common/item/ItemMultiFluidStorageCell.java +++ b/src/main/java/com/glodblock/github/common/item/ItemMultiFluidStorageCell.java @@ -44,7 +44,7 @@ public ItemMultiFluidStorageCell(final CellType whichCell, final int housingValu 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 -> { diff --git a/src/main/java/com/glodblock/github/common/item/ItemPartFluidTerminal.java b/src/main/java/com/glodblock/github/common/item/ItemPartFluidTerminal.java index 2b761b00f..c966c4657 100644 --- a/src/main/java/com/glodblock/github/common/item/ItemPartFluidTerminal.java +++ b/src/main/java/com/glodblock/github/common/item/ItemPartFluidTerminal.java @@ -43,9 +43,8 @@ public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int } @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 toolTip, boolean flag) { if (isShiftKeyDown()) { toolTip.add(NameConst.i18n(NameConst.TT_FLUID_TERMINAL)); } else { diff --git a/src/main/java/com/glodblock/github/common/item/ItemPartLevelTerminal.java b/src/main/java/com/glodblock/github/common/item/ItemPartLevelTerminal.java index f951d862c..9b22f9529 100644 --- a/src/main/java/com/glodblock/github/common/item/ItemPartLevelTerminal.java +++ b/src/main/java/com/glodblock/github/common/item/ItemPartLevelTerminal.java @@ -43,9 +43,8 @@ public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int } @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 toolTip, boolean flag) { if (isShiftKeyDown()) { toolTip.add(NameConst.i18n(NameConst.TT_LEVEL_TERMINAL)); } else { diff --git a/src/main/java/com/glodblock/github/common/item/ItemQuantumBridgeCard.java b/src/main/java/com/glodblock/github/common/item/ItemQuantumBridgeCard.java index 0923402d3..3ea5a5469 100644 --- a/src/main/java/com/glodblock/github/common/item/ItemQuantumBridgeCard.java +++ b/src/main/java/com/glodblock/github/common/item/ItemQuantumBridgeCard.java @@ -33,9 +33,8 @@ public ItemQuantumBridgeCard register() { } @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 toolTip, boolean flag) { if (isShiftKeyDown()) { toolTip.addAll( RenderUtil.listFormattedStringToWidth(NameConst.i18n(NameConst.TT_QUANTUM_BRIDGE_CARD_DESC))); diff --git a/src/main/java/com/glodblock/github/common/parts/PartFluidLevelEmitter.java b/src/main/java/com/glodblock/github/common/parts/PartFluidLevelEmitter.java index bead4fc11..76dea8ed7 100644 --- a/src/main/java/com/glodblock/github/common/parts/PartFluidLevelEmitter.java +++ b/src/main/java/com/glodblock/github/common/parts/PartFluidLevelEmitter.java @@ -226,8 +226,10 @@ public void updateWatcher(final IStackWatcher newWatcher) { } @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 boolean onPartActivate(final EntityPlayer player, final Vec3 pos) { } @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(); } diff --git a/src/main/java/com/glodblock/github/common/parts/PartFluidP2PInterface.java b/src/main/java/com/glodblock/github/common/parts/PartFluidP2PInterface.java index a0d22124e..36ff9cb0b 100644 --- a/src/main/java/com/glodblock/github/common/parts/PartFluidP2PInterface.java +++ b/src/main/java/com/glodblock/github/common/parts/PartFluidP2PInterface.java @@ -485,7 +485,7 @@ public NBTTagCompound getMemoryCardData() { } @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); } diff --git a/src/main/java/com/glodblock/github/common/parts/PartFluidStorageBus.java b/src/main/java/com/glodblock/github/common/parts/PartFluidStorageBus.java index 01b8b4f57..01a0e84a3 100644 --- a/src/main/java/com/glodblock/github/common/parts/PartFluidStorageBus.java +++ b/src/main/java/com/glodblock/github/common/parts/PartFluidStorageBus.java @@ -152,7 +152,8 @@ protected int getUpgradeSlots() { } @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 void setPriority(int newValue) { } @Override - public void saveChanges(final IMEInventory cellInventory) { + public void saveChanges(@SuppressWarnings("rawtypes") final IMEInventory cellInventory) { // NO-OP } diff --git a/src/main/java/com/glodblock/github/common/parts/base/FCPart.java b/src/main/java/com/glodblock/github/common/parts/base/FCPart.java index b6bf77789..217f3bafc 100644 --- a/src/main/java/com/glodblock/github/common/parts/base/FCPart.java +++ b/src/main/java/com/glodblock/github/common/parts/base/FCPart.java @@ -284,7 +284,8 @@ public IMEMonitor getFluidInventory() { } @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() { diff --git a/src/main/java/com/glodblock/github/common/parts/base/FCPartMonitor.java b/src/main/java/com/glodblock/github/common/parts/base/FCPartMonitor.java index e34ede513..a388b76f9 100644 --- a/src/main/java/com/glodblock/github/common/parts/base/FCPartMonitor.java +++ b/src/main/java/com/glodblock/github/common/parts/base/FCPartMonitor.java @@ -323,8 +323,10 @@ public void updateWatcher(final IStackWatcher newWatcher) { } @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); diff --git a/src/main/java/com/glodblock/github/common/storage/FluidCellHandler.java b/src/main/java/com/glodblock/github/common/storage/FluidCellHandler.java index 9f4a5f09e..eb0784e27 100644 --- a/src/main/java/com/glodblock/github/common/storage/FluidCellHandler.java +++ b/src/main/java/com/glodblock/github/common/storage/FluidCellHandler.java @@ -51,7 +51,8 @@ public IIcon getTopTexture_Dark() { @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 void openChestGui(final EntityPlayer player, final IChestOrDrive chest, f } @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 int getStatusForCell(final ItemStack is, final IMEInventory handler) { } @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); } diff --git a/src/main/java/com/glodblock/github/common/tile/TileFluidDiscretizer.java b/src/main/java/com/glodblock/github/common/tile/TileFluidDiscretizer.java index 57500298e..f7cd3fa4c 100644 --- a/src/main/java/com/glodblock/github/common/tile/TileFluidDiscretizer.java +++ b/src/main/java/com/glodblock/github/common/tile/TileFluidDiscretizer.java @@ -81,7 +81,7 @@ public void gridChanged() { } @Override - public void saveChanges(IMEInventory cellInventory) { + public void saveChanges(@SuppressWarnings("rawtypes") IMEInventory cellInventory) { markDirty(); } diff --git a/src/main/java/com/glodblock/github/common/tile/TileLevelMaintainer.java b/src/main/java/com/glodblock/github/common/tile/TileLevelMaintainer.java index 943888b45..2de1d1649 100644 --- a/src/main/java/com/glodblock/github/common/tile/TileLevelMaintainer.java +++ b/src/main/java/com/glodblock/github/common/tile/TileLevelMaintainer.java @@ -318,22 +318,6 @@ public void updateStatus(int idx, boolean enable) { 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 */ diff --git a/src/main/java/com/glodblock/github/coremod/hooker/CoreModHooks.java b/src/main/java/com/glodblock/github/coremod/hooker/CoreModHooks.java index 3d7e8e925..6acf38f87 100644 --- a/src/main/java/com/glodblock/github/coremod/hooker/CoreModHooks.java +++ b/src/main/java/com/glodblock/github/coremod/hooker/CoreModHooks.java @@ -94,7 +94,7 @@ public static long getFluidSize(IAEItemStack aeStack) { } else return aeStack.getStackSize(); } - public static List craftingGridCacheGetCellArray(final CraftingGridCache instance, + public static List> 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) diff --git a/src/main/java/com/glodblock/github/crossmod/extracells/ItemReplacements.java b/src/main/java/com/glodblock/github/crossmod/extracells/ItemReplacements.java index 25560e8f3..26eda941a 100644 --- a/src/main/java/com/glodblock/github/crossmod/extracells/ItemReplacements.java +++ b/src/main/java/com/glodblock/github/crossmod/extracells/ItemReplacements.java @@ -294,7 +294,6 @@ private static void deprecateItemStorage(int srcMeta, IItemDefinition replacemen 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, diff --git a/src/main/java/com/glodblock/github/crossmod/extracells/ProxyItem.java b/src/main/java/com/glodblock/github/crossmod/extracells/ProxyItem.java index f9ead660f..8c6900b35 100644 --- a/src/main/java/com/glodblock/github/crossmod/extracells/ProxyItem.java +++ b/src/main/java/com/glodblock/github/crossmod/extracells/ProxyItem.java @@ -55,7 +55,7 @@ public boolean getHasSubtypes() { } @Override - public void addInformation(ItemStack stack, EntityPlayer player, List info, boolean p_77624_4_) { + public void addInformation(ItemStack stack, EntityPlayer player, List info, boolean p_77624_4_) { int meta = stack.getItemDamage(); ProxyItemEntry itemRepl = replacements.get(meta); if (itemRepl != null) { @@ -63,7 +63,7 @@ public void addInformation(ItemStack stack, EntityPlayer player, List info, bool 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."); } } diff --git a/src/main/java/com/glodblock/github/crossmod/extracells/storage/ProxyVoidStorageCell.java b/src/main/java/com/glodblock/github/crossmod/extracells/storage/ProxyVoidStorageCell.java index 227dd8609..da29ac729 100644 --- a/src/main/java/com/glodblock/github/crossmod/extracells/storage/ProxyVoidStorageCell.java +++ b/src/main/java/com/glodblock/github/crossmod/extracells/storage/ProxyVoidStorageCell.java @@ -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 info, boolean displayMoreInfo) { @@ -23,7 +27,7 @@ public void addCheckedInformation(ItemStack stack, EntityPlayer player, List getWailaBody(final IPart part, final List currentToo 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; diff --git a/src/main/java/com/glodblock/github/crossmod/waila/part/FluidMonitorWailaDataProvider.java b/src/main/java/com/glodblock/github/crossmod/waila/part/FluidMonitorWailaDataProvider.java index 60f6af0cf..ad85f6f23 100644 --- a/src/main/java/com/glodblock/github/crossmod/waila/part/FluidMonitorWailaDataProvider.java +++ b/src/main/java/com/glodblock/github/crossmod/waila/part/FluidMonitorWailaDataProvider.java @@ -27,7 +27,9 @@ public List getWailaBody(final IPart part, final List currentToo 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; } diff --git a/src/main/java/com/glodblock/github/crossmod/waila/tile/FluidInvWailaDataProvider.java b/src/main/java/com/glodblock/github/crossmod/waila/tile/FluidInvWailaDataProvider.java index 36141c188..8ab583f36 100644 --- a/src/main/java/com/glodblock/github/crossmod/waila/tile/FluidInvWailaDataProvider.java +++ b/src/main/java/com/glodblock/github/crossmod/waila/tile/FluidInvWailaDataProvider.java @@ -41,7 +41,7 @@ public List getWailaBody(final ItemStack itemStack, final List c 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 @@ private void addTooltip(List currentToolTip, IAEFluidTank ft, boolean pr 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)); } } } diff --git a/src/main/java/com/glodblock/github/inventory/FluidConvertingInventoryAdaptor.java b/src/main/java/com/glodblock/github/inventory/FluidConvertingInventoryAdaptor.java index 875b9b1d6..f4500f459 100644 --- a/src/main/java/com/glodblock/github/inventory/FluidConvertingInventoryAdaptor.java +++ b/src/main/java/com/glodblock/github/inventory/FluidConvertingInventoryAdaptor.java @@ -44,7 +44,9 @@ import appeng.util.inv.IInventoryDestination; import appeng.util.inv.ItemSlot; import cofh.api.transport.IItemDuct; +import crazypants.enderio.conduit.ConnectionMode; import crazypants.enderio.conduit.item.IItemConduit; +import crazypants.enderio.conduit.liquid.ILiquidConduit; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaPipeEntity; @@ -274,14 +276,19 @@ public boolean containsItems() { boolean anyValid = false; for (ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) { // Avoid sending stuff into itself me network - if (checkValidSide(this.posInterface.getOffSet(dir).getTileEntity(), dir) - && !isItemConduit(this.posInterface.getOffSet(dir).getTileEntity())) { - final int result = checkItemFluids(this.getSideFluid(dir), this.getSideItem(dir), dir.getOpposite()); - if (result == 1) { - return true; - } - if (result != 2) { - anyValid = true; + TileEntity te = this.posInterface.getOffSet(dir).getTileEntity(); + if (te != null && checkValidSide(te, dir)) { + if (!isConduit(te) || (!isItemConduit(te) && isFluidConduitConnected(te, dir))) { + final int result = checkItemFluids( + this.getSideFluid(dir), + this.getSideItem(dir), + dir.getOpposite()); + if (result == 1) { + return true; + } + if (result != 2) { + anyValid = true; + } } } } @@ -356,6 +363,15 @@ private boolean isGTMachine(Object o) { return false; } + private boolean isFluidConduitConnected(TileEntity te, ForgeDirection dir) { + try { + ILiquidConduit liquidConduit = (ILiquidConduit) eioTypeCheck.invoke(te, ILiquidConduit.class); + return liquidConduit.getConnectionMode(dir.getOpposite()) != ConnectionMode.DISABLED; + } catch (IllegalAccessException | InvocationTargetException e) { + return false; + } + } + private boolean isItemConduit(TileEntity te) { if (ModAndClassUtil.EIO && conduitClazz.isInstance(te)) { try { diff --git a/src/main/java/com/glodblock/github/inventory/MEMonitorIFluidHandler.java b/src/main/java/com/glodblock/github/inventory/MEMonitorIFluidHandler.java index 1344b22b1..54a8305fd 100644 --- a/src/main/java/com/glodblock/github/inventory/MEMonitorIFluidHandler.java +++ b/src/main/java/com/glodblock/github/inventory/MEMonitorIFluidHandler.java @@ -146,11 +146,12 @@ public TickRateModulation onTick() { private void postDifference(Iterable a) { if (a != null) { - Iterator i = this.listeners.entrySet().iterator(); + Iterator, Object>> i = this.listeners.entrySet() + .iterator(); while (i.hasNext()) { - Map.Entry, Object> l = (Map.Entry) i.next(); - IMEMonitorHandlerReceiver key = l.getKey(); + Map.Entry, Object> l = i.next(); + IMEMonitorHandlerReceiver key = l.getKey(); if (key.isValid(l.getValue())) { key.postChange(this, a, this.getActionSource()); } else { @@ -184,7 +185,7 @@ public boolean validForPass(int i) { return true; } - public IItemList getAvailableItems(IItemList out, int iteration) { + public IItemList getAvailableItems(IItemList out, int iteration) { for (IAEFluidStack fs : this.cache) { out.addStorage(fs); @@ -202,10 +203,6 @@ public IItemList getStorageList() { return this.cache; } - private StorageFilter getMode() { - return this.mode; - } - public void setMode(StorageFilter mode) { this.mode = mode; } diff --git a/src/main/java/com/glodblock/github/inventory/gui/MouseRegionManager.java b/src/main/java/com/glodblock/github/inventory/gui/MouseRegionManager.java index 7dd9f674f..948d06763 100644 --- a/src/main/java/com/glodblock/github/inventory/gui/MouseRegionManager.java +++ b/src/main/java/com/glodblock/github/inventory/gui/MouseRegionManager.java @@ -44,7 +44,7 @@ public void render(int mX, int mY) { if (region.containsMouse(mX, mY)) { List 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; } } diff --git a/src/main/java/com/glodblock/github/loader/filter/FluidFilter.java b/src/main/java/com/glodblock/github/loader/filter/FluidFilter.java index 9f8775297..9f8ac6d7e 100644 --- a/src/main/java/com/glodblock/github/loader/filter/FluidFilter.java +++ b/src/main/java/com/glodblock/github/loader/filter/FluidFilter.java @@ -24,6 +24,7 @@ public static boolean filter(TypeFilter typeFilter, IAEStack stack) { case FLUIDS -> { return item instanceof ItemFluidDrop; } + default -> {} } } } diff --git a/src/main/java/com/glodblock/github/nei/object/IllegalOrderStackID.java b/src/main/java/com/glodblock/github/nei/object/IllegalOrderStackID.java index e5dda209c..7f7a219c3 100644 --- a/src/main/java/com/glodblock/github/nei/object/IllegalOrderStackID.java +++ b/src/main/java/com/glodblock/github/nei/object/IllegalOrderStackID.java @@ -2,6 +2,8 @@ public class IllegalOrderStackID extends RuntimeException { + private static final long serialVersionUID = -3782749325355674453L; + public IllegalOrderStackID(int id) { super("Illegal type id: " + id); } diff --git a/src/main/java/com/glodblock/github/network/CPacketLevelTerminalCommands.java b/src/main/java/com/glodblock/github/network/CPacketLevelTerminalCommands.java index 60a4a376a..0c786a961 100644 --- a/src/main/java/com/glodblock/github/network/CPacketLevelTerminalCommands.java +++ b/src/main/java/com/glodblock/github/network/CPacketLevelTerminalCommands.java @@ -7,11 +7,8 @@ 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 static class Handler implements IMessageHandler { TileEntity tile = DimensionManager.getWorld(message.dim) @@ -134,34 +130,7 @@ public IMessage onMessage(CPacketLevelTerminalCommands message, MessageContext c 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; } diff --git a/src/main/java/com/glodblock/github/network/CPacketTransferRecipe.java b/src/main/java/com/glodblock/github/network/CPacketTransferRecipe.java index f28486e34..8d8931319 100644 --- a/src/main/java/com/glodblock/github/network/CPacketTransferRecipe.java +++ b/src/main/java/com/glodblock/github/network/CPacketTransferRecipe.java @@ -124,7 +124,8 @@ public IMessage onMessage(CPacketTransferRecipe message, MessageContext ctx) { } // 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()); diff --git a/src/main/java/com/glodblock/github/util/DualityFluidInterface.java b/src/main/java/com/glodblock/github/util/DualityFluidInterface.java index 96a466a48..32f465520 100644 --- a/src/main/java/com/glodblock/github/util/DualityFluidInterface.java +++ b/src/main/java/com/glodblock/github/util/DualityFluidInterface.java @@ -218,7 +218,8 @@ public IConfigManager getConfigManager() { } @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) { diff --git a/src/main/java/com/glodblock/github/util/FluidSorters.java b/src/main/java/com/glodblock/github/util/FluidSorters.java index 8de583886..018e3feb5 100644 --- a/src/main/java/com/glodblock/github/util/FluidSorters.java +++ b/src/main/java/com/glodblock/github/util/FluidSorters.java @@ -3,6 +3,7 @@ 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()); } diff --git a/src/main/java/com/glodblock/github/util/RenderUtil.java b/src/main/java/com/glodblock/github/util/RenderUtil.java index dac43a660..0fe973e8b 100644 --- a/src/main/java/com/glodblock/github/util/RenderUtil.java +++ b/src/main/java/com/glodblock/github/util/RenderUtil.java @@ -73,7 +73,6 @@ public static void renderFluidIntoGui(Gui gui, int x, int y, int width, int heig } } - @SuppressWarnings("unchecked") public static List listFormattedStringToWidth(String str) { return Minecraft.getMinecraft().fontRenderer.listFormattedStringToWidth(str, 150); } diff --git a/src/main/java/com/glodblock/github/util/Util.java b/src/main/java/com/glodblock/github/util/Util.java index b4d0f7019..6b3de0b2c 100644 --- a/src/main/java/com/glodblock/github/util/Util.java +++ b/src/main/java/com/glodblock/github/util/Util.java @@ -287,8 +287,9 @@ public static String getFluidModID(Fluid fluid) { } } + @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) { diff --git a/src/main/resources/assets/ae2fc/lang/en_US.lang b/src/main/resources/assets/ae2fc/lang/en_US.lang index 3df326555..fe0fa11ad 100644 --- a/src/main/resources/assets/ae2fc/lang/en_US.lang +++ b/src/main/resources/assets/ae2fc/lang/en_US.lang @@ -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 diff --git a/src/main/resources/mcmod.info b/src/main/resources/mcmod.info index 2b3e358f5..e7d3c9c99 100644 --- a/src/main/resources/mcmod.info +++ b/src/main/resources/mcmod.info @@ -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}",