As you seem to have copied the code from
EntityEnderPearl
, I looked in the
onImpact
method in
EntityEnderPearl
, and I found this:
if (entityplayermp.playerNetServerHandler.func_147362_b().isChannelOpen() && entityplayermp.worldObj == this.worldObj)
What makes you think you can't get the held item client-side? You can get the player using
Minecraft.getMinecraft().thePlayer
and you can get the held item from the player. You just can't modify the held item on the client-side.
1) It is causing a infinite loop because you are calling a method from the method itself.
2) This board is for Minecraft Modding, not a Java school. From the board description:
No you draw in
drawScreen
. You need to count ticks in
updateScreen
and every # ticks, increment the animation and render your animation in
drawScreen
.
He want to generate a structure in an already made world.
@OP, maybe you can use the
WorldEvent.Load
event to generate the structure in the world, and have a boolean to check if it was already generated in the world.