diff --git a/build.gradle b/build.gradle index 8700e2c..97ee024 100644 --- a/build.gradle +++ b/build.gradle @@ -101,46 +101,3 @@ publishing { } } -unifiedPublishing { - project { - changelog = "Added Config! \nTesting, this file was uploaded automatically by the unifiedPublishing plugin." - releaseType = "release" - gameVersions = ["1.18.2"] - gameLoaders = ["fabric"] - - mainPublication tasks.remapJar // Declares the publicated jar - - relations { - depends { // Mark as a required dependency - curseforge = "fabric-api" // Optional, project slug - modrinth = "fabric-api" // Optional, project slug or id - curseforge = "cloth-config" - modrinth = "cloth-config" - } - includes { // Mark as an included dependency - curseforge = "stacc" - // Stacc API isn't on Modrinth - } - optional { // Mark as an optional dependency - curseforge = "modmenu" - modrinth = "modmenu" - } - } - - var cfToken = System.getenv("CF_TOKEN") - if (cfToken != null) { - curseforge { - token = cfToken - id = "515415" // Required, must be a string, ID of CurseForge project - } - } - - var mrToken = System.getenv("MODRINTH_TOKEN") - if (mrToken != null) { - modrinth { - token = mrToken - id = "7pbXPVrB" // Required, must be a string, ID of Modrinth project - } - } - } -} \ No newline at end of file diff --git a/src/main/java/io/github/Andrew6rant/stacker/Stacker.java b/src/main/java/io/github/Andrew6rant/stacker/Stacker.java index 8a4d517..e9da716 100644 --- a/src/main/java/io/github/Andrew6rant/stacker/Stacker.java +++ b/src/main/java/io/github/Andrew6rant/stacker/Stacker.java @@ -11,6 +11,8 @@ import net.minecraft.util.ActionResult; import net.minecraft.util.Identifier; import net.minecraft.util.registry.Registry; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.HashSet; import java.util.List; @@ -20,6 +22,7 @@ import static net.minecraft.util.registry.Registry.ITEM_KEY; public class Stacker implements ModInitializer { + private static final Logger LOGGER = LogManager.getLogger("Stacker"); private static Stacker stacker; static ConfigHolder stackerConfig; @@ -31,15 +34,11 @@ public void onInitialize() { loadStacker("save"); return ActionResult.success(true); }); - ServerLifecycleEvents.SERVER_STARTED.register(server -> { - loadStacker("load"); - }); - ServerLifecycleEvents.END_DATA_PACK_RELOAD.register((server, resourceManager, success) -> { - loadStacker("reload"); - }); + ServerLifecycleEvents.SERVER_STARTED.register(server -> loadStacker("load")); + ServerLifecycleEvents.END_DATA_PACK_RELOAD.register((server, resourceManager, success) -> loadStacker("reload")); } public static void loadStacker(String configMsg) { - System.out.println("Stacker: Attempting to "+configMsg+" config..."); + LOGGER.info("Stacker: Attempting to "+configMsg+" config..."); Set invalidSet = new HashSet<>(); for (Item item : Registry.ITEM) { if (!item.isDamageable()) { @@ -48,14 +47,15 @@ public static void loadStacker(String configMsg) { Stacker.setMax(item, Stacker.overrideItem(item, stackerConfig.getConfig().itemOverride, invalidSet)); } if (invalidSet.size() > 0) { - System.err.println("Stacker: Invalid override entries!"); - System.err.println("Stacker: The following entries were invalid:"); + LOGGER.error("Stacker: Invalid override entries!"); + LOGGER.warn("Stacker: The following entries were invalid:"); for (String invalid : invalidSet) { - System.err.println("Stacker: \""+invalid+"\""); + LOGGER.warn("Stacker: \""+invalid+"\""); } - System.err.println("Stacker: Make sure to use the format, \"mod:item:max_stack\", or \"#tag:item:max_stack\"."); + LOGGER.warn("Stacker: Make sure to use the format, \"mod:item:max_stack\", or \"#tag:item:max_stack\"."); } - System.out.println(configMsg.equals("save") ? "Stacker: Config saved!": "Stacker: Config "+configMsg+"ed!"); + + LOGGER.info(configMsg.equals("save") ? "Stacker: Config saved!": "Stacker: Config "+configMsg+"ed!"); } public static void setMax(Item item, int max) { if (max >0) { diff --git a/src/main/resources/data/inmis/tags/items/backpacks.json b/src/main/resources/data/inmis/tags/items/backpacks.json index 32737a8..3f8dc80 100644 --- a/src/main/resources/data/inmis/tags/items/backpacks.json +++ b/src/main/resources/data/inmis/tags/items/backpacks.json @@ -1,14 +1,14 @@ { "replace": false, "values": [ - "inmis:ender_pouch", - "inmis:baby_backpack", - "inmis:frayed_backpack", - "inmis:plated_backpack", - "inmis:gilded_backpack", - "inmis:bejeweled_backpack", - "inmis:blazing_backpack", - "inmis:withered_backpack", - "inmis:endless_backpack" + {"id": "inmis:ender_pouch", "required": false}, + {"id": "inmis:baby_backpack", "required": false}, + {"id": "inmis:frayed_backpack", "required": false}, + {"id": "inmis:plated_backpack", "required": false}, + {"id": "inmis:gilded_backpack", "required": false}, + {"id": "inmis:bejeweled_backpack", "required": false}, + {"id": "inmis:blazing_backpack", "required": false}, + {"id": "inmis:withered_backpack", "required": false}, + {"id": "inmis:endless_backpack", "required": false} ] } \ No newline at end of file diff --git a/src/main/resources/data/techreborn/tags/items/not_stackable.json b/src/main/resources/data/techreborn/tags/items/not_stackable.json index 7b27e10..d5f83a3 100644 --- a/src/main/resources/data/techreborn/tags/items/not_stackable.json +++ b/src/main/resources/data/techreborn/tags/items/not_stackable.json @@ -1,30 +1,30 @@ { "replace": false, "values": [ - "techreborn:quantum_helmet", - "techreborn:quantum_chestplate", - "techreborn:quantum_leggings", - "techreborn:quantum_boots", - "techreborn:red_cell_battery", - "techreborn:lithium_ion_battery", - "techreborn:lithium_ion_batpack", - "techreborn:energy_crystal", - "techreborn:lapotron_crystal", - "techreborn:lapotronic_orb", - "techreborn:lapotronic_orbpack", - "techreborn:basic_drill", - "techreborn:basic_chainsaw", - "techreborn:basic_jackhammer", - "techreborn:electric_treetap", - "techreborn:advanced_drill", - "techreborn:advanced_chainsaw", - "techreborn:advanced_jackhammer", - "techreborn:rock_cutter", - "techreborn:industrial_drill", - "techreborn:industrial_chainsaw", - "techreborn:industrial_jackhammer", - "techreborn:nanosaber", - "techreborn:omni_tool", - "techreborn:cloaking_device" + {"id": "techreborn:quantum_helmet", "required": false}, + {"id": "techreborn:quantum_chestplate", "required": false}, + {"id": "techreborn:quantum_leggings", "required": false}, + {"id": "techreborn:quantum_boots", "required": false}, + {"id": "techreborn:red_cell_battery", "required": false}, + {"id": "techreborn:lithium_ion_battery", "required": false}, + {"id": "techreborn:lithium_ion_batpack", "required": false}, + {"id": "techreborn:energy_crystal", "required": false}, + {"id": "techreborn:lapotron_crystal", "required": false}, + {"id": "techreborn:lapotronic_orb", "required": false}, + {"id": "techreborn:lapotronic_orbpack", "required": false}, + {"id": "techreborn:basic_drill", "required": false}, + {"id": "techreborn:basic_chainsaw", "required": false}, + {"id": "techreborn:basic_jackhammer", "required": false}, + {"id": "techreborn:electric_treetap", "required": false}, + {"id": "techreborn:advanced_drill", "required": false}, + {"id": "techreborn:advanced_chainsaw", "required": false}, + {"id": "techreborn:advanced_jackhammer", "required": false}, + {"id": "techreborn:rock_cutter", "required": false}, + {"id": "techreborn:industrial_drill", "required": false}, + {"id": "techreborn:industrial_chainsaw", "required": false}, + {"id": "techreborn:industrial_jackhammer", "required": false}, + {"id": "techreborn:nanosaber", "required": false}, + {"id": "techreborn:omni_tool", "required": false}, + {"id": "techreborn:cloaking_device", "required": false} ] } \ No newline at end of file