Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

minnymin3

Members
  • Posts

    30
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

minnymin3's Achievements

Tree Puncher

Tree Puncher (2/8)

1

Reputation

  1. Not sure about the rules for bumping (I hope I'm not breaking any...)
  2. I know the basics of vectors: They are pretty much x, y, z either representing a location on a 3D grid or the movement of an object over a 3D grid. Checking out the clip methods.
  3. I have no idea where to start... Any ideas? EDIT: Researched ray tracing a bit and I get how it works... kinda... Well anyways does anyone know the simplest way, or even any way, to do the ray tracing like does anyone have the algorithm that fits this purpose?
  4. That would work but I have no idea where to start... And also would that work really? I want to check which block the mouse is hovering over in the custom view and have the black box and allow for right click, left click, etc. while ray tracing seems to be more for things like reflections.
  5. I am changing the way the third person camera works (with base edits) for a project. I've made it so that the camera only rotates in third person when middle mouse is down so the mouse is ungrabbed. I also unbound the player rotation from the camera rotation. My problem now is getting the block that the mouse is hovering over. I've overridden the getLook function in EntityPlayer but can't get anywhere from there. Heres the code in the base getLook function: float f1; float f2; float f3; float f4; if (par1 == 1.0F) { f1 = MathHelper.cos(-this.rotationYaw * 0.017453292F - (float)Math.PI); f2 = MathHelper.sin(-this.rotationYaw * 0.017453292F - (float)Math.PI); f3 = -MathHelper.cos(-this.rotationPitch * 0.017453292F); f4 = MathHelper.sin(-this.rotationPitch * 0.017453292F); return this.worldObj.getWorldVec3Pool().getVecFromPool((double)(f2 * f3), (double)f4, (double)(f1 * f3)); } else { f1 = this.prevRotationPitch + (this.rotationPitch - this.prevRotationPitch) * par1; f2 = this.prevRotationYaw + (this.rotationYaw - this.prevRotationYaw) * par1; f3 = MathHelper.cos(-f2 * 0.017453292F - (float)Math.PI); f4 = MathHelper.sin(-f2 * 0.017453292F - (float)Math.PI); float f5 = -MathHelper.cos(-f1 * 0.017453292F); float f6 = MathHelper.sin(-f1 * 0.017453292F); return this.worldObj.getWorldVec3Pool().getVecFromPool((double)(f4 * f5), (double)f6, (double)(f3 * f5)); } I... Well I have no idea what to do here... Any help would be appreciated! Thanks. EDIT: I know the basics of what to do but have no idea how to implement it. If anyone has done anything similar to this then please help me out
  6. Thanks!!!! This helped a lot! Too bad it will slow down startup a bit...
  7. Looked around for about 30 minutes and didn't find anything. Im looking for something like GameRegistry.getRecipe(Item) but obvs that doesn't exist...
  8. The title says it all. Is there a way to get an item's recipe (or one of them)?
  9. Ok... I feel bad asking but what method should i use to fire the if statement?
  10. I want to give a player certain abilities when a specific item is in the hotbar but cannot figure out how to detect when an item is in the hotbar... Any suggestions?
  11. You have to tell forge what myFirstItemStack and sitckStack are. You could change stickStack to Item.stick and define myFirstItemStack like this: ItemStack myFirstItemStack = new ItemStack(Item.WhateverItemThisIs); I think there might be a better way to do this because I to am not that experienced
  12. I created a basic mod that adds a few new blocks into the game and added a config. When i launched it after i added the config, I got these errors: java.lang.IllegalArgumentException: Slot 0 is already occupied by minny.minnylight.GlowBrick@6a63afa4 when adding minny.minnylight.GlowTorch@36a06e8d at net.minecraft.src.Block.<init>(Block.java:292) at net.minecraft.src.Block.<init>(Block.java:325) at minny.minnylight.GlowTorch.<init>(GlowTorch.java:26) at minny.minnylight.mod_MinnyLight.load(mod_MinnyLight.java:73) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:440) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:69) at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:317) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:300) at com.google.common.eventbus.EventBus.post(EventBus.java:268) at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:140) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:69) at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:317) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:300) at com.google.common.eventbus.EventBus.post(EventBus.java:268) at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:83) at cpw.mods.fml.common.Loader.initializeMods(Loader.java:651) at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:197) at net.minecraft.client.Minecraft.startGame(Minecraft.java:469) at net.minecraft.client.Minecraft.run(Minecraft.java:756) at java.lang.Thread.run(Thread.java:680) The config file says block { I:"Coloured Glass"=4093 I:"Glow Brick"=4095 I:"Glow Torch"=4094 } I have no idea why it is making the block ID 0. Any help would be very much appreciated. Here is the rest of my code, specifically mod_minnylight package minny.minnylight; /* * Basic importing */ import net.minecraft.src.Block; import net.minecraft.src.Item; import net.minecraft.src.ItemStack; import net.minecraftforge.common.Configuration; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.Init; import cpw.mods.fml.common.Mod.PostInit; import cpw.mods.fml.common.Mod.PreInit; import cpw.mods.fml.common.SidedProxy; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; import cpw.mods.fml.common.network.NetworkMod; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.common.registry.LanguageRegistry; /* * Basic needed forge stuff */ @Mod(modid="Minny's Lighting",name="Minny's Lighting",version="0.2.0") @NetworkMod(clientSideRequired=true,serverSideRequired=false) public class mod_MinnyLight { @SidedProxy(clientSide="minny.minnylight.ClientProxy", serverSide="minny.minnylight.CommonProxy") public static CommonProxy proxy; @PreInit public void preLoad(FMLPreInitializationEvent event) { Configuration config = new Configuration(event.getSuggestedConfigurationFile()); config.load(); int GlowBrickID = config.getBlock("Glow Brick", 148).getInt(); int GlowTorchID = config.getBlock("Glow Torch", 149).getInt(); int ColouredGlassID = config.getBlock("Coloured Glass", 150).getInt(); config.save(); } //Declaring Init @Init public void load(FMLInitializationEvent event){ //GlowBrick GlowBrick = (new GlowBrick(GlowBrickID , 0).setBlockName("Glow Brick").setLightValue(1.0F).setHardness(1F).setResistance(5F)); GameRegistry.registerBlock(GlowBrick); LanguageRegistry.addName(GlowBrick, "GlowBrick"); GameRegistry.addRecipe(new ItemStack(GlowBrick, , new Object[]{ "SSS","SgS","SSS",'g',Block.glowStone,'S',Block.stoneBrick }); //GlowTorch GlowTorch = (new GlowTorch(GlowTorchID , 1).setBlockName("Glow Torch").setLightValue(1.0F).setHardness(0F).setResistance(10F)); GameRegistry.registerBlock(GlowTorch); LanguageRegistry.addName(GlowTorch, "Glow Torch"); GameRegistry.addRecipe(new ItemStack(GlowTorch, 4), new Object[]{ "g","s",'g',Item.lightStoneDust,'s',Item.stick }); //WhiteGlass ColouredGlass = (new ColouredGlass(ColouredGlassID , 2).setBlockName("White Glass").setLightOpacity(1).setHardness(0.3F)); GameRegistry.registerBlock(ColouredGlass, MultiColouredGLass.class); for (int ix = 0; ix < 16; ix++) { //Defining all the dyes ItemStack whiteDye = new ItemStack(Item.dyePowder, 1, 16); ItemStack orangeDye = new ItemStack(Item.dyePowder, 1, 15); ItemStack magentaDye = new ItemStack(Item.dyePowder, 1, 14); ItemStack lightBlueDye = new ItemStack(Item.dyePowder, 1, 13); ItemStack yellowDye = new ItemStack(Item.dyePowder, 1, 12); ItemStack limeDye = new ItemStack(Item.dyePowder, 1, 11); ItemStack pinkDye = new ItemStack(Item.dyePowder, 1, 10); ItemStack greyDye = new ItemStack(Item.dyePowder, 1, 9); ItemStack lightGreyDye = new ItemStack(Item.dyePowder, 1, ; ItemStack cyanDye = new ItemStack(Item.dyePowder, 1, 7); ItemStack purpleDye = new ItemStack(Item.dyePowder, 1, 6); ItemStack blueDye = new ItemStack(Item.dyePowder, 1, 5); ItemStack brownDye = new ItemStack(Item.dyePowder, 1, 4); ItemStack greenDye = new ItemStack(Item.dyePowder, 1, 3); ItemStack redDye = new ItemStack(Item.dyePowder, 1, 2); ItemStack blackDye = new ItemStack(Item.dyePowder, 1, 1); //Defining all the colors of glass ItemStack whiteGlass = new ItemStack(ColouredGlass, 1, 1); ItemStack orangeGlass = new ItemStack(ColouredGlass, 1, 2); ItemStack magentaGlass = new ItemStack(ColouredGlass, 1, 3); ItemStack lightBlueGlass = new ItemStack(ColouredGlass, 1, 4); ItemStack yellowGlass = new ItemStack(ColouredGlass, 1, 5); ItemStack limeGlass = new ItemStack(ColouredGlass, 1, 6); ItemStack pinkGlass = new ItemStack(ColouredGlass, 1, 7); ItemStack greyGlass = new ItemStack(ColouredGlass, 1, ; ItemStack lightGreyGlass = new ItemStack(ColouredGlass, 1, 9); ItemStack cyanGlass = new ItemStack(ColouredGlass, 1, 10); ItemStack purpleGlass = new ItemStack(ColouredGlass, 1, 11); ItemStack blueGlass = new ItemStack(ColouredGlass, 1, 12); ItemStack brownGlass = new ItemStack(ColouredGlass, 1, 13); ItemStack greenGlass = new ItemStack(ColouredGlass, 1, 14); ItemStack redGlass = new ItemStack(ColouredGlass, 1, 15); ItemStack blackGlass = new ItemStack(ColouredGlass, 1, 16); //Defining the multiBlock colored glass ItemStack multiBlockStack = new ItemStack(ColouredGlass, 1, ix); //Defining all the recipes of all the colors of glass GameRegistry.addShapelessRecipe(whiteGlass, Block.glass, whiteDye); GameRegistry.addShapelessRecipe(orangeGlass, Block.glass, orangeDye); GameRegistry.addShapelessRecipe(magentaGlass, Block.glass, magentaDye); GameRegistry.addShapelessRecipe(lightBlueGlass, Block.glass, lightBlueDye); GameRegistry.addShapelessRecipe(yellowGlass, Block.glass, yellowDye); GameRegistry.addShapelessRecipe(limeGlass, Block.glass, limeDye); GameRegistry.addShapelessRecipe(pinkGlass, Block.glass, pinkDye); GameRegistry.addShapelessRecipe(greyGlass, Block.glass, greyDye); GameRegistry.addShapelessRecipe(lightGreyGlass, Block.glass, lightGreyDye); GameRegistry.addShapelessRecipe(cyanGlass, Block.glass, cyanDye); GameRegistry.addShapelessRecipe(purpleGlass, Block.glass, purpleDye); GameRegistry.addShapelessRecipe(blueGlass, Block.glass, blueDye); GameRegistry.addShapelessRecipe(brownGlass, Block.glass, brownDye); GameRegistry.addShapelessRecipe(greenGlass, Block.glass, greenDye); GameRegistry.addShapelessRecipe(redGlass, Block.glass, redDye); GameRegistry.addShapelessRecipe(blackGlass, Block.glass, blackDye); LanguageRegistry.addName(multiBlockStack, ColouredGlassNames[multiBlockStack.getItemDamage()]); } proxy.registerRenderers(); } @PostInit public void postInit(FMLPostInitializationEvent event) { // Stub Method } //Telling forge that we are creating these public static Block GlowBrick; public static Block GlowTorch; public static Block ColouredGlass; private static final String[] ColouredGlassNames = { "White Glass", "Orange Glass", "Magenta Glass", "Light Blue Glass", "Yellow Glass", "Lime Glass", "Pink Glass", "Dark Grey Glass", "Light Grey Glass", "Cyan Glass", "Purple Glass", "Blue Glass", "Brown Glass", "Green Glass", "Red Glass", "Black Glass" }; public int GlowBrickID; public int GlowTorchID; public int ColouredGlassID; } EDIT: I followed the tut: http://www.minecraftforge.net/wiki/How_to_make_an_advanced_configuration_file
  13. If you removed a mod that had an item in that chest then that would make the game crash
  14. Would there be a way to disable the info in the bottom left corner of the screen? It doesn't play well with home screen gui changing mods.
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.