Jump to content

larsgerrits

Members
  • Posts

    3462
  • Joined

  • Last visited

  • Days Won

    17

Everything posted by larsgerrits

  1. If you scroll to the Forge section in WorldType , you see Forge adds a constructor that only takes the name of the WorldType . You can use that.
  2. If you are planning to switch alot between your PC and laptop, why not consider a Git project? It would make it alot easier to work on it from multiple devices.
  3. You have to use the RenderGameOverlayEvent to draw that in the ingame GUI.
  4. You don't even know what you are talking about, do you? You can use this perfectly fine:GameRegistry.addRecipe(new ItemStack(Blocks.stone), "###", "###", "###", '#', new ItemStack(Items.dye, 1, 3)); That recipe will create a stone block using 9 lapis lazuli.
  5. The Item from ItemStack can never be null. The ItemStack returned from getCurrentEquippedItem() can be null, so you need to check if thats not null, and then you can safely get the Item.
  6. Ah, I was being stupid. Copy the drawTexturedModalRect method you are using, than add the line to set the color after the Tessellator#startDrawingQuads() , but before the vertices are added. And use that method instead of the vanilla one.
  7. Set the color before the drawTexturedModalRect method.
  8. You are probablyusing the Tessellator to draw the gui, so after Tessellator#startDrawing(*); , add a Tessellator#setColorRGB_F(1F,1F,1F); . That should fix the issue.
  9. If you have the coordinates of the block, calculate deltaX/Y/Z, and then do some math to figure out if the player is in range of the coordinates. If you don't have the coordinates of the block, I think there's a method in the world class which checks if there's a specific block in an AABB, which you can ofcourse make the AABB around the player.
  10. The color is set to green when drawing the text, and that stays the same until you clear it, which you don't, so everything you draw after that is a bit greenish. You should clear the color at the start of the draw method.
  11. Go to the OP, click edit, and put [solved] before the title.
  12. Again: where do you get the BufferedImage from? Eg. BufferedImage img = ?;
  13. Where did you get the magic number 104 from? Where did you get the batteryStack from?
  14. Where do you get the BufferedImage from? If it is a static image, you might be able to use a ResourceLocation with a custom IResourcePack implementation.
  15. [lmgtfy=minecraft forge buffered image in gui]Google for the win![/lmgtfy]
  16. For example like [lmgtfy=minecraft forge block with techne model]this[/lmgtfy].
  17. ... Definitely any new modding should be done in 1.8. And like diesieben07 says any PRs for non-critical changes will only be accepted into 1.8. Well, diesieben07 hasn't said that, but shadowfacts did
  18. If I go the route for the different model files, every model file looks like this: { "parent":"dwarffortress:item/standard_item", "textures": { "layer0": "minecraft:blocks/stone" } } The only difference per-JSON is the layer0 line, so only the texture. So I guess the ISmartItemModel is the way go here, right?
  19. Do you by any change have a tutorial on ISmartItemModel? Or are you going to do one in the future? I'm making an Item with about 130 different variants, and I would like not having to make 130 model files only to change the texture. Or do you have another solution to this?
  20. No, while I used the method to show attacking an entity, it is really just a copy of the mouse over method with a reach you can specify. It returns a moving object position so (although I didn't confirm it) I think it will return a block if it doesn't hit an entity. The method basically works by first doing a ray trace on the look vector which returns a block, and then iterates along the vector to that block to see if there is an entity in the way. Nice, maybe I'll use it in the future!
  21. I suppose you can change the whole EntityRenderer instance in the Minecraft class, but that might be a bit rediculous for what you are trying to do. BTW Jabelar, isn't your mouse over method only for entities?
  22. This topic has been moved to Support & Bug Reports. [iurl]http://www.minecraftforge.net/forum/index.php?topic=30064.0[/iurl]
  23. There is a direct version you can use.
  24. There's a tutorial by diesieben07 in the Tutorials section.
  25. The reach distance on the client is determined in the PlayerControllerMP class, in the getBlockReachDistance method. You can't change the values returned there, but you can change the Minecraft#playerController field to return a custom class extending PlayerControllerMP, in which you do have full control over the method (and return your own values).
×
×
  • Create New...

Important Information

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