aboutsummaryrefslogtreecommitdiff
path: root/src/Java/miscutil/core/handler
diff options
context:
space:
mode:
Diffstat (limited to 'src/Java/miscutil/core/handler')
-rw-r--r--src/Java/miscutil/core/handler/CraftingManager.java6
-rw-r--r--src/Java/miscutil/core/handler/DebugRenderManager.java46
-rw-r--r--src/Java/miscutil/core/handler/GuiHandler.java10
-rw-r--r--src/Java/miscutil/core/handler/ResourceHandler.java83
-rw-r--r--src/Java/miscutil/core/handler/events/PickaxeBlockBreakEventHandler.java (renamed from src/Java/miscutil/core/handler/XEventHandler.java)4
-rw-r--r--src/Java/miscutil/core/handler/events/UnbreakableBlockManager.java (renamed from src/Java/miscutil/core/handler/UnbreakableBlockManager.java)2
6 files changed, 8 insertions, 143 deletions
diff --git a/src/Java/miscutil/core/handler/CraftingManager.java b/src/Java/miscutil/core/handler/CraftingManager.java
index 42b602440d..144b5a0726 100644
--- a/src/Java/miscutil/core/handler/CraftingManager.java
+++ b/src/Java/miscutil/core/handler/CraftingManager.java
@@ -8,14 +8,10 @@ public class CraftingManager {
}
public static void addCraftingRecipies() {
- // Shaped Recipie
- //GameRegistry.addRecipe(new ItemStack(ModItems.tutPickaxe, 1), new Object[] { "###", " S ", " S ", '#', ModItems.tutItem, 'S', Items.stick });
- //Shapeless Recipie
- //GameRegistry.addShapelessRecipe(new ItemStack(ModItems.tutItem, 10), new Object[]{Blocks.dirt , Blocks.cobblestone});
}
public static void addSmeltingRecipies() {
- //GameRegistry.addSmelting(ModItems.tutItem, new ItemStack(Blocks.diamond_block, 5), 20.0F);
+
}
}
diff --git a/src/Java/miscutil/core/handler/DebugRenderManager.java b/src/Java/miscutil/core/handler/DebugRenderManager.java
deleted file mode 100644
index 451d465e5e..0000000000
--- a/src/Java/miscutil/core/handler/DebugRenderManager.java
+++ /dev/null
@@ -1,46 +0,0 @@
-package miscutil.core.handler;
-
-import miscutil.core.item.tool.staballoy.StaballoyPickaxe;
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.gui.FontRenderer;
-import net.minecraft.client.gui.Gui;
-import net.minecraft.client.gui.ScaledResolution;
-import net.minecraft.item.Item;
-import net.minecraftforge.client.event.RenderGameOverlayEvent;
-import cpw.mods.fml.common.eventhandler.SubscribeEvent;
-
-public class DebugRenderManager extends Gui {
-
- int width, height;
- Minecraft mc = Minecraft.getMinecraft();
-
- @SubscribeEvent
- public void eventHandler(RenderGameOverlayEvent.Text event)
- {
-
- //if (mc.thePlayer.getHeldItem().equals(ModItems.itemStaballoyPickaxe)){
- ScaledResolution res = new ScaledResolution(this.mc, this.mc.displayWidth, this.mc.displayHeight);
- FontRenderer fontRender = mc.fontRenderer;
- this.width = res.getScaledWidth();
- this.height = res.getScaledHeight();
- Minecraft.getMinecraft().entityRenderer.setupOverlayRendering();
- String str = "Words";
- Item heldItem = null;
-
- try{heldItem = mc.thePlayer.getHeldItem().getItem();
-
- if (heldItem != null){
- if (heldItem instanceof StaballoyPickaxe){
-
- int dmg =((StaballoyPickaxe) heldItem).getDamage(((StaballoyPickaxe) heldItem).thisPickaxe);
-
- ((StaballoyPickaxe) heldItem).checkFacing(((StaballoyPickaxe) heldItem).localWorld);
- str = "DAMAGE: "+ dmg +" | FACING: "+((StaballoyPickaxe) heldItem).FACING+" | FACING_HORIZONTAL: "+((StaballoyPickaxe) heldItem).FACING_HORIZONTAL+" | LOOKING DIRECTION: "+((StaballoyPickaxe) heldItem).lookingDirection;
-
- drawString(fontRender, str, (this.width - fontRender.getStringWidth(str)) / 2, this.height / 10, 0xFFAA00);
- }
- }
- }catch(NullPointerException e){}
-
- }
-} \ No newline at end of file
diff --git a/src/Java/miscutil/core/handler/GuiHandler.java b/src/Java/miscutil/core/handler/GuiHandler.java
index 9412ed8983..951b697aab 100644
--- a/src/Java/miscutil/core/handler/GuiHandler.java
+++ b/src/Java/miscutil/core/handler/GuiHandler.java
@@ -1,7 +1,5 @@
package miscutil.core.handler;
-import miscutil.core.gui.GUI_Bat_Buf;
-import miscutil.core.gui.GUI_Battery_Buffer;
import miscutil.core.util.Utils;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;
@@ -16,8 +14,8 @@ public class GuiHandler implements IGuiHandler {
@Override //ContainerModTileEntity
public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
- if (ID == GUI1)
- return new GUI_Battery_Buffer();
+ if (ID == GUI1){}
+ //return new GUI_Battery_Buffer();
return null;
}
@@ -27,11 +25,11 @@ public class GuiHandler implements IGuiHandler {
Utils.LOG_WARNING("getClientGuiElement Called by: "+player+", in world: "+player.dimension+" at x:"+x+", y:"+y+", z:"+z+".");
if (ID == GUI1){
Utils.LOG_WARNING("Opening Gui with Id: "+ID);
- return new GUI_Battery_Buffer();
+ //return new GUI_Battery_Buffer();
}
else if (ID == GUI2){
Utils.LOG_WARNING("Opening Gui with Id: "+ID+" Energy Buffer");
- return new GUI_Bat_Buf();
+ //return new GUI_Bat_Buf();
}
return null;
}
diff --git a/src/Java/miscutil/core/handler/ResourceHandler.java b/src/Java/miscutil/core/handler/ResourceHandler.java
deleted file mode 100644
index e8f81f4d02..0000000000
--- a/src/Java/miscutil/core/handler/ResourceHandler.java
+++ /dev/null
@@ -1,83 +0,0 @@
-package miscutil.core.handler;
-
-import org.apache.commons.lang3.Validate;
-
-public class ResourceHandler
-{
- private final String resourceDomain;
- private final String resourcePath;
- private static final String __OBFID = "CL_00001082";
-
- public ResourceHandler(String p_i1292_1_, String p_i1292_2_)
- {
- Validate.notNull(p_i1292_2_);
-
- if (p_i1292_1_ != null && p_i1292_1_.length() != 0)
- {
- this.resourceDomain = p_i1292_1_;
- }
- else
- {
- this.resourceDomain = "minecraft";
- }
-
- this.resourcePath = p_i1292_2_;
- }
-
- public ResourceHandler(String p_i1293_1_)
- {
- String s1 = "miscUtils";
- String s2 = p_i1293_1_;
- int i = p_i1293_1_.indexOf(58);
-
- if (i >= 0)
- {
- s2 = p_i1293_1_.substring(i + 1, p_i1293_1_.length());
-
- if (i > 1)
- {
- s1 = p_i1293_1_.substring(0, i);
- }
- }
-
- this.resourceDomain = s1.toLowerCase();
- this.resourcePath = s2;
- }
-
- public String getResourcePath()
- {
- return this.resourcePath;
- }
-
- public String getResourceDomain()
- {
- return this.resourceDomain;
- }
-
- public String toString()
- {
- return this.resourceDomain + ":" + this.resourcePath;
- }
-
- public boolean equals(Object p_equals_1_)
- {
- if (this == p_equals_1_)
- {
- return true;
- }
- else if (!(p_equals_1_ instanceof ResourceHandler))
- {
- return false;
- }
- else
- {
- ResourceHandler resourcelocation = (ResourceHandler)p_equals_1_;
- return this.resourceDomain.equals(resourcelocation.resourceDomain) && this.resourcePath.equals(resourcelocation.resourcePath);
- }
- }
-
- public int hashCode()
- {
- return 31 * this.resourceDomain.hashCode() + this.resourcePath.hashCode();
- }
-} \ No newline at end of file
diff --git a/src/Java/miscutil/core/handler/XEventHandler.java b/src/Java/miscutil/core/handler/events/PickaxeBlockBreakEventHandler.java
index 4aa3154cee..9169249136 100644
--- a/src/Java/miscutil/core/handler/XEventHandler.java
+++ b/src/Java/miscutil/core/handler/events/PickaxeBlockBreakEventHandler.java
@@ -1,4 +1,4 @@
-package miscutil.core.handler;
+package miscutil.core.handler.events;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.metatileentity.BaseMetaPipeEntity;
@@ -13,7 +13,7 @@ import net.minecraftforge.event.entity.player.PlayerInteractEvent;
import net.minecraftforge.event.world.BlockEvent.BreakEvent;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
-public class XEventHandler {
+public class PickaxeBlockBreakEventHandler {
@SubscribeEvent
public void onBreakBlock(BreakEvent event) {
try{
diff --git a/src/Java/miscutil/core/handler/UnbreakableBlockManager.java b/src/Java/miscutil/core/handler/events/UnbreakableBlockManager.java
index b15f5bb561..9ce59cb2c2 100644
--- a/src/Java/miscutil/core/handler/UnbreakableBlockManager.java
+++ b/src/Java/miscutil/core/handler/events/UnbreakableBlockManager.java
@@ -1,4 +1,4 @@
-package miscutil.core.handler;
+package miscutil.core.handler.events;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.metatileentity.BaseMetaPipeEntity;