Please help.
I have been having problems with my mod. They are potion effects that are given, it is not the keybinding it is in the "onTickInGame" method.
Some effects work and others don't, the ones that dont are; damageBoost, Regeneration, Resistance, Fire Resistance and Invisiblility.
I saw you said that this is the way to initialize "(EntityPlayer) entity;" the entityplayer. But I can't manage to do it with my code, im using forge.
CODE:
You say youre using forge but all that code is modloader. Use a tickhandler and I dont think you can apply potions to the client version of the player(mc.theplayer) you need an instance of EntityPlayer
You can do it through the client, but the problem is that i need the 'EntityPlayer par3EntityPlayer = ModLoader.getMinecraftInstance().thePlayer();' to look like this, 'EntityPlayer par3EntityPlayer = (EntityPlayer)par4Entity;' problem is that I would have to give par4Entity a value, which if I do so, it is the same as before, and i don't know how to get around that. The only way I know of is to put it as a parameter in the function. which I can't do because then 'BaseMod.class' won't recognise it as the 'onTickInGame()' function.
Firstly let me say that if you are using forge, then dont use modloader and dont use extends basemod as you WILL have problems with your mod, compatibility and you will have unsolvable issues.
In forge you can REGISTER your tickhandler and it will be recognized, also in your tickhandler you have modloader.......
use minecraft.getinstance() instead. you will have an error on minecraft all you need to do is add the field public Minecraft minecraft; and that will go away. There is always a way around the modloader functions, just ask if you can not find them. Here and Forge forums is a good place for asking those questions, and dont bump all the time if you are not getting the answer as fast as you want, be patient...
I have been having problems with my mod. They are potion effects that are given, it is not the keybinding it is in the "onTickInGame" method.
Some effects work and others don't, the ones that dont are; damageBoost, Regeneration, Resistance, Fire Resistance and Invisiblility.
I saw you said that this is the way to initialize "(EntityPlayer) entity;" the entityplayer. But I can't manage to do it with my code, im using forge.
CODE:
all the ones with "//" are the ones that dont work.
Thanks
-Regards
marko5049
You can do it through the client, but the problem is that i need the 'EntityPlayer par3EntityPlayer = ModLoader.getMinecraftInstance().thePlayer();' to look like this, 'EntityPlayer par3EntityPlayer = (EntityPlayer)par4Entity;' problem is that I would have to give par4Entity a value, which if I do so, it is the same as before, and i don't know how to get around that. The only way I know of is to put it as a parameter in the function. which I can't do because then 'BaseMod.class' won't recognise it as the 'onTickInGame()' function.
In forge you can REGISTER your tickhandler and it will be recognized, also in your tickhandler you have modloader.......
use minecraft.getinstance() instead. you will have an error on minecraft all you need to do is add the field public Minecraft minecraft; and that will go away. There is always a way around the modloader functions, just ask if you can not find them. Here and Forge forums is a good place for asking those questions, and dont bump all the time if you are not getting the answer as fast as you want, be patient...
Find out how I generate....coolAlias...world structure generation and rotation tool...