diff --git a/.gitignore b/.gitignore index 40fb5e4..5e80e0a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ .gradle .settings /.idea/ +/.vscode/ /run/ /build/ /eclipse/ @@ -25,5 +26,13 @@ whitelist.json *.iml *.ipr *.iws -src/main/resources/mixins.*.json +src/main/resources/mixins.*([!.]).json *.bat +*.DS_Store +!gradlew.bat +.factorypath +addon.local.gradle +addon.local.gradle.kts +addon.late.local.gradle +addon.late.local.gradle.kts +layout.json diff --git a/dependencies.gradle b/dependencies.gradle index 7cba073..cf69088 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -1,4 +1,4 @@ dependencies { - implementation('com.github.GTNewHorizons:GT5-Unofficial:5.09.45.100:dev') - implementation('com.github.GTNewHorizons:VisualProspecting:1.2.10:dev') + implementation('com.github.GTNewHorizons:GT5-Unofficial:5.09.49.22:dev') + implementation('com.github.GTNewHorizons:VisualProspecting:1.3.10:dev') } diff --git a/gradle.properties b/gradle.properties index 9626c76..5eeb635 100644 --- a/gradle.properties +++ b/gradle.properties @@ -37,7 +37,7 @@ remoteMappings = https\://raw.githubusercontent.com/MinecraftForge/FML/1.7.10/co # Select a default username for testing your mod. You can always override this per-run by running # `./gradlew runClient --username=AnotherPlayer`, or configuring this command in your IDE. -developmentEnvironmentUserName = "Developer" +developmentEnvironmentUserName = Developer # Enables using modern Java syntax (up to version 17) via Jabel, while still targeting JVM 8. # See https://github.com/bsideup/jabel for details on how this works. @@ -50,19 +50,10 @@ enableGenericInjection = false # 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.encraft.dz.lib.Tags # Name of the token containing the project's current version to generate/replace. -gradleTokenVersion = GRADLETOKEN_VERSION - -# [DEPRECATED] Mod ID replacement token. -gradleTokenModId = GRADLETOKEN_MODID - -# [DEPRECATED] Mod name replacement token. -gradleTokenModName = GRADLETOKEN_MODNAME - -# [DEPRECATED] Mod Group replacement token. -gradleTokenGroupName = GRADLETOKEN_GROUPNAME +gradleTokenVersion = MOD_VER # [DEPRECATED] # Multiple source files can be defined here by providing a comma-separated list: Class1.java,Class2.java,Class3.java @@ -70,7 +61,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 = Tags.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. @@ -85,6 +76,11 @@ accessTransformersFile = # Provides setup for Mixins if enabled. If you don't know what mixins are: Keep it disabled! usesMixins = false +# Set to a non-empty string to configure mixins in a separate source set under src/VALUE, instead of src/main. +# This can speed up compile times thanks to not running the mixin annotation processor on all input sources. +# Mixin classes will have access to "main" classes, but not the other way around. +separateMixinSourceSet = + # Adds some debug arguments like verbose output and class export. usesMixinDebug = false @@ -117,9 +113,15 @@ minimizeShadowedDependencies = true # If disabled, won't rename the shadowed classes. relocateShadowedDependencies = true -# Adds the GTNH maven, CurseMaven, IC2/Player maven, and some more well-known 1.7.10 repositories. +# Adds CurseMaven, Modrinth, and some more well-known 1.7.10 repositories. includeWellKnownRepositories = true +# A list of repositories to exclude from the includeWellKnownRepositories setting. Should be a space separated +# list of strings, with the acceptable keys being(case does not matter): +# cursemaven +# modrinth +excludeWellKnownRepositories = + # Change these to your Maven coordinates if you want to publish to a custom Maven repository instead of the default GTNH Maven. # Authenticate with the MAVEN_USER and MAVEN_PASSWORD environment variables. # If you need a more complex setup disable maven publishing here and add a publishing repository to addon.gradle. diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index d64cd49..2c35211 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index a80b22c..09523c0 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/gradlew b/gradlew index 1aa94a4..f5feea6 100755 --- a/gradlew +++ b/gradlew @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -55,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -84,7 +86,8 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s +' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum diff --git a/gradlew.bat b/gradlew.bat index 25da30d..9d21a21 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -13,6 +13,8 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem @if "%DEBUG%"=="" @echo off @rem ########################################################################## diff --git a/settings.gradle b/settings.gradle index d2f6c29..242692e 100644 --- a/settings.gradle +++ b/settings.gradle @@ -17,7 +17,7 @@ pluginManagement { } plugins { - id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.17' + id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.26' } diff --git a/src/main/java/com/encraft/dz/DayNMod.java b/src/main/java/com/encraft/dz/DayNMod.java index c287d8f..e1cd296 100644 --- a/src/main/java/com/encraft/dz/DayNMod.java +++ b/src/main/java/com/encraft/dz/DayNMod.java @@ -18,10 +18,12 @@ import cpw.mods.fml.common.network.simpleimpl.*; import cpw.mods.fml.relauncher.*; -@Mod(modid = Tags.MOD_ID, name = Tags.MOD_NAME, version = Tags.MOD_VER) +@Mod(modid = DayNMod.MOD_ID, name = "I Will Find You", version = Tags.MOD_VER) public class DayNMod { - @Mod.Instance(Tags.MOD_ID) + public static final String MOD_ID = "ifu"; + + @Mod.Instance(MOD_ID) public static DayNMod instance; @SidedProxy(clientSide = "com.encraft.dz.proxy.ClientProxy", serverSide = "com.encraft.dz.proxy.CommonProxy") diff --git a/src/main/java/com/encraft/dz/gui/GiuInvBuildingKit.java b/src/main/java/com/encraft/dz/gui/GuiInvBuildingKit.java similarity index 93% rename from src/main/java/com/encraft/dz/gui/GiuInvBuildingKit.java rename to src/main/java/com/encraft/dz/gui/GuiInvBuildingKit.java index e2d3fbc..db7971c 100644 --- a/src/main/java/com/encraft/dz/gui/GiuInvBuildingKit.java +++ b/src/main/java/com/encraft/dz/gui/GuiInvBuildingKit.java @@ -9,26 +9,26 @@ import org.lwjgl.opengl.GL11; +import com.encraft.dz.DayNMod; import com.encraft.dz.container.ContainerBuildingKit; import com.encraft.dz.handlers.ConfigHandler; import com.encraft.dz.inventory.InventoryBuildingKit; -import com.encraft.dz.lib.Tags; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @SideOnly(Side.CLIENT) -public class GiuInvBuildingKit extends GuiContainer { +public class GuiInvBuildingKit extends GuiContainer { private float xSize_lo; private float ySize_lo; private static final ResourceLocation iconLocation = new ResourceLocation( - Tags.MOD_ID, + DayNMod.MOD_ID, "textures/gui/guiIngBuildingKit.png"); private final InventoryBuildingKit inventory; private ConfigHandler cfg; - public GiuInvBuildingKit(EntityPlayer player, InventoryPlayer inventoryPlayer, + public GuiInvBuildingKit(EntityPlayer player, InventoryPlayer inventoryPlayer, InventoryBuildingKit inventoryCustom) { super(new ContainerBuildingKit(player, inventoryPlayer, inventoryCustom)); diff --git a/src/main/java/com/encraft/dz/handlers/ConfigHandler.java b/src/main/java/com/encraft/dz/handlers/ConfigHandler.java index 737feb8..a2fe065 100644 --- a/src/main/java/com/encraft/dz/handlers/ConfigHandler.java +++ b/src/main/java/com/encraft/dz/handlers/ConfigHandler.java @@ -4,7 +4,7 @@ import net.minecraftforge.common.config.Configuration; -import com.encraft.dz.lib.Tags; +import com.encraft.dz.DayNMod; import cpw.mods.fml.client.event.ConfigChangedEvent; import cpw.mods.fml.common.eventhandler.SubscribeEvent; @@ -24,7 +24,7 @@ public class ConfigHandler { public static void init(String configDir) { if (cfg == null) { - File path = new File(configDir + "/" + Tags.MOD_ID + ".cfg"); + File path = new File(configDir + "/" + DayNMod.MOD_ID + ".cfg"); cfg = new Configuration(path); loadConfiguration(); } @@ -68,7 +68,7 @@ private static void loadConfiguration() { @SubscribeEvent public void onConfigChangeEvent(ConfigChangedEvent.OnConfigChangedEvent event) { - if (event.modID.equalsIgnoreCase(Tags.MOD_ID)) { + if (event.modID.equalsIgnoreCase(DayNMod.MOD_ID)) { loadConfiguration(); } } diff --git a/src/main/java/com/encraft/dz/items/DayNModItems.java b/src/main/java/com/encraft/dz/items/DayNModItems.java index 56958a1..a2f6df6 100644 --- a/src/main/java/com/encraft/dz/items/DayNModItems.java +++ b/src/main/java/com/encraft/dz/items/DayNModItems.java @@ -3,7 +3,6 @@ import net.minecraft.item.Item; import com.encraft.dz.DayNMod; -import com.encraft.dz.lib.Tags; import com.encraft.dz.proxy.CommonProxy; import cpw.mods.fml.common.registry.GameRegistry; @@ -20,7 +19,7 @@ public static void init() { public static void load() { buildingKit = new ItemOreFinderTool().setCreativeTab(DayNMod.dnCVt) - .setUnlocalizedName(Tags.MOD_ID + "_" + "buildingKit"); + .setUnlocalizedName(DayNMod.MOD_ID + "_" + "buildingKit"); GameRegistry.registerItem(buildingKit, buildingKit.getUnlocalizedName().substring(5)); } diff --git a/src/main/java/com/encraft/dz/items/ItemOreFinderTool.java b/src/main/java/com/encraft/dz/items/ItemOreFinderTool.java index f10fa9f..18c4f26 100644 --- a/src/main/java/com/encraft/dz/items/ItemOreFinderTool.java +++ b/src/main/java/com/encraft/dz/items/ItemOreFinderTool.java @@ -23,7 +23,6 @@ import com.encraft.dz.DayNMod; import com.encraft.dz.ExtendedPlayer; import com.encraft.dz.handlers.ConfigHandler; -import com.encraft.dz.lib.Tags; import com.sinthoras.visualprospecting.VisualProspecting_API; import com.sinthoras.visualprospecting.database.OreVeinPosition; @@ -42,9 +41,9 @@ public class ItemOreFinderTool extends Item { private static int found = 0; public ItemOreFinderTool() { - setUnlocalizedName(Tags.MOD_ID + "_" + "buildingKitItem"); + setUnlocalizedName(DayNMod.MOD_ID + "_" + "buildingKitItem"); setMaxStackSize(1); - setTextureName(Tags.MOD_ID + ":meter0"); + setTextureName(DayNMod.MOD_ID + ":meter0"); setHasSubtypes(true); } @@ -53,7 +52,7 @@ public void registerIcons(IIconRegister p_94581_1_) { super.registerIcons(p_94581_1_); iconIndexes = new IIcon[5]; for (int i = 0; i <= 4; i++) { - iconIndexes[i] = p_94581_1_.registerIcon(Tags.MOD_ID + ":meter" + i); + iconIndexes[i] = p_94581_1_.registerIcon(DayNMod.MOD_ID + ":meter" + i); } } @@ -195,13 +194,12 @@ public void onUpdate(ItemStack itemstack, World world, Entity entity, int par4, OrePrefixes.oreNetherrack, OrePrefixes.oreRedgranite, OrePrefixes.oreRich, - OrePrefixes.oreDense, - // uncomment this for small ores and/or blocks - // OrePrefixes.oreSmall, - // OrePrefixes.block - // OrePrefixes.block_ - OrePrefixes.oreGem, - OrePrefixes.denseore); + OrePrefixes.oreDense + // uncomment this for small ores and/or blocks + // OrePrefixes.oreSmall, + // OrePrefixes.block + // OrePrefixes.block_ + ); if (dataInWorld.mMaterial.mMaterial == data.mMaterial.mMaterial && oreTypes.contains(dataInWorld.mPrefix)) { diff --git a/src/main/java/com/encraft/dz/lib/Tags.java b/src/main/java/com/encraft/dz/lib/Tags.java deleted file mode 100644 index 0abaf92..0000000 --- a/src/main/java/com/encraft/dz/lib/Tags.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.encraft.dz.lib; - -public class Tags { - - public static final String MOD_NAME = "GRADLETOKEN_MODNAME"; - public static final String MOD_ID = "GRADLETOKEN_MODID"; - public static final String MOD_VER = "GRADLETOKEN_VERSION"; - -} diff --git a/src/main/java/com/encraft/dz/proxy/CommonProxy.java b/src/main/java/com/encraft/dz/proxy/CommonProxy.java index b19a126..ef08272 100644 --- a/src/main/java/com/encraft/dz/proxy/CommonProxy.java +++ b/src/main/java/com/encraft/dz/proxy/CommonProxy.java @@ -6,7 +6,7 @@ import com.encraft.dz.DayNMod; import com.encraft.dz.ExtendedPlayer; import com.encraft.dz.container.ContainerBuildingKit; -import com.encraft.dz.gui.GiuInvBuildingKit; +import com.encraft.dz.gui.GuiInvBuildingKit; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.network.IGuiHandler; @@ -35,7 +35,7 @@ public Object getServerGuiElement(int guiId, EntityPlayer player, World world, i public Object getClientGuiElement(int guiId, EntityPlayer player, World world, int x, int y, int z) { if (guiId == DayNMod.GUI_CUSTOM_INV1) { - return new GiuInvBuildingKit(player, player.inventory, ExtendedPlayer.get(player).inventorybk); + return new GuiInvBuildingKit(player, player.inventory, ExtendedPlayer.get(player).inventorybk); } return null; } diff --git a/src/main/java/com/encraft/network/PacketDispatcher.java b/src/main/java/com/encraft/network/PacketDispatcher.java index 2a05e3f..d112f0a 100644 --- a/src/main/java/com/encraft/network/PacketDispatcher.java +++ b/src/main/java/com/encraft/network/PacketDispatcher.java @@ -3,7 +3,7 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; -import com.encraft.dz.lib.Tags; +import com.encraft.dz.DayNMod; import com.encraft.network.client.SyncPlayerPropsMessage; import com.encraft.network.server.OpenGuiMessage; @@ -22,7 +22,7 @@ public class PacketDispatcher { * The SimpleNetworkWrapper instance is used both to register and send packets. Since I will be adding wrapper * methods, this field is private, but you should make it public if you plan on using it directly. */ - private static final SimpleNetworkWrapper dispatcher = NetworkRegistry.INSTANCE.newSimpleChannel(Tags.MOD_ID); + private static final SimpleNetworkWrapper dispatcher = NetworkRegistry.INSTANCE.newSimpleChannel(DayNMod.MOD_ID); /** * Call this during pre-init or loading and register all of your packets (messages) here