Skip to content

Commit

Permalink
Merge branch 'master' into fix-essentia-level-maintaining
Browse files Browse the repository at this point in the history
  • Loading branch information
serenibyss authored Dec 30, 2024
2 parents 2876db6 + 0df88f2 commit e187ef3
Show file tree
Hide file tree
Showing 65 changed files with 149 additions and 197 deletions.
4 changes: 2 additions & 2 deletions dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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')

Expand All @@ -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'
}
Expand Down
16 changes: 8 additions & 8 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -45,32 +45,32 @@ 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
# public static final String VERSION = "GRADLETOKEN_VERSION";
# 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.
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/com/glodblock/github/FluidCraft.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ public GuiDualInterface(InventoryPlayer inventoryPlayer, IInterfaceHost te) {
}

@Override
@SuppressWarnings("unchecked")
protected void addButtons() {
this.priority = new GuiTabButton(
this.guiLeft + 154,
Expand Down Expand Up @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ protected void actionPerformed(final GuiButton btn) {
}

@Override
@SuppressWarnings("unchecked")
public void initGui() {
super.initGui();
this.buttonList.add(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ public void func_146977_a(final Slot s) {
}

@Override
@SuppressWarnings("unchecked")
public void initGui() {
super.initGui();
this.switcher = new GuiTabButton(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ public GuiFluidPatternTerminal(final InventoryPlayer inventoryPlayer, final IWir
}

@Override
@SuppressWarnings("unchecked")
public void initGui() {
super.initGui();
this.tabCraftButton = new GuiTabButton(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ public GuiFluidPatternTerminalEx(final InventoryPlayer inventoryPlayer, final IW
}

@Override
@SuppressWarnings("unchecked")
public void initGui() {
super.initGui();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,6 @@ private void setScrollBar() {
}
}

@SuppressWarnings("unchecked")
@Override
public void initGui() {
super.initGui();
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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);
}
Expand All @@ -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<String> textLines, int x, int y, FontRenderer font) {
if (!textLines.isEmpty()) {
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
RenderHelper.disableStandardItemLighting();
Expand Down Expand Up @@ -971,7 +966,6 @@ private class InterfaceWirelessList {
private final List<InterfaceWirelessSection> visibleSections = new ArrayList<>();
private boolean isDirty;
private int height;
private InterfaceWirelessEntry hoveredEntry;

InterfaceWirelessList() {
this.isDirty = true;
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,6 @@ public void postUpdate(List<IAEItemStack> list) {
}
}

@SuppressWarnings("unchecked")
public void initGui() {
super.initGui();
this.lastWorkingTick = this.refreshTick;
Expand Down Expand Up @@ -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<GuiButton> buttonList) {
this.qty = qtyInput;
this.batch = batchInput;
this.enable = enableBtn;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -175,7 +174,6 @@ private void setScrollBar() {
}
}

@SuppressWarnings("unchecked")
@Override
public void initGui() {
super.initGui();
Expand Down Expand Up @@ -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));
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
}
Expand Down Expand Up @@ -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<String> textLines, int x, int y, FontRenderer font) {
if (!textLines.isEmpty()) {
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
RenderHelper.disableStandardItemLighting();
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -981,7 +969,6 @@ private class LevelTerminalList {
private final List<LevelTerminalSection> visibleSections = new ArrayList<>();
private boolean isDirty;
private int height;
private LevelTerminalEntry hoveredEntry;

LevelTerminalList() {
isDirty = true;
Expand Down Expand Up @@ -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;
Expand All @@ -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 {
Expand Down Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ public GuiRenamer(InventoryPlayer ip, ITerminalHost monitorable) {
this.textField.setMaxStringLength(32);
}

@SuppressWarnings("unchecked")
@Override
public void initGui() {
super.initGui();
Expand Down
Loading

0 comments on commit e187ef3

Please sign in to comment.