Everything posted by larsgerrits
-
Subclassing class with a private constructor - Access Transformer or reflection?
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.
-
Cannot open my mod
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.
-
[1.7.10] How i'm able to do this
You have to use the RenderGameOverlayEvent to draw that in the ingame GUI.
-
[1.8][Unsolved]What do i need to do to tell what type it is?
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.
-
[1.8]Get player's held item
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.
-
[1.7.10] Render blending
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.
-
[1.7.10] Render blending
Set the color before the drawTexturedModalRect method.
-
[1.7.10] Render blending
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.
-
[1.8] Check wether a player is near a block or not?
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.
-
[1.7.10] Render blending
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.
-
[Solved] Recharging Items in inventory
Go to the OP, click edit, and put [solved] before the title.
-
Render a bufferedImage in gui.
Again: where do you get the BufferedImage from? Eg. BufferedImage img = ?;
-
[Solved] Recharging Items in inventory
Where did you get the magic number 104 from? Where did you get the batteryStack from?
-
Render a bufferedImage in gui.
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.
-
Render a bufferedImage in gui.
[lmgtfy=minecraft forge buffered image in gui]Google for the win![/lmgtfy]
-
[1.7.10] Rendering a Custom Block Model?
For example like [lmgtfy=minecraft forge block with techne model]this[/lmgtfy].
-
[1.7] Horses?
... 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
-
[1.8] MinecraftByExample sample code project
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?
-
[1.8] MinecraftByExample sample code project
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?
-
[1.7.10] Setting extra reach doesnt work
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!
-
[1.7.10] Setting extra reach doesnt work
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?
-
MOVED: Help with downloading forge installer
This topic has been moved to Support & Bug Reports. [iurl]http://www.minecraftforge.net/forum/index.php?topic=30064.0[/iurl]
-
Help with downloading forge installer
There is a direct version you can use.
-
[1.8] [90% SOLVED] Cannot Interact With CustomFire E.G. Hit to Extinguish
There's a tutorial by diesieben07 in the Tutorials section.
-
[1.7.10] Setting extra reach doesnt work
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).
IPS spam blocked by CleanTalk.