diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Java/miscutil/MiscUtils.java | 31 | ||||
-rw-r--r-- | src/Java/miscutil/core/block/base/BlockBaseModular.java | 8 | ||||
-rw-r--r-- | src/Java/miscutil/core/lib/CORE.java | 2 | ||||
-rw-r--r-- | src/Java/miscutil/core/recipe/RECIPES_GREGTECH.java | 3 | ||||
-rw-r--r-- | src/Java/miscutil/core/util/debug/UtilsRendering.java | 198 | ||||
-rw-r--r-- | src/resources/mcmod.info | 2 |
6 files changed, 11 insertions, 233 deletions
diff --git a/src/Java/miscutil/MiscUtils.java b/src/Java/miscutil/MiscUtils.java index 49cd448dc5..545e29a584 100644 --- a/src/Java/miscutil/MiscUtils.java +++ b/src/Java/miscutil/MiscUtils.java @@ -22,8 +22,6 @@ import miscutil.core.item.general.RF2EU_Battery; import miscutil.core.lib.CORE; import miscutil.core.util.Utils; import miscutil.xmod.gregtech.HANDLER_GT; -import net.minecraftforge.client.event.RenderWorldLastEvent; -import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.config.Configuration; import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.Mod; @@ -34,7 +32,6 @@ 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 @@ -85,7 +82,7 @@ implements ActionListener Utils.LOG_INFO("Loading "+CORE.name+" V"+CORE.VERSION); FMLCommonHandler.instance().bus().register(new LoginEventHandler()); - System.out.println("Login Handler Initialized"); + Utils.LOG_INFO("Login Handler Initialized"); handleConfigFile(event); proxy.registerTileEntities(); @@ -99,31 +96,10 @@ implements ActionListener public void init(FMLInitializationEvent event) { proxy.init(event); - MinecraftForge.EVENT_BUS.register(this); - FMLCommonHandler.instance().bus().register(this); + //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 @@ -135,7 +111,6 @@ implements ActionListener public void serverStarting(FMLServerStartingEvent event) { event.registerServerCommand(new CommandMath()); - } @Mod.EventHandler diff --git a/src/Java/miscutil/core/block/base/BlockBaseModular.java b/src/Java/miscutil/core/block/base/BlockBaseModular.java index 5e0bc163c2..1b07339246 100644 --- a/src/Java/miscutil/core/block/base/BlockBaseModular.java +++ b/src/Java/miscutil/core/block/base/BlockBaseModular.java @@ -27,10 +27,10 @@ public class BlockBaseModular extends BasicBlock{ this.thisBlockMaterial = blockMaterial; this.setBlockName(getLocalizedName()); - if (thisBlock == BlockTypes.STANDARD){ + if (thisBlock.name().toLowerCase() == BlockTypes.STANDARD.name().toLowerCase()){ LanguageRegistry.addName(this, "Block of "+blockMaterial); } - else if (thisBlock == BlockTypes.FRAME){ + else if (thisBlock.name().toLowerCase() == BlockTypes.FRAME.name().toLowerCase()){ LanguageRegistry.addName(this, blockMaterial+ " Frame Box"); } else { @@ -38,10 +38,10 @@ public class BlockBaseModular extends BasicBlock{ } //setOreDict(unlocalizedName, blockType); - if (thisBlock == BlockTypes.STANDARD){ + if (thisBlock.name().toLowerCase() == BlockTypes.STANDARD.name().toLowerCase()){ GameRegistry.registerBlock(this, ItemBlockGtBlock.class, blockType.getTexture()+unlocalizedName); } - else if (thisBlock == BlockTypes.FRAME){ + else if (thisBlock.name().toLowerCase() == BlockTypes.FRAME.name().toLowerCase()){ GameRegistry.registerBlock(this, ItemBlockGtFrameBox.class, blockType.getTexture()+unlocalizedName); } diff --git a/src/Java/miscutil/core/lib/CORE.java b/src/Java/miscutil/core/lib/CORE.java index efad65ee8b..f3eab13b92 100644 --- a/src/Java/miscutil/core/lib/CORE.java +++ b/src/Java/miscutil/core/lib/CORE.java @@ -18,7 +18,7 @@ public class CORE { public static final String name = "GT++"; public static final String MODID = "miscutils"; - public static final String VERSION = "1.4.3.13.3-release"; + public static final String VERSION = "1.4.4.1-release"; public static boolean DEBUG = false; public static final boolean LOAD_ALL_CONTENT = false; public static final int GREG_FIRST_ID = 760; diff --git a/src/Java/miscutil/core/recipe/RECIPES_GREGTECH.java b/src/Java/miscutil/core/recipe/RECIPES_GREGTECH.java index 724c0a2cac..b5d2763f7c 100644 --- a/src/Java/miscutil/core/recipe/RECIPES_GREGTECH.java +++ b/src/Java/miscutil/core/recipe/RECIPES_GREGTECH.java @@ -6,6 +6,7 @@ import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; +import miscutil.core.item.ModItems; import miscutil.core.lib.CORE; import miscutil.core.util.Utils; import miscutil.core.util.fluid.FluidUtils; @@ -117,7 +118,7 @@ public class RECIPES_GREGTECH { private static void distilleryRecipes(){ Utils.LOG_INFO("Registering Distillery/Distillation Tower Recipes."); GT_Values.RA.addDistilleryRecipe(ItemList.Circuit_Integrated.getWithDamage(0L, 4L, new Object[0]), FluidUtils.getFluidStack("air", 1000), FluidUtils.getFluidStack("helium", 1), 400, 30, false); - GT_Values.RA.addDistillationTowerRecipe(FluidUtils.getFluidStack("air", 20000), FluidUtils.getFluidStackArray("helium", 25), null, 200, 60); + GT_Values.RA.addDistillationTowerRecipe(FluidUtils.getFluidStack("air", 20000), FluidUtils.getFluidStackArray("helium", 25), UtilsItems.getSimpleStack(ModItems.itemHeliumBlob, 1), 200, 60); } private static void addFuels(){ diff --git a/src/Java/miscutil/core/util/debug/UtilsRendering.java b/src/Java/miscutil/core/util/debug/UtilsRendering.java deleted file mode 100644 index 89967e1a6a..0000000000 --- a/src/Java/miscutil/core/util/debug/UtilsRendering.java +++ /dev/null @@ -1,198 +0,0 @@ -package miscutil.core.util.debug; - -import javax.vecmath.Point3d; - -import miscutil.core.util.Utils; -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; -import net.minecraft.client.Minecraft; -import net.minecraft.client.entity.EntityClientPlayerMP; -import net.minecraft.client.renderer.RenderBlocks; -import net.minecraft.client.renderer.Tessellator; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ChunkCoordinates; -import net.minecraft.util.MovingObjectPosition; -import net.minecraft.world.World; -import net.minecraftforge.client.event.RenderWorldLastEvent; -import net.minecraftforge.common.util.ForgeDirection; - -import org.lwjgl.opengl.GL11; - -import cpw.mods.fml.common.eventhandler.SubscribeEvent; - -public class UtilsRendering { - static Tessellator drawBlock = Tessellator.instance; - - /*public static void drawBlockInWorld(final int x, final int y, final int z, final ReadonlyColor colours){ - Thread t = new Thread() { - @Override - public void run() { - LibShapeDraw drawThing = new LibShapeDraw(); - WireframeCuboid box = new WireframeCuboid(x,y,z, x+1,y+1,z+1); - box.setLineStyle(colours.copy(), 2.0F, false); - drawThing.addShape(box); - - Utils.LOG_INFO("Drawing wireframe at: ["+x+"] ["+y+"] ["+z+"]"); - if(true) { - try { - Thread.sleep(1000*10*1); - drawThing.removeShape(box); - } catch (Throwable ie) { - Utils.LOG_INFO("Failed creating render removal timer."); - drawThing.removeShape(box); - } - } - } - }; - t.start(); - }*/ - - 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(); - } - - - public static void renderBoxAt(double x, double y, double z) { - - // locationBlocksTexture is a "ResourceLocation" that points to a texture made of many block "icons". - // It will look very ugly, but creating our own ResourceLocation is beyond the scope of this tutorial. - Tessellator tessellator = Tessellator.instance; - GL11.glPushMatrix(); - GL11.glTranslated(x, y+1, z); // +1 so that our "drawing" appears 1 block over our block (to get a better view) - tessellator.startDrawingQuads(); - tessellator.addVertexWithUV(0, 0, 0, 0, 0); - tessellator.addVertexWithUV(0, 1, 0, 0, 1); - tessellator.addVertexWithUV(1, 1, 0, 1, 1); - tessellator.addVertexWithUV(1, 0, 0, 1, 0); - - tessellator.addVertexWithUV(0, 0, 0, 0, 0); - tessellator.addVertexWithUV(1, 0, 0, 1, 0); - tessellator.addVertexWithUV(1, 1, 0, 1, 1); - tessellator.addVertexWithUV(0, 1, 0, 0, 1); - - tessellator.draw(); - GL11.glPopMatrix(); - - } - - @SubscribeEvent - public static void Block_Render(RenderWorldLastEvent evt, int x, int y, int z){ - - Minecraft mc = Minecraft.getMinecraft(); - MovingObjectPosition mouseOver = Minecraft.getMinecraft().objectMouseOver; - - int mx = mouseOver.blockX; - int my = mouseOver.blockY; - int mz = mouseOver.blockZ; - - int hit; - hit = mouseOver.sideHit; - ForgeDirection direction = ForgeDirection.getOrientation(hit); - - World world = mc.thePlayer.worldObj; - EntityPlayer player = mc.thePlayer; - EntityClientPlayerMP p= mc.thePlayer; - ChunkCoordinates coord; - coord = player.getPlayerCoordinates(); - - int px = (int) coord.posX; - int py = (int) player.posY-1; - int pz = (int) coord.posZ; - - double dx = p.lastTickPosX + (p.posX - p.lastTickPosX) - * evt.partialTicks; - double dy = p.lastTickPosY + (p.posY - p.lastTickPosY) - * evt.partialTicks; - dy = dy -1; - double dz = p.lastTickPosZ + (p.posZ - p.lastTickPosZ) - * evt.partialTicks; - - int tx = mx - px; - int ty = my - py; - int tz = mz - pz; - - - Point3d translate; - translate= new Point3d(tx, ty, tz)/*.add(direction)*/; - - Block block = world.getBlock(x, y, z); - Material matt; - matt = block.getMaterial(); - - ItemStack stack; - stack = player.getHeldItem(); - Item held = null; - if(stack != null) - held = stack.getItem(); - - if (block == Blocks.air || matt == Material.fire - || matt == Material.water || matt == Material.lava - || matt == Material.plants || matt == Material.vine - || block == Blocks.snow_layer) { - - translate= new Point3d(tx, ty, tz); - } - else translate= new Point3d(tx, ty, tz)/*.add(direction)*/; - - tx = (int) translate.x; - ty = (int) translate.y; - tz = (int) translate.z; - double fx = px - dx; - double fy = py - dy; - double fz = pz - dz; - - //Block block3 = Common_Registry.Floater; - // Block block4 = Common_Registry.Balloon; - Block block2 = world.getBlock(20, 20, 20); - - GL11.glPushMatrix(); - GL11.glEnable(GL11.GL_BLEND); - GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE); - Tessellator t = Tessellator.instance; - RenderBlocks renderBlocks = new RenderBlocks(); - renderBlocks.blockAccess = world; - - renderBlocks.setRenderBounds(0D, 0D, 0D, 1D, 1D, 1D); - t.startDrawingQuads(); - t.setBrightness(15 << 20 | 15 << 4); - - try{ - if(block != Blocks.air){ - renderBlocks.renderBlockByRenderType(block2, 0, -11, 0); - } - - GL11.glTranslated( 0F, 10f, 0F); - GL11.glTranslated( tx, ty, tz); - GL11.glTranslated( fx, fy, fz); - } - catch(NullPointerException exception){ - System.out.println(exception); - } - t.draw(); - - GL11.glEnable(GL11.GL_LIGHTING); - GL11.glDisable(GL11.GL_BLEND); - GL11.glPopMatrix(); - } - -} diff --git a/src/resources/mcmod.info b/src/resources/mcmod.info index 879cd57c0d..282aad637c 100644 --- a/src/resources/mcmod.info +++ b/src/resources/mcmod.info @@ -5,7 +5,7 @@ "description": "Adds a few various Multiblocks, Machines, etc to Gregtech and a plethora of other mods (Nearly 30!)", "credits": "", "logoFile": "", - "version": "1.4.3.13.3-release", + "version": "1.4.4.1-release", "mcversion": "1.7.10", "url": "https://github.com/draknyte1/MiscUtilities/wiki", "updateUrl": "https://github.com/draknyte1/MiscUtilities/tree/master/build/libs", |