aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Java/cofh/api/energy/package-info.java6
-rw-r--r--src/Java/miscutil/MiscUtils.java31
-rw-r--r--src/Java/miscutil/core/util/debug/UtilsRendering.java41
-rw-r--r--src/Java/miscutil/core/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntityIndustrialSinter.java14
4 files changed, 70 insertions, 22 deletions
diff --git a/src/Java/cofh/api/energy/package-info.java b/src/Java/cofh/api/energy/package-info.java
deleted file mode 100644
index 90b2a99c40..0000000000
--- a/src/Java/cofh/api/energy/package-info.java
+++ /dev/null
@@ -1,6 +0,0 @@
-package cofh.api.energy;
-
-import cpw.mods.fml.common.API;
-
-@API(apiVersion="1.7.10R1.0.0", owner="CoFHAPI", provides="CoFHAPI|energy")
-abstract interface package-info {}
diff --git a/src/Java/miscutil/MiscUtils.java b/src/Java/miscutil/MiscUtils.java
index 7fc555399c..f553905a9b 100644
--- a/src/Java/miscutil/MiscUtils.java
+++ b/src/Java/miscutil/MiscUtils.java
@@ -21,8 +21,13 @@ import miscutil.core.item.general.RF2EU_Battery;
import miscutil.core.lib.CORE;
import miscutil.core.util.Utils;
import miscutil.core.xmod.gregtech.HANDLER_GT;
+import net.minecraft.client.Minecraft;
+import net.minecraftforge.client.event.RenderWorldLastEvent;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.common.config.Configuration;
+
+import org.lwjgl.opengl.GL11;
+
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
@@ -32,6 +37,7 @@ import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.event.FMLServerStartingEvent;
import cpw.mods.fml.common.event.FMLServerStoppingEvent;
+import cpw.mods.fml.common.eventhandler.SubscribeEvent;
@Mod(modid=CORE.MODID, name=CORE.name, version=CORE.VERSION, dependencies="required-after:Forge; after:IC2; after:psychedelicraft; after:gregtech; after:Forestry; after:MagicBees; after:CoFHCore; after:Growthcraft; after:Railcraft; after:CompactWindmills; after:ForbiddenMagic; after:MorePlanet; after:PneumaticCraft; after:ExtraUtilities; after:Thaumcraft; after:rftools; after:simplyjetpacks; after:BigReactors; after:EnderIO;")
public class MiscUtils
@@ -46,7 +52,7 @@ implements ActionListener
- public void handleConfigFile(FMLPreInitializationEvent event) {
+ public static void handleConfigFile(FMLPreInitializationEvent event) {
Configuration config = new Configuration(event.getSuggestedConfigurationFile());
config.load();
@@ -93,11 +99,32 @@ implements ActionListener
@Mod.EventHandler
public void init(FMLInitializationEvent event)
{
- proxy.init(event);
+ proxy.init(event);
MinecraftForge.EVENT_BUS.register(this);
FMLCommonHandler.instance().bus().register(this);
proxy.registerNetworkStuff();
}
+
+ @SubscribeEvent
+ public void renderWorldLastEvent(RenderWorldLastEvent evt){
+ double doubleX = Minecraft.getMinecraft().thePlayer.posX - 0.5;
+ double doubleY = Minecraft.getMinecraft().thePlayer.posY + 0.1;
+ double doubleZ = Minecraft.getMinecraft().thePlayer.posZ - 0.5;
+
+ GL11.glPushMatrix();
+ GL11.glTranslated(-doubleX, -doubleY, -doubleZ);
+ GL11.glColor3ub((byte)255,(byte)0,(byte)0);
+ float mx = (float) Minecraft.getMinecraft().thePlayer.posX;
+ float my = (float) Minecraft.getMinecraft().thePlayer.posY;
+ float mz = (float) Minecraft.getMinecraft().thePlayer.posZ;
+ GL11.glBegin(GL11.GL_LINES);
+ GL11.glVertex3f(mx+0.4f,my,mz+0.4f);
+ GL11.glVertex3f(mx-0.4f,my,mz-0.4f);
+ GL11.glVertex3f(mx+0.4f,my,mz-0.4f);
+ GL11.glVertex3f(mx-0.4f,my,mz+0.4f);
+ GL11.glEnd();
+ GL11.glPopMatrix();
+ }
//Post-Init
@Mod.EventHandler
diff --git a/src/Java/miscutil/core/util/debug/UtilsRendering.java b/src/Java/miscutil/core/util/debug/UtilsRendering.java
index 6fc8736165..193e6004a6 100644
--- a/src/Java/miscutil/core/util/debug/UtilsRendering.java
+++ b/src/Java/miscutil/core/util/debug/UtilsRendering.java
@@ -2,6 +2,9 @@ package miscutil.core.util.debug;
import javax.vecmath.Point3d;
+import libshapedraw.LibShapeDraw;
+import libshapedraw.primitive.Color;
+import libshapedraw.shape.WireframeCuboid;
import miscutil.core.util.Utils;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
@@ -27,16 +30,34 @@ public class UtilsRendering {
static Tessellator drawBlock = Tessellator.instance;
public static void drawBlockInWorld(int x, int y, int z){
- //drawBlock = new Tessellator();
- Utils.LOG_INFO("Drawing Debug Block in world..");
- /*drawBlock.startDrawingQuads();
- drawBlock.setTranslation(x, y, z);
- drawBlock.addVertexWithUV(x+1, y-1, z, 0.0, 0.1);
- drawBlock.addVertexWithUV(x+1, y+1, z, 0.1, 0.0);
- drawBlock.addVertexWithUV(x-1, y+1, z, 0.1, 0.0);
- drawBlock.addVertexWithUV(x-1, y-1, z, 0.0, 0.1);
- drawBlock.draw();*/
- Block_Render(null, x, y, z);
+ Utils.LOG_INFO("Drawing Debug Block in world...");
+
+ LibShapeDraw libShapeDraw = new LibShapeDraw();
+ WireframeCuboid box = new WireframeCuboid(x,y,z, x+1,y+1,z+1);
+ box.setLineStyle(Color.CYAN.copy(), 2.0F, true);
+ libShapeDraw.addShape(box);
+
+ }
+
+ public static void renderStuff (int x, int y, int z){
+ Utils.LOG_INFO("Doing Some Debug Rendering.");
+ double doubleX = Minecraft.getMinecraft().thePlayer.posX - 0.5;
+ double doubleY = Minecraft.getMinecraft().thePlayer.posY + 0.1;
+ double doubleZ = Minecraft.getMinecraft().thePlayer.posZ - 0.5;
+
+ GL11.glPushMatrix();
+ GL11.glTranslated(-doubleX, -doubleY, -doubleZ);
+ GL11.glColor3ub((byte)255,(byte)0,(byte)0);
+ float mx = x;
+ float my = y;
+ float mz = z;
+ GL11.glBegin(GL11.GL_LINES);
+ GL11.glVertex3f(mx+0.4f,my,mz+0.4f);
+ GL11.glVertex3f(mx-0.4f,my,mz-0.4f);
+ GL11.glVertex3f(mx+0.4f,my,mz-0.4f);
+ GL11.glVertex3f(mx-0.4f,my,mz+0.4f);
+ GL11.glEnd();
+ GL11.glPopMatrix();
}
diff --git a/src/Java/miscutil/core/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntityIndustrialSinter.java b/src/Java/miscutil/core/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntityIndustrialSinter.java
index 5067552e67..f1b35230e7 100644
--- a/src/Java/miscutil/core/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntityIndustrialSinter.java
+++ b/src/Java/miscutil/core/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntityIndustrialSinter.java
@@ -25,6 +25,10 @@ import net.minecraft.item.ItemStack;
public class GregtechMetaTileEntityIndustrialSinter
extends GT_MetaTileEntity_MultiBlockBase {
+
+
+ RenderBlocks asdasd = RenderBlocks.getInstance();
+
public GregtechMetaTileEntityIndustrialSinter(int aID, String aName, String aNameRegional) {
super(aID, aName, aNameRegional);
}
@@ -121,7 +125,6 @@ extends GT_MetaTileEntity_MultiBlockBase {
int controllerX = aBaseMetaTileEntity.getXCoord();
int controllerY = aBaseMetaTileEntity.getYCoord();
int controllerZ = aBaseMetaTileEntity.getZCoord();
- RenderBlocks asdasd = RenderBlocks.getInstance();
byte tSide = getBaseMetaTileEntity().getBackFacing();
if ((getBaseMetaTileEntity().getAirAtSideAndDistance(getBaseMetaTileEntity().getBackFacing(), 1)) && (getBaseMetaTileEntity().getAirAtSideAndDistance(getBaseMetaTileEntity().getBackFacing(), 2) && (getBaseMetaTileEntity().getAirAtSideAndDistance(getBaseMetaTileEntity().getBackFacing(), 3)))) {
@@ -131,9 +134,10 @@ extends GT_MetaTileEntity_MultiBlockBase {
for (byte k = -1; k < 2; k = (byte) (k + 1)) {
if (getBaseMetaTileEntity().getAirOffset(i, j, k)) {
Utils.LOG_INFO("Found Air at: "+(controllerX+i)+" "+(controllerY+k)+" "+(controllerZ+k));
- if (aBaseMetaTileEntity.getWorld().isRemote){
- UtilsRendering.renderBoxAt((controllerX+i), (controllerY+k), (controllerZ+k));
- }
+ //if (aBaseMetaTileEntity.getWorld().isRemote){
+ //asdasd.renderStandardBlock(ModBlocks.MatterFabricatorEffectBlock, (controllerX+i), (controllerY+k), (controllerZ+k));
+ UtilsRendering.drawBlockInWorld((controllerX+i), (controllerY+k), (controllerZ+k));
+ //}
tAirCount++;
}
}
@@ -144,6 +148,7 @@ extends GT_MetaTileEntity_MultiBlockBase {
return false;
}
for (byte i = 2; i < 6; i = (byte) (i + 1)) {
+ UtilsRendering.drawBlockInWorld((controllerX+i), (controllerY), (controllerZ));
IGregTechTileEntity tTileEntity;
if ((null != (tTileEntity = getBaseMetaTileEntity().getIGregTechTileEntityAtSideAndDistance(i, 2))) &&
(tTileEntity.getFrontFacing() == getBaseMetaTileEntity().getFrontFacing()) && (tTileEntity.getMetaTileEntity() != null) &&
@@ -159,6 +164,7 @@ extends GT_MetaTileEntity_MultiBlockBase {
for (byte j = -1; j < 2; j = (byte) (j + 1)) {
if ((i != 0) || (j != 0)) {
for (byte k = 0; k < 5; k = (byte) (k + 1)) {
+ UtilsRendering.drawBlockInWorld((controllerX+i), (controllerY+k), (controllerZ+k));
if (((i == 0) || (j == 0)) && ((k == 1) || (k == 2) || (k == 3))) {
if (getBaseMetaTileEntity().getBlock(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i)) == getCasingBlock() && getBaseMetaTileEntity().getMetaID(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i)) == getCasingMeta()) {
}