Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
78f6909
update
Dream-Master Oct 7, 2025
ee6c746
pixels
Ranzuu Oct 7, 2025
32e7bd2
Fixed structurelib display and added hint for uplink hatch in tooltip
cubefury Oct 7, 2025
04a55e5
Cleaned up input/output slot method naming
cubefury Oct 7, 2025
9a52add
Fixed structure hint.
cubefury Oct 7, 2025
9a7af7d
Fix edge-case NPE on load when player attempts to load tradestate for…
cubefury Oct 7, 2025
9207b60
Merge pull request #1 from Ranzuu/edit
cubefury Oct 8, 2025
3fe231b
Merge pull request #2 from GTNewHorizons/structure-changes
cubefury Oct 8, 2025
d7ab8bb
update
Dream-Master Oct 8, 2025
e0646fb
Update zh_CN.lang
Omgise Oct 8, 2025
e1f86c5
Update zh_CN.lang
Omgise Oct 8, 2025
914015c
Merge pull request #6 from Omgise/master
cubefury Oct 8, 2025
8f27d4c
Separate Tile name and gui title
Ranzuu Oct 8, 2025
d286e85
Localize the ME Vending Uplink Hatch Overlay
Ranzuu Oct 8, 2025
3f80365
Now sorts by tradegroup id before writing to file, and does not add i…
cubefury Oct 9, 2025
d15d641
Merge pull request #9 from GTNewHorizons/change-save-format
cubefury Oct 9, 2025
59df166
Merge pull request #8 from Ranzuu/r-texture
cubefury Oct 9, 2025
eb7bb00
Fix edge-case crash when loading trade history for an already-removed…
cubefury Oct 9, 2025
2dfa859
Add list trade display format
cubefury Oct 10, 2025
e9c7a7e
Added alphabetical sort order
cubefury Oct 10, 2025
619d63f
Separated Item and Item Count in list mode.
cubefury Oct 10, 2025
deea723
Merge pull request #10 from GTNewHorizons/qol-toggles
cubefury Oct 10, 2025
8711e46
Separated Item and Item Count in list mode.
cubefury Oct 10, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Alpha Testing
This can be used as a standalone mod with several dependencies. The vending machine block and ME Vending Uplink do not come with default recipes.

### Required Dependencies:
- GT5U
- GT5Unofficial-GTNH (Not compatible with main GT5U branch!)
- ModularUI 2
- NotEnoughItems
- Applied Energistics 2
Expand Down
16 changes: 8 additions & 8 deletions dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@
* For more details, see https://docs.gradle.org/8.0.1/userguide/java_library_plugin.html#sec:java_library_configurations_graph
*/
dependencies {
implementation("com.github.GTNewHorizons:NotEnoughItems:2.7.77-GTNH:dev")
implementation("com.github.GTNewHorizons:GTNHLib:0.6.39:dev")
compileOnly("com.github.GTNewHorizons:BetterQuesting:3.7.11-GTNH:dev")
implementation("com.github.GTNewHorizons:ModularUI2:2.2.18-1.7.10:dev")
// implementation("com.github.GTNewHorizons:ModularUI2:99.99:dev")
implementation("com.github.GTNewHorizons:StructureLib:1.4.18:dev")
implementation("com.github.GTNewHorizons:GT5-Unofficial:5.09.51.440:dev")
implementation("com.github.GTNewHorizons:NotEnoughItems:2.8.6-GTNH:dev")
implementation("com.github.GTNewHorizons:GTNHLib:0.7.0:dev")
compileOnly("com.github.GTNewHorizons:BetterQuesting:3.8.8-GTNH:dev")
implementation("com.github.GTNewHorizons:ModularUI2:2.2.20-1.7.10:dev")
// implementation("com.github.GTNewHorizons:ModularUI2:2.2.20-1.7.10:dev")
implementation("com.github.GTNewHorizons:StructureLib:1.4.23:dev")
implementation("com.github.GTNewHorizons:GT5-Unofficial:5.09.52.21:dev")
}

