Jump to content

Animefan8888

Forge Modder
  • Posts

    6157
  • Joined

  • Last visited

  • Days Won

    59

Everything posted by Animefan8888

  1. Remove this line then start from there jar.itemStored = heldItem.getItem();
  2. Put in a PR to forge so you can add/modify an event.
  3. Hugo suggested PlayerTickEvent and there is plenty of documentation on the internet I specifically like cool alias'. http://www.minecraftforum.net/forums/mapping-and-modding/mapping-and-modding-tutorials/1571567-forge-1-6-4-1-8-eventhandler-and Jaeblar has good tutorials.
  4. What I want is to make a personalized tree, just like vanilla, but with my blocks, it will not generate in the world, but will be made through a recipe(sappling). Make the blocks. Add a recipe for the sapling. Generate a tree shape you want multiple if you want, then look through the vanilla sapling as it demonstrates the vanilla sapling behavior.
  5. Leaning what functions do definitely comes with experience, and you can always just look at them in a deobfuscated state and learn what they do that way (exploring the ins and outs of minecraft).
  6. "Item Right Click" is when you right click while holding an Item.
  7. There is not a non packet way to do this as you need to communicate with the server from the client and packets are the only way to do this. You could instead of using a command use something else like an Item right click. And I believe the id's for mods are mod specific. Then converted to universal later.
  8. I only see one register call. And that is for your crate.
  9. Read this http://www.minecraftforge.net/forum/index.php?topic=20135.0
  10. Forge uses github and accepts pull requests, when they deem them useful. Ohh, so you mean suggest a change to Forge that would make it easier for me to do this? Not a change an addition, you will suggest the event OnSlotClickEvent or some name similar.
  11. I believe that code is executed on the client side of things so you will want to send a packet with as little information as possible to get this done then do it in the packet.
  12. Pull Request I don't understand what you mean by pull request here, isn't that a github thing? Forge uses github and accepts pull requests, when they deem them useful.
  13. You could put in a PR for slot click? Then when a slot is clicked handle averaging.
  14. Try changing the number at the end of the line to 1.
  15. Show an image of what it should look like and one with what it does look like.
  16. The # means you need an instance of that type. So do Color color = new Color(R, G, B).getRGB(); Oooooooh. I thought you guys just did that instead of using a decimal Well, good news is something displayed up top. Bad news is, I have no idea where any of that is coming from O_O https://gyazo.com/57afd183d694cde09cd5c1a2df39ce5a I believe that means that textures are bound weirdly. Instead of TextureManager textureManager = ClientProxy.MINECRAFT.getTextureManager(); textureManager.bindTexture(new ResourceLocation(Test.MODID + ":textures/gui/energybar.png")); Just do this.mc.getTextureManager().bindTexture(// Create ResourceLocation in a variable in the class instead of creating it every time the code is ran.//)
  17. The # means you need an instance of that type. So do Color color = new Color(R, G, B).getRGB();
  18. Only the percentage method has to be a double. I see what you were saying about the doubles. I felt dumb when I realized what you meant. haha. Unfortunately, the rectangle still isn't being drawn. No errors are being thrown. I checked the value for "getRightCoord()" and it's 58, just as it should be. I'm not sure what's going on. Here's the code again: public class GuiEnergyBarTwo extends Gui { private int xSize = 116, ySize = 17; //size of desired window. Max is 256x256 public void draw(){ System.out.println("" + getRightCoord()); TextureManager textureManager = ClientProxy.MINECRAFT.getTextureManager(); textureManager.bindTexture(new ResourceLocation(Test.MODID + ":textures/gui/energybar.png")); GlStateManager.pushMatrix(); //---- inner ---- drawRect(0, 0, getRightCoord(), ySize - 1, 1); //---- outline ---- GlStateManager.enableAlpha(); drawTexturedModalRect(0, 0, 0, 0, xSize, ySize); GlStateManager.popMatrix(); } private int getRightCoord(){ return (int)((ClientProxy.clientInfo.getEnergyPercentage() /100) * xSize); //this returns the retrieved percentage of the length of the rectangle } } Try making the last value in drawRect a RGB value using Color#getRGB()
  19. First thing is first you are using integers when you should be using doubles or floats. That may fix your problem.
×
×
  • Create New...

Important Information

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