aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gtPlusPlus/core/util
diff options
context:
space:
mode:
authormiozune <miozune@gmail.com>2023-10-17 13:37:11 +0900
committermiozune <miozune@gmail.com>2023-10-17 17:39:55 +0900
commit325a5f154e8d8d7dac6c03deb632a0041b3d69ca (patch)
tree323c840a7478f6550ce6fac4606589a24f440f89 /src/main/java/gtPlusPlus/core/util
parent6f27cb977e0ff601a540e9dbfd3d7565d0b05273 (diff)
downloadGT5-Unofficial-325a5f154e8d8d7dac6c03deb632a0041b3d69ca.tar.gz
GT5-Unofficial-325a5f154e8d8d7dac6c03deb632a0041b3d69ca.tar.bz2
GT5-Unofficial-325a5f154e8d8d7dac6c03deb632a0041b3d69ca.zip
Remove unused classes
Diffstat (limited to 'src/main/java/gtPlusPlus/core/util')
-rw-r--r--src/main/java/gtPlusPlus/core/util/minecraft/FoodUtils.java61
-rw-r--r--src/main/java/gtPlusPlus/core/util/minecraft/particles/BlockBreakParticles.java17
-rw-r--r--src/main/java/gtPlusPlus/core/util/sys/SystemUtils.java85
3 files changed, 0 insertions, 163 deletions
diff --git a/src/main/java/gtPlusPlus/core/util/minecraft/FoodUtils.java b/src/main/java/gtPlusPlus/core/util/minecraft/FoodUtils.java
deleted file mode 100644
index 2825ac80fd..0000000000
--- a/src/main/java/gtPlusPlus/core/util/minecraft/FoodUtils.java
+++ /dev/null
@@ -1,61 +0,0 @@
-package gtPlusPlus.core.util.minecraft;
-
-import net.minecraft.init.Items;
-import net.minecraft.item.EnumAction;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemBlock;
-import net.minecraft.item.ItemFood;
-import net.minecraft.item.ItemStack;
-
-import gtPlusPlus.core.util.reflect.ReflectionUtils;
-
-public class FoodUtils {
-
- public static final Class IEdibleClass;
-
- static {
- IEdibleClass = ReflectionUtils.getClass("squeek.applecore.api.food.IEdible");
- }
-
- public static boolean isFood(ItemStack food) {
-
- if (food == null) {
- return false;
- }
-
- Item item = food.getItem();
-
- if (item == null) {
- return false;
- }
-
- EnumAction action = item.getItemUseAction(food);
-
- if (item instanceof ItemBlock || action == EnumAction.eat || action == EnumAction.drink) {
- if (getUnmodifiedFoodValues(food) > 0) {
- return true;
- }
- }
-
- return false;
- }
-
- private static int getUnmodifiedFoodValues(ItemStack stack) {
-
- if (stack == null) {
- return 0;
- }
-
- Item item = stack.getItem();
-
- if (item == null) {
- return 0;
- }
-
- if (IEdibleClass.isInstance(item) || item instanceof ItemFood || item == Items.cake) {
- return 1;
- }
-
- return 0;
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/util/minecraft/particles/BlockBreakParticles.java b/src/main/java/gtPlusPlus/core/util/minecraft/particles/BlockBreakParticles.java
deleted file mode 100644
index ff28f59eb2..0000000000
--- a/src/main/java/gtPlusPlus/core/util/minecraft/particles/BlockBreakParticles.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package gtPlusPlus.core.util.minecraft.particles;
-
-import net.minecraft.block.Block;
-import net.minecraft.world.World;
-
-import gtPlusPlus.xmod.forestry.HANDLER_FR;
-
-public class BlockBreakParticles {
-
- public BlockBreakParticles(final World world, final int x, final int y, final int z, final Block block) {
- try {
- HANDLER_FR.createBlockBreakParticles(world, x, y, z, block);
- } catch (final Throwable T) {
-
- }
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/util/sys/SystemUtils.java b/src/main/java/gtPlusPlus/core/util/sys/SystemUtils.java
deleted file mode 100644
index 71ed513618..0000000000
--- a/src/main/java/gtPlusPlus/core/util/sys/SystemUtils.java
+++ /dev/null
@@ -1,85 +0,0 @@
-package gtPlusPlus.core.util.sys;
-
-public class SystemUtils {
-
- private static OS SystemType;
-
- public static OS getOS() {
- if (SystemType != null) {
- return SystemType;
- } else {
- SystemType = getOperatingSystem();
- return SystemType;
- }
- }
-
- /**
- * Try invoke the runtime's Garbage Collector.
- */
- public static void invokeGC() {
- try {
- Runtime r = Runtime.getRuntime();
- r.gc();
- } catch (Throwable t) {
- // Do nothing.
- }
- }
-
- public static boolean isWindows() {
- return (getOSString().indexOf("win") >= 0);
- }
-
- public static boolean isMac() {
- return (getOSString().indexOf("mac") >= 0);
- }
-
- public static boolean isUnix() {
- return (getOSString().indexOf("nix") >= 0 || getOSString().indexOf("nux") >= 0
- || getOSString().indexOf("aix") > 0);
- }
-
- public static boolean isSolaris() {
- return (getOSString().indexOf("sunos") >= 0);
- }
-
- public static String getOSString() {
- try {
- return System.getProperty("os.name").toLowerCase();
- } catch (Throwable t) {
- return "other";
- }
- }
-
- public static OS getOperatingSystem() {
- if (isMac()) {
- return OS.MAC;
- } else if (isWindows()) {
- return OS.WINDOWS;
- } else if (isUnix()) {
- return OS.UNIX;
- } else if (isSolaris()) {
- return OS.SOLARIS;
- } else {
- return OS.OTHER;
- }
- }
-
- public static enum OS {
-
- MAC(1),
- WINDOWS(2),
- UNIX(3),
- SOLARIS(4),
- OTHER(0);
-
- private int mID;
-
- private OS(final int ID) {
- this.mID = ID;
- }
-
- public int getID() {
- return this.mID;
- }
- }
-}