Skip to content

Commit

Permalink
Fix reference to removed member & cleanup (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
miozune authored Aug 22, 2024
1 parent f7f25c4 commit 439007d
Show file tree
Hide file tree
Showing 16 changed files with 62 additions and 56 deletions.
11 changes: 10 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.gradle
.settings
/.idea/
/.vscode/
/run/
/build/
/eclipse/
Expand All @@ -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
4 changes: 2 additions & 2 deletions dependencies.gradle
Original file line number Diff line number Diff line change
@@ -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')
}
30 changes: 16 additions & 14 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -50,27 +50,18 @@ 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
# 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 = 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.
Expand All @@ -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

Expand Down Expand Up @@ -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.
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -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
Expand Down
7 changes: 5 additions & 2 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#

##############################################################################
#
Expand Down Expand Up @@ -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/.
Expand Down Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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 ##########################################################################
Expand Down
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pluginManagement {
}

plugins {
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.17'
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.26'
}


6 changes: 4 additions & 2 deletions src/main/java/com/encraft/dz/DayNMod.java
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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));

Expand Down
6 changes: 3 additions & 3 deletions src/main/java/com/encraft/dz/handlers/ConfigHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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();
}
Expand Down Expand Up @@ -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();
}
}
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/com/encraft/dz/items/DayNModItems.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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));

}
Expand Down
20 changes: 9 additions & 11 deletions src/main/java/com/encraft/dz/items/ItemOreFinderTool.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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);
}

Expand All @@ -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);
}
}

Expand Down Expand Up @@ -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)) {
Expand Down
9 changes: 0 additions & 9 deletions src/main/java/com/encraft/dz/lib/Tags.java

This file was deleted.

4 changes: 2 additions & 2 deletions src/main/java/com/encraft/dz/proxy/CommonProxy.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/encraft/network/PacketDispatcher.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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
Expand Down

0 comments on commit 439007d

Please sign in to comment.