// deps may transitively add Baubles, so we replace it
Expand All @@ -49,7 +49,7 @@ project.getConfigurations()
final DependencySubstitutions ds = c.getResolutionStrategy()
.getDependencySubstitution()
ds.substitute(ds.module("com.github.GTNewHorizons:Baubles"))
.using(ds.module("com.github.GTNewHorizons:Baubles-Expanded:2.1.9-GTNH"))
.using(ds.module("com.github.GTNewHorizons:Baubles-Expanded:2.2.0-GTNH"))
.withClassifier("dev")
.because("Baubles-Expanded replaces Baubles")
})
2 changes: 1 addition & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ pluginManagement {
}

plugins {
id("com.gtnewhorizons.gtnhsettingsconvention") version("1.0.41")
id("com.gtnewhorizons.gtnhsettingsconvention") version("1.0.43")
}
25 changes: 25 additions & 0 deletions src/main/java/com/cubefury/vendingmachine/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

import net.minecraftforge.common.config.Configuration;

import com.cubefury.vendingmachine.blocks.gui.MTEVendingMachineGui;
import com.cubefury.vendingmachine.blocks.gui.TradeItemDisplayWidget.DisplayType;

public class Config {

private static final String CONFIG_CATEGORY_VM = "Vending Machine Settings";
Expand All @@ -13,6 +16,8 @@ public class Config {
public static int gui_refresh_interval = 20;
public static int dispense_frequency = 10;
public static int dispense_amount = 16;
public static DisplayType display_type = DisplayType.TILE;
public static MTEVendingMachineGui.SortMode sort_mode = MTEVendingMachineGui.SortMode.SMART;

public static File worldDir = null;

Expand All @@ -36,6 +41,26 @@ public static void init(File configFile) {
1,
Integer.MAX_VALUE,
"Number of items per dispense cycle");
try {
display_type = DisplayType.valueOf(
configuration.getString(
"display_type",
CONFIG_CATEGORY_VM,
"TILE",
"Default trade display format, either TILE or LIST. Case sensitive."));
} catch (IllegalArgumentException e) {
display_type = DisplayType.TILE;
}
try {
sort_mode = MTEVendingMachineGui.SortMode.valueOf(
configuration.getString(
"sort_mode",
CONFIG_CATEGORY_VM,
"SMART",
"Default sort mode, either SMART or ALPHABET. Case sensitive."));
} catch (IllegalArgumentException e) {
sort_mode = MTEVendingMachineGui.SortMode.SMART;
}

if (configuration.hasChanged()) {
configuration.save();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ public class Textures {
VM_OVERLAY_ACTIVE_0 = new CustomIcon("vendingmachine:vending_machine_overlay_active_0"),
VM_OVERLAY_ACTIVE_1 = new CustomIcon("vendingmachine:vending_machine_overlay_active_1"),
VM_OVERLAY_ACTIVE_2 = new CustomIcon("vendingmachine:vending_machine_overlay_active_2"),
VM_OVERLAY_ACTIVE_3 = new CustomIcon("vendingmachine:vending_machine_overlay_active_3");
VM_OVERLAY_ACTIVE_3 = new CustomIcon("vendingmachine:vending_machine_overlay_active_3"),

VUPLINK_OVERLAY_0 = new CustomIcon("vendingmachine:vending_uplink_machine_overlay_inactive"),
VUPLINK_OVERLAY_1 = new CustomIcon("vendingmachine:vending_uplink_machine_overlay_active");

public static final IIconContainer[] VM_OVERLAY_ACTIVE = { VM_OVERLAY_ACTIVE_0, VM_OVERLAY_ACTIVE_1,
VM_OVERLAY_ACTIVE_2, VM_OVERLAY_ACTIVE_3, VM_OVERLAY_4 // bottom right not animated
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
import static com.cubefury.vendingmachine.api.enums.Textures.VM_MACHINE_FRONT_ON_GLOW;
import static com.cubefury.vendingmachine.api.enums.Textures.VM_OVERLAY;
import static com.cubefury.vendingmachine.api.enums.Textures.VM_OVERLAY_ACTIVE;
import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock;
import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofChain;
import static gregtech.api.util.GTStructureUtility.ofHatchAdderOptional;

import java.util.ArrayList;
Expand Down Expand Up @@ -46,6 +48,7 @@
import com.cubefury.vendingmachine.trade.TradeRequest;
import com.cubefury.vendingmachine.util.BigItemStack;
import com.cubefury.vendingmachine.util.OverlayHelper;
import com.cubefury.vendingmachine.util.Translator;
import com.gtnewhorizon.structurelib.StructureLibAPI;
import com.gtnewhorizon.structurelib.alignment.IAlignment;
import com.gtnewhorizon.structurelib.alignment.IAlignmentLimits;
Expand Down Expand Up @@ -79,12 +82,14 @@ public class MTEVendingMachine extends MTEMultiBlockBase
.addShape("main", new String[][] { { "cc", "c~", "cc" } })
.addElement(
'c',
ofHatchAdderOptional(
MTEVendingMachine::addUplinkHatch,
((BlockCasings11) GregTechAPI.sBlockCasings11).getTextureIndex(0),
1,
GregTechAPI.sBlockCasings11,
0))
ofChain(
ofHatchAdderOptional(
MTEVendingMachine::addUplinkHatch,
((BlockCasings11) GregTechAPI.sBlockCasings11).getTextureIndex(0),
1,
GregTechAPI.sBlockCasings11,
0),
ofBlock(GregTechAPI.sBlockCasings11, 0)))
.build();

private final ArrayList<MTEVendingUplinkHatch> uplinkHatches = new ArrayList<>();
Expand Down Expand Up @@ -343,7 +348,7 @@ public boolean getDefaultHasMaintenanceChecks() {

@Override
public String[] getStructureDescription(ItemStack stackSize) {
return getTooltip().getStructureHint();
return new String[] { Translator.translate("structure.vendingmachine.hint.1") };
}

@Override
Expand All @@ -359,6 +364,7 @@ protected MultiblockTooltipBuilder getTooltip() {
.beginStructureBlock(2, 3, 1, false)
.addController("Middle")
.addOtherStructurePart("Tin Item Pipe Casings", "Everything except the controller")
.addOtherStructurePart("ME Vending Uplink Hatch", "Any Pipe Casing, Optional")
.addStructureInfo("Cannot be flipped onto its side")
.toolTipFinisher();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.cubefury.vendingmachine.blocks;

import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_ME_INPUT_FLUID_HATCH;
import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_ME_INPUT_FLUID_HATCH_ACTIVE;
import static com.cubefury.vendingmachine.api.enums.Textures.VUPLINK_OVERLAY_0;
import static com.cubefury.vendingmachine.api.enums.Textures.VUPLINK_OVERLAY_1;

import java.util.EnumSet;

Expand Down Expand Up @@ -120,12 +120,12 @@ public void securityBreak() {}

@Override
public ITexture[] getTexturesActive(ITexture aBaseTexture) {
return new ITexture[] { aBaseTexture, TextureFactory.of(OVERLAY_ME_INPUT_FLUID_HATCH_ACTIVE) };
return new ITexture[] { aBaseTexture, TextureFactory.of(VUPLINK_OVERLAY_1) };
}

@Override
public ITexture[] getTexturesInactive(ITexture aBaseTexture) {
return new ITexture[] { aBaseTexture, TextureFactory.of(OVERLAY_ME_INPUT_FLUID_HATCH) };
return new ITexture[] { aBaseTexture, TextureFactory.of(VUPLINK_OVERLAY_0) };
}

@Override
Expand Down
Loading