Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
117 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
a79b4d2
Merge pull request #11 from GTNewHorizons/readme-changes
cubefury Oct 10, 2025
15dfef5
Changes:
cubefury Oct 10, 2025
24c5d04
Merge pull request #12 from GTNewHorizons/color-fixes
cubefury Oct 10, 2025
6bda1e8
update
Dream-Master Oct 10, 2025
e2aed96
Shifted text color setting to lang file
cubefury Oct 10, 2025
2dda393
Merge pull request #13 from GTNewHorizons/color-fixes
cubefury Oct 10, 2025
39a01d4
Removed flavortext labels from trades.
cubefury Oct 11, 2025
0c3f7e6
Fixed item display override
cubefury Oct 11, 2025
698ebb4
Regularized save file format by sorting the names of NBT tags within …
cubefury Oct 11, 2025
2bad5a0
Remove commented out dependency
cubefury Oct 11, 2025
02df82b
Fixed a bug where connecting to a server would override a player's lo…
cubefury Oct 11, 2025
35b153f
[V2 Fix] Fixed a bug where the coins display in GUI would not update …
cubefury Oct 11, 2025
e81ffb3
Merge pull request #17 from GTNewHorizons/fix-coins-not-updating
cubefury Oct 12, 2025
19fd3c2
Adapt to MUI2 update
cubefury Oct 12, 2025
b96f487
Fix hoverbackground behavior
cubefury Oct 12, 2025
c224aca
Fix hoverbackground behavior for lists
cubefury Oct 12, 2025
08b4984
Fixed persistent tooltips onMouseEndHover.
cubefury Oct 12, 2025
f2eb136
Fix element positioning
cubefury Oct 12, 2025
9b87a8c
Remove color-correction work around for ListWidget elements
cubefury Oct 12, 2025
8dfe321
[Crashing] Address Review Comments
cubefury Oct 12, 2025
c948122
[Working] Address Review Comments
cubefury Oct 12, 2025
d0a3700
Merge pull request #18 from GTNewHorizons/fix-ui-crash
FrostyFire1 Oct 12, 2025
96c3207
Merge branch 'master' into remove-trade-labels
Dream-Master Oct 12, 2025
00c6d40
Merge pull request #15 from GTNewHorizons/remove-trade-labels
Dream-Master Oct 12, 2025
634b9c5
update
Dream-Master Oct 12, 2025
84a716d
Changes:
cubefury Oct 12, 2025
13f835a
Merge pull request #20 from GTNewHorizons/fix-no-compile
boubou19 Oct 12, 2025
8d8c2b2
Fixed coins not updating in multiplayer.
cubefury Oct 13, 2025
1606b03
Revert event handler changes - out of scope for PR
cubefury Oct 13, 2025
2eb06e9
Merge pull request #21 from GTNewHorizons/fix-currency-sync
Dream-Master Oct 13, 2025
29c4350
update
Dream-Master Oct 13, 2025
6b6a6da
Changes:
cubefury Oct 13, 2025
2407461
Fix NPE from trade item display load
cubefury Oct 13, 2025
5a3e0e0
Merge pull request #22 from GTNewHorizons/fix-sync
FrostyFire1 Oct 13, 2025
af399f8
Fix coins going missing on server start in multiplayer.
cubefury Oct 13, 2025
2d322b1
Fixed backing up of tradestate file during write.
cubefury Oct 13, 2025
9d7aa73
Merge pull request #24 from GTNewHorizons/fix-coins-void
Dream-Master Oct 13, 2025
f560ff8
Fixed bug where coins from MP session would persist into SP worlds. C…
cubefury Oct 14, 2025
77b7e68
Merge pull request #26 from GTNewHorizons/fix-sp-coins
Dream-Master Oct 14, 2025
34896d7
update
Dream-Master Oct 14, 2025
53e020a
Pull CurrencyType out of CurrencyItem class
cubefury Oct 14, 2025
00339a2
Swapped coin amount display to synchandlers
cubefury Oct 15, 2025
8df80c6
Removed homebrewed currency sync
cubefury Oct 15, 2025
88375c5
Fixed a bug where if you had exactly 10, 100, 1k or 10k of some coin,…
cubefury Oct 15, 2025
cba40a9
Address comments + bumped mui to 2.3.3
cubefury Oct 15, 2025
8346911
Merge pull request #28 from GTNewHorizons/refactor-coins
cubefury Oct 15, 2025
9e4d47f
Added support for non-consumable items in a trade.
cubefury Oct 15, 2025
66f4215
update
Dream-Master Oct 16, 2025
b8f2f24
Tidied up extra newlines in tooltips
cubefury Oct 16, 2025
0b08db4
Fix NEI recipe handler underlines
cubefury Oct 16, 2025
1d1ad17
Revert out of scope recipe handler change.
cubefury Oct 17, 2025
ac11406
update
Dream-Master Oct 16, 2025
5593fbb
Fixed recipe underlines in NEI
cubefury Oct 17, 2025
3eb9255
Added NC to corner of non-consumable stacks
cubefury Oct 17, 2025
fa66518
Update GT package to reference new location of MTEMultiBlockBaseGui
cubefury Oct 17, 2025
efc9aec
Address comments
cubefury Oct 17, 2025
7bf7d97
update
Dream-Master Oct 17, 2025
240c55f
Merge pull request #31 from GTNewHorizons/update-gt-packages
Dream-Master Oct 17, 2025
a0ef8b2
Added support for non-consumable items in a trade.
cubefury Oct 15, 2025
b8af728
Tidied up extra newlines in tooltips
cubefury Oct 16, 2025
760207a
Fix NEI recipe handler underlines
cubefury Oct 16, 2025
d9d70d6
Revert out of scope recipe handler change.
cubefury Oct 17, 2025
bde3c89
Merge pull request #29 from GTNewHorizons/support-non-consumables
FrostyFire1 Oct 17, 2025
61ad4b7
Update GT package to reference new location of MTEMultiBlockBaseGui
cubefury Oct 17, 2025
3abb3d4
Address comments
cubefury Oct 17, 2025
87c12bb
update
Dream-Master Oct 17, 2025
8b30f7e
Merge branch 'master' into fix-recipe-display
cubefury Oct 17, 2025
f44cae1
formatted nei display with more rows
cubefury Oct 17, 2025
33eafc7
Fix element positions
cubefury Oct 17, 2025
3664069
update
Dream-Master Oct 17, 2025
f3a46e8
Disable trades and trade UI refresh when machine unforms
cubefury Oct 18, 2025
654a52c
Removed clunky baseMTE reference
cubefury Oct 18, 2025
803d62c
Disabled coin insert/eject when vm is not formed
cubefury Oct 18, 2025
01ed57a
swapped to getActive()
cubefury Oct 18, 2025
b345def
Removed unnecessary null check
cubefury Oct 18, 2025
528796b
missed one
cubefury Oct 18, 2025
e89013b
Merge branch 'master' into fix-recipe-display
cubefury Oct 18, 2025
94e2a3a
reduced max recipes per page
cubefury Oct 18, 2025
e5994ad
Changed UI height
cubefury Oct 18, 2025
eda547c
Merge pull request #33 from GTNewHorizons/fix
cubefury Oct 18, 2025
8c44f0e
Merge branch 'master' into fix-recipe-display
cubefury Oct 18, 2025
ca10f12
Merge pull request #30 from GTNewHorizons/fix-recipe-display
Dream-Master Oct 18, 2025
733d8a4
update
Dream-Master Oct 18, 2025
18ae904
ignore nbt
cubefury Oct 18, 2025
ae4a89b
Ignore NBT for items in ME system
cubefury Oct 19, 2025
adf454b
Removed experimental code and added null check for cached items
cubefury Oct 19, 2025
bf49331
spotless
cubefury Oct 19, 2025
466acf8
Made uplink texture update correctly when powered by ME system
cubefury Oct 20, 2025
f253d28
reduced frequency of active check
cubefury Oct 20, 2025
6e3f2aa
Merge pull request #35 from GTNewHorizons/fix-uplink-textures
cubefury Oct 20, 2025
47c0b86
Merge branch 'master' into ignore-trade-nbt
cubefury Oct 20, 2025
7248eaa
Merge pull request #34 from GTNewHorizons/ignore-trade-nbt
Dream-Master Oct 22, 2025
b9d34b6
update
Dream-Master Oct 22, 2025
e634d94
Added oredict compatability for input items
cubefury Oct 27, 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.20-GTNH:dev")
implementation("com.github.GTNewHorizons:GTNHLib:0.7.0:dev")
compileOnly("com.github.GTNewHorizons:BetterQuesting:3.8.10-GTNH:dev")

implementation("com.github.GTNewHorizons:ModularUI2:2.3.5-1.7.10:dev")
implementation("com.github.GTNewHorizons:StructureLib:1.4.23:dev")
implementation("com.github.GTNewHorizons:GT5-Unofficial:5.09.52.65: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.2-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.44")
}
35 changes: 35 additions & 0 deletions src/main/java/com/cubefury/vendingmachine/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,22 @@

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";
private static final String CONFIG_CATEGORY_DEVELOPER = "Developer Settings";

public static String data_dir = "vendingmachine";
public static String config_dir = "config/vendingmachine";
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 boolean forceRewriteDatabase = false;

public static File worldDir = null;

Expand All @@ -37,6 +44,34 @@ public static void init(File configFile) {
Integer.MAX_VALUE,
"Number of items per dispense cycle");

configuration.addCustomCategoryComment(CONFIG_CATEGORY_DEVELOPER, "Developer Settings");
forceRewriteDatabase = configuration.getBoolean(
"force_rewrite_database",
CONFIG_CATEGORY_DEVELOPER,
forceRewriteDatabase,
"Force rewrite database on load, for add/remove trades or change of format");

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
14 changes: 11 additions & 3 deletions src/main/java/com/cubefury/vendingmachine/VendingMachine.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@
import org.apache.logging.log4j.Logger;

import com.cubefury.vendingmachine.gui.WidgetThemes;
import com.cubefury.vendingmachine.handlers.SaveLoadHandler;
import com.cubefury.vendingmachine.items.VMItems;
import com.cubefury.vendingmachine.network.PacketTypeRegistry;
import com.cubefury.vendingmachine.network.SerializedPacket;
import com.cubefury.vendingmachine.storage.NameCache;
import com.cubefury.vendingmachine.util.ItemPlaceholder;

import cpw.mods.fml.common.Loader;
Expand All @@ -19,6 +21,7 @@
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.event.FMLServerStartingEvent;
import cpw.mods.fml.common.event.FMLServerStoppedEvent;
import cpw.mods.fml.common.event.FMLServerStoppingEvent;
import cpw.mods.fml.common.network.NetworkRegistry;
import cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper;
import cpw.mods.fml.common.registry.GameRegistry;
Expand Down Expand Up @@ -62,13 +65,13 @@ public void preInit(FMLPreInitializationEvent event) {
proxy.registerHandlers();
PacketTypeRegistry.INSTANCE.init();

// MUI2
WidgetThemes.init();

// Register network handlers
network.registerMessage(SerializedPacket.HandleClient.class, SerializedPacket.class, 0, Side.CLIENT);
network.registerMessage(SerializedPacket.HandleServer.class, SerializedPacket.class, 0, Side.SERVER);

// ModularUI
WidgetThemes.register();

}

@Mod.EventHandler
Expand Down Expand Up @@ -105,6 +108,11 @@ public void serverStarting(FMLServerStartingEvent event) {
proxy.serverStarting(event);
}

@Mod.EventHandler
public void serverStopping(FMLServerStoppingEvent event) {
SaveLoadHandler.INSTANCE.writeTradeState(NameCache.INSTANCE.getAllUUIDS());
}

@Mod.EventHandler
public void serverStop(FMLServerStoppedEvent event) {}

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_INACTIVE = new CustomIcon("vendingmachine:vending_uplink_machine_overlay_inactive"),
VUPLINK_OVERLAY_ACTIVE = 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 @@ -20,6 +20,8 @@ public interface INameCache {

List<String> getAllNames();

List<UUID> getAllUUIDS();

/**
* Used primarily to know if a user is an OP client side<br>
*/
Expand Down
Loading