aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/core/block
diff options
context:
space:
mode:
authorAlkalus <3060479+draknyte1@users.noreply.github.com>2019-02-28 20:06:01 +0000
committerAlkalus <3060479+draknyte1@users.noreply.github.com>2019-02-28 20:06:01 +0000
commit4f435ae75b176a9d90c7afa6b1ff40e9ba9c286a (patch)
treef9707c4551b6134030374580cacfd1aec4b0c9d7 /src/Java/gtPlusPlus/core/block
parent1c20e21e7678f9a546fff9bf873c80c35a841cf8 (diff)
downloadGT5-Unofficial-4f435ae75b176a9d90c7afa6b1ff40e9ba9c286a.tar.gz
GT5-Unofficial-4f435ae75b176a9d90c7afa6b1ff40e9ba9c286a.tar.bz2
GT5-Unofficial-4f435ae75b176a9d90c7afa6b1ff40e9ba9c286a.zip
+ Added a new debug tool.
+ Added support for Crops++. + Added Custom Crops & framework to support more in future. + Added basic support for all GT++ Materials within Tinkers Construct. [WIP] + Moderately bad attempt at generating custom Plasma Cooling recipes in the Adv. Vacuum Freezer. [WIP #424] % Reworked logic for Material.java handling Durability, Tool Quality & Harvest Level. % Adjusted frequency of structural checks on the Cyclotron, Now 100x less frequent. % Cleaned up ReflectionUtils.java and made all getters cache their results, for much faster access. % Attempted to adjust logic of FFPP, but I probably broke it. [WIP] % Moved static array of Element Names from IonParticles.java -> ELEMENT.java. $ Greatly improved reflective performance across the mod.
Diffstat (limited to 'src/Java/gtPlusPlus/core/block')
-rw-r--r--src/Java/gtPlusPlus/core/block/base/BlockBaseOre.java4
-rw-r--r--src/Java/gtPlusPlus/core/block/machine/Machine_ProjectTable.java30
-rw-r--r--src/Java/gtPlusPlus/core/block/machine/Machine_Workbench.java30
3 files changed, 22 insertions, 42 deletions
diff --git a/src/Java/gtPlusPlus/core/block/base/BlockBaseOre.java b/src/Java/gtPlusPlus/core/block/base/BlockBaseOre.java
index 4d7478dbdd..e1bc3462be 100644
--- a/src/Java/gtPlusPlus/core/block/base/BlockBaseOre.java
+++ b/src/Java/gtPlusPlus/core/block/base/BlockBaseOre.java
@@ -113,7 +113,7 @@ public class BlockBaseOre extends BasicBlock implements ITexturedBlock {
hiddenTextureArray = new IIconContainer[6];
}
}
- catch (NoSuchFieldException | IllegalArgumentException | IllegalAccessException e) {
+ catch (IllegalArgumentException | IllegalAccessException e) {
hiddenTextureArray = new IIconContainer[6];
}
}
@@ -216,7 +216,7 @@ public class BlockBaseOre extends BasicBlock implements ITexturedBlock {
hiddenTextureArray = new IIconContainer[6];
}
}
- catch (NoSuchFieldException | IllegalArgumentException | IllegalAccessException e) {
+ catch (IllegalArgumentException | IllegalAccessException e) {
hiddenTextureArray = new IIconContainer[6];
}
}
diff --git a/src/Java/gtPlusPlus/core/block/machine/Machine_ProjectTable.java b/src/Java/gtPlusPlus/core/block/machine/Machine_ProjectTable.java
index eecc379290..fdb6b1a0a8 100644
--- a/src/Java/gtPlusPlus/core/block/machine/Machine_ProjectTable.java
+++ b/src/Java/gtPlusPlus/core/block/machine/Machine_ProjectTable.java
@@ -133,34 +133,24 @@ public class Machine_ProjectTable extends BlockContainer implements ITileTooltip
}
@Optional.Method(modid = "EnderIO")
- private static boolean checkEnderIOWrench(final ItemStack item){
- if (ReflectionUtils.doesClassExist("crazypants.enderio.api.tool.ITool")){
+ private static boolean checkEnderIOWrench(final ItemStack item) {
+ if (ReflectionUtils.doesClassExist("crazypants.enderio.api.tool.ITool")) {
Class<?> wrenchClass;
- try {
- wrenchClass = Class.forName("crazypants.enderio.api.tool.ITool");
- if (wrenchClass.isInstance(item.getItem())){
- return true;
- }
- }
- catch (final ClassNotFoundException e1) {
- return false;
+ wrenchClass = ReflectionUtils.getClass("crazypants.enderio.api.tool.ITool");
+ if (wrenchClass.isInstance(item.getItem())) {
+ return true;
}
}
return false;
}
@Optional.Method(modid = "Buildcraft")
- private static boolean checkBuildcraftWrench(final ItemStack item){
- if (ReflectionUtils.doesClassExist("buildcraft.api.tools.IToolWrench")){
+ private static boolean checkBuildcraftWrench(final ItemStack item) {
+ if (ReflectionUtils.doesClassExist("buildcraft.api.tools.IToolWrench")) {
Class<?> wrenchClass;
- try {
- wrenchClass = Class.forName("buildcraft.api.tools.IToolWrench");
- if (wrenchClass.isInstance(item.getItem())){
- return true;
- }
- }
- catch (final ClassNotFoundException e1) {
- return false;
+ wrenchClass = ReflectionUtils.getClass("buildcraft.api.tools.IToolWrench");
+ if (wrenchClass.isInstance(item.getItem())) {
+ return true;
}
}
return false;
diff --git a/src/Java/gtPlusPlus/core/block/machine/Machine_Workbench.java b/src/Java/gtPlusPlus/core/block/machine/Machine_Workbench.java
index 675aeaaf2b..5c08612042 100644
--- a/src/Java/gtPlusPlus/core/block/machine/Machine_Workbench.java
+++ b/src/Java/gtPlusPlus/core/block/machine/Machine_Workbench.java
@@ -121,34 +121,24 @@ public class Machine_Workbench extends BlockContainer
}
@Optional.Method(modid = "EnderIO")
- private static boolean checkEnderIOWrench(final ItemStack item){
- if (ReflectionUtils.doesClassExist("crazypants.enderio.api.tool.ITool")){
+ private static boolean checkEnderIOWrench(final ItemStack item) {
+ if (ReflectionUtils.doesClassExist("crazypants.enderio.api.tool.ITool")) {
Class<?> wrenchClass;
- try {
- wrenchClass = Class.forName("crazypants.enderio.api.tool.ITool");
- if (wrenchClass.isInstance(item.getItem())){
- return true;
- }
- }
- catch (final ClassNotFoundException e1) {
- return false;
+ wrenchClass = ReflectionUtils.getClass("crazypants.enderio.api.tool.ITool");
+ if (wrenchClass.isInstance(item.getItem())) {
+ return true;
}
}
return false;
}
@Optional.Method(modid = "Buildcraft")
- private static boolean checkBuildcraftWrench(final ItemStack item){
- if (ReflectionUtils.doesClassExist("buildcraft.api.tools.IToolWrench")){
+ private static boolean checkBuildcraftWrench(final ItemStack item) {
+ if (ReflectionUtils.doesClassExist("buildcraft.api.tools.IToolWrench")) {
Class<?> wrenchClass;
- try {
- wrenchClass = Class.forName("buildcraft.api.tools.IToolWrench");
- if (wrenchClass.isInstance(item.getItem())){
- return true;
- }
- }
- catch (final ClassNotFoundException e1) {
- return false;
+ wrenchClass = ReflectionUtils.getClass("buildcraft.api.tools.IToolWrench");
+ if (wrenchClass.isInstance(item.getItem())) {
+ return true;
}
}
return false;