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.
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.
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.
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.
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.
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.
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.
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.
...
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
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?
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?
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!
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?
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).