MouseEvent is client-only, so you can use the stuff from the Minecraft class. It has fields for the player (
thePlayer
), the world (
theWorld
) and also the block the mouse is currently over (
objectMouseOver
).
Explanation from diesieben07 for partialTickTime: http://www.minecraftforge.net/forum/index.php/topic,12681.msg65852.html#msg65852.
In your case, because you don't have a partialTickTime available, you can just use 1.0F as the partialTickTime. And yes, you are right about the distance.
If you have missing textures, look at the logs, it shows what Minecraft is searching for instead and may help you figure out the issue. If you can't figure out why, post the logs, so we can help.
1) You have to pass the coordinates of the entity in the constructor too, or else the entity will be at 0,0,0.
2) Only set the block to air on the server (!world.isRemote), and see if that helps.
Your if-chain (why no switch?) is falling back to this line:
return new FCGuiContainer(player);
, which means not of your if-statements are true, so the ID must be incorrect. Show where you open your gui.
Which always makes me wondering: why does the getServerGuiElement
allows you to return basically anything (a
Object
), and not an instance of
Container
by just changing the return type to
Container
(same goes for
getClientGuiElement
)?
I'm sorry, I don't speak ass hole.
The float was just me trying to figure out why it was crashing; It was initially set to int.
As for the other stuff that’s me coding at 11 o'clock at night. I know Java to a degree but I can't figure out what I need to do with certain things. Such as instantiation. I'm still learning what needs to be instantiated and what doesn't.
What the heck is a TESR? Tessellator?
Thanks for the help.
If you do not know how to initialize a variable in Java, you don't even know one of the most basic things in Java, and you really shouldn't mod Minecraft. So:
Do you have that in the ClientProxy? If not, you should.
Just a FYI, I was having some problems with custom state mappers to0, and I couldn't figure it out too...
Do you think telling us that you want to update and giving a piece of code would help? Tell us what the exact problem is, and where that problem is. So not someting like 'I want to update! Please fix my code for me!', but full, proper english sentences that makes us understand the problem so we can actually help you.
Then post code where it is registered...
Look at his main mod file. He doesn't actually register any renderers, but he cancels the vanilla rendering and renders his own instead.