Jump to content

AppliedOnce

Members
  • Posts

    104
  • Joined

  • Last visited

Everything posted by AppliedOnce

  1. You seem to be right, but how would I go about getting the coordinations from the client then making the lightning spawn through the server?
  2. Anyone that can help me with this problem? Is there a bug with forge or Minecraft or something like that?
  3. I tried to use it, but it worked just as it did before. If you aim high enough it works, if it's too low on the terrain (and yes there are no grass in front of me) the lightning strikes at the player coords. The only way to make it work is to fly when using the item. If you do that it becomes accurate both with the way you are doing it as well as the way I did it.
  4. Hi, I am working on a item that when right clicking should spawn a lightning at the coordinate the crosshair is pointing at. Therefore I am using the trayrace(300, 1) method, but when I am standing on the ground and aiming at a block a few blocks away all I get is the coordinates of where I am standing. Why is that? Here is my code: public class ItemTalisman extends ItemPC { public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer player) { if (world.isRemote) { return itemStack; } if (ExtendedPlayer.get(player).getCulture() >= 100) { ExtendedPlayer.get(player).consumeCulture(100); // player.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 2400, 0, false)); MovingObjectPosition objectMouseOver; objectMouseOver = player.rayTrace(300, 1); if (objectMouseOver != null && objectMouseOver.typeOfHit == MovingObjectType.BLOCK) { double i = objectMouseOver.blockX; double j = objectMouseOver.blockY; double k = objectMouseOver.blockZ; world.addWeatherEffect(new EntityLightningBolt(world, i, j, k)); System.out.println("Spawning at: " + i + ", " + j + ", " + k); } } else { player.addChatComponentMessage(new ChatComponentText("You don't have enough culture.")); ExtendedPlayer.get(player).setCulture(100); } return itemStack; } }
  5. I am not really to familiar with the events in forge so how would I go at adding them in 1.7.2, it seems to have changed a bit.
  6. I just wondered how I can store an integer and save it to the player using nbts I have done some searching, but couldn't find a way to do it. I am quite new to the the whole 1.7.2 thing and haven't modded minecraft for a bit. It will be used like a mana type system and I want it to work in multiplayer as well as singleplayer. Thanks in advance.
  7. I think I am doing it exactly like the furnace. just with forge direction. It worked when I didn't have a custom model.
  8. Hi, I am having trouble with how to make it so that a custom modeled block can be placed just as a vanilla furnace, with the front towards me no matter which direction I am heading. As of now it can only be placed in one direction. Here is all the classes I am using: Main class Client Proxy Common Proxy TileSC TileTotem PacketTileUpdate PacketSC PacketHandler PacketTypeHandler ModelTotem TileTotemRenderer BlockTotem
  9. Thanks man, I can't believe I didn't notice those lines of code.
  10. Pretty sure that's not where you check for any of it but thanks either way.
  11. What code should I take a look at to see how vanilla furnaces works with the hopper like if the hopper is underneath the custom furnace it will only take out the output, if above it will only put into the input and so on. And also if you could tell me if there is a way to first check if there is a chest next to the furnace and then send the output to the chest.
  12. I had sort of given up on this subject, the reason why is misunderstanding. I do know how to set up a build.xml file that works, it's pretty close to pahimars. I just wonder how he do the jar signing, and how he get the right information by using that. Oh, and have he do the %version% stuff since when I do that I only get %version% in the final project even though I do the token stuff in the build.xml.
  13. Seems like I got it to work, I just had to check if the input inventory wasn't equal to null.
  14. This gave me net.minecraft.util.ReportedException. Saying this: 2013-09-29 20:26:19 [iNFO] [sTDERR] net.minecraft.util.ReportedException: Rendering screen 2013-09-29 20:26:19 [iNFO] [sTDERR] at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1045) 2013-09-29 20:26:19 [iNFO] [sTDERR] at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:944) 2013-09-29 20:26:19 [iNFO] [sTDERR] at net.minecraft.client.Minecraft.run(Minecraft.java:836) 2013-09-29 20:26:19 [iNFO] [sTDERR] at net.minecraft.client.main.Main.main(Main.java:93) 2013-09-29 20:26:19 [iNFO] [sTDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 2013-09-29 20:26:19 [iNFO] [sTDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) 2013-09-29 20:26:19 [iNFO] [sTDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) 2013-09-29 20:26:19 [iNFO] [sTDERR] at java.lang.reflect.Method.invoke(Unknown Source) 2013-09-29 20:26:19 [iNFO] [sTDERR] at net.minecraft.launchwrapper.Launch.launch(Launch.java:131) 2013-09-29 20:26:19 [iNFO] [sTDERR] at net.minecraft.launchwrapper.Launch.main(Launch.java:27) 2013-09-29 20:26:19 [iNFO] [sTDERR] Caused by: java.lang.NullPointerException 2013-09-29 20:26:19 [iNFO] [sTDERR] at com.xetosphere.arcane.tileentity.TileDuplicator.getTimeRequired(TileDuplicator.java:305) 2013-09-29 20:26:19 [iNFO] [sTDERR] at com.xetosphere.arcane.tileentity.TileDuplicator.getCookProgressTimeScaled(TileDuplicator.java:174) 2013-09-29 20:26:19 [iNFO] [sTDERR] at com.xetosphere.arcane.client.gui.inventory.GuiDuplicator.drawGuiContainerBackgroundLayer(GuiDuplicator.java:49) 2013-09-29 20:26:19 [iNFO] [sTDERR] at net.minecraft.client.gui.inventory.GuiContainer.drawScreen(GuiContainer.java:111) 2013-09-29 20:26:19 [iNFO] [sTDERR] at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1036) 2013-09-29 20:26:19 [iNFO] [sTDERR] ... 9 more I put getTimeRequired(inventory[iNPUT_INVENTORY_INDEX]) at all places where there was 400 before exept for the place where the fuel gets how long it should burn. I also get a nullpointer exception telling me this: at com.xetosphere.arcane.tileentity.TileDuplicator.getTimeRequired(TileDuplicator.java:305) 2013-09-29 20:26:19 [iNFO] [sTDOUT] at com.xetosphere.arcane.tileentity.TileDuplicator.getCookProgressTimeScaled(TileDuplicator.java:174) 2013-09-29 20:26:19 [iNFO] [sTDOUT] at com.xetosphere.arcane.client.gui.inventory.GuiDuplicator.drawGuiContainerBackgroundLayer(GuiDuplicator.java:49) 2013-09-29 20:26:19 [iNFO] [sTDOUT] at net.minecraft.client.gui.inventory.GuiContainer.drawScreen(GuiContainer.java:111) 2013-09-29 20:26:19 [iNFO] [sTDOUT] at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1036) 2013-09-29 20:26:19 [iNFO] [sTDOUT] at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:944) 2013-09-29 20:26:19 [iNFO] [sTDOUT] at net.minecraft.client.Minecraft.run(Minecraft.java:836) 2013-09-29 20:26:19 [iNFO] [sTDOUT] at net.minecraft.client.main.Main.main(Main.java:93) 2013-09-29 20:26:19 [iNFO] [sTDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 2013-09-29 20:26:19 [iNFO] [sTDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) 2013-09-29 20:26:19 [iNFO] [sTDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) 2013-09-29 20:26:19 [iNFO] [sTDOUT] at java.lang.reflect.Method.invoke(Unknown Source) 2013-09-29 20:26:19 [iNFO] [sTDOUT] at net.minecraft.launchwrapper.Launch.launch(Launch.java:131) 2013-09-29 20:26:19 [iNFO] [sTDOUT] at net.minecraft.launchwrapper.Launch.main(Launch.java:27)
  15. Hi, is there a way I can turn this code: and change it so that when I take a diamond in, it will take longer time till it finishes compared to when I put something else inside it.
  16. All I ask for is an example on how to do the build properties stuff. A sample would have been nice.
  17. Hi, so I'm doing something like pahimar does with the ee3 mod. I just can't figure out what I should use as keystore alias and storepass, as well as what to put as the keystore location. Anyone could help me with this?
  18. How would I go about using the container item stuff when it comes to furnace recipes. I am trying to make a recipe in the furnace where a bucket of milk in the input slot will give me a cheese as an output, but at the same time not destroy the bucket. How do I do that? I think I have to use setContainerItem or something LIKE that.
  19. I made it work like this : int i = OreDictionary.WILDCARD_VALUE; Item gem = duplicatorGem.setContainerItem(duplicatorGem); GameRegistry.addShapelessRecipe(new ItemStack(Item.coal, 2, 0), new ItemStack(Item.coal, 1, 0), new ItemStack(stack, 1, i)); How does that look?
  20. Like GameRegistry.addShapelessRecipe(output, input1, new ItemStack(item, 1, OreDictiornary.WILDCARD_VALUE).setContainerItem(containerItem); ?
  21. I take that back, now I can't use the item when it is damaged in the recipe.
  22. Could you please give me an example in a recipe?
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.