Im writing in a modded bow ( yes something that hasn't been done before ) and I would like to have the draw back effect, I am not editing in base files and from the looks of it Mojang had the bow's effect hard coded in. does anyone know of a way to get another item to change state(image) over time while its in use?
Take a look at the normal bow file, it has everything you need.
ItemBow does not have the code to change the Icon image while in use :sad.gif:
I wish it was that easy. im trying to change the image as the bow is drawn back.
ItemBow does not have the code to change the Icon image while in use :sad.gif:
I wish it was that easy. im trying to change the image as the bow is drawn back.
Do you know of any way to mimic the effect without editing entityplayer?
Yes, it is in ItemBow
Here, maybe you should just see the code itself
public EnumAction getItemUseAction(ItemStack itemstack)
{
return EnumAction.bow; //THIS CAUSES THE MOTION TO OCCUR
}
public int getMaxItemUseDuration(ItemStack itemstack)
{
return 0x11940;
}
Yes, it is in ItemBow
Here, maybe you should just see the code itself
public EnumAction getItemUseAction(ItemStack itemstack)
{
return EnumAction.bow; //THIS CAUSES THE MOTION TO OCCUR
}
public int getMaxItemUseDuration(ItemStack itemstack)
{
return 0x11940;
}
That works but when used it will mimic the bow pull back textures. So you might have to edit entity player.
That works but when used it will mimic the bow pull back textures. So you might have to edit entity player.
No, it will mimic whatever texture you use with it. Go download v1.9 of my mod and play it on 1.00, the Laser Designator mimics that pull back effect WITH its own texture
You're basing this assumption on coding that was used way back in 1.8, when bow drawback was new
Yes, it is in ItemBow
Here, maybe you should just see the code itself
public EnumAction getItemUseAction(ItemStack itemstack)
{
return EnumAction.bow; //THIS CAUSES THE MOTION TO OCCUR
}
public int getMaxItemUseDuration(ItemStack itemstack)
{
return 0x11940;
}
how do i change which image is being shown during the draw back? currently it will just show the bow being held, shaking slightly then when released the arrow appears out of no where. (hadn't honestly even though of enumaction but since i was directly inheriting from Item bow I had it already)
Thank you all for your help so far... sadly its looking like i will not be able to get it done without base modification... maybe there will be a forge hook later
No, it will mimic whatever texture you use with it. Go download v1.9 of my mod and play it on 1.00, the Laser Designator mimics that pull back effect WITH its own texture
You're basing this assumption on coding that was used way back in 1.8, when bow drawback was new
He doesn't just want the texture to be stretched, he wants it to actually change. The whole arrow appearing further back thing.
I have a tutorial that explains how to do that here but doing it my way means that if you have two of those bows in your inventory, then the textures change on both of them while you draw back your bow.
He doesn't just want the texture to be stretched, he wants it to actually change. The whole arrow appearing further back thing.
I have a tutorial that explains how to do that here but doing it my way means that if you have two of those bows in your inventory, then the textures change on both of them while you draw back your bow.
Couldn't he just go back into the old 1.8.1 coding and find it there? Cause it used to be they used multiple textures rather than the GL11 stretching
And what about animated textures? Have you considered looking at PKs Advanced Modding tutorials? Just throwin ideas out there
Couldn't he just go back into the old 1.8.1 coding and find it there? Cause it used to be they used multiple textures rather than the GL11 stretching
And what about animated textures? Have you considered looking at PKs Advanced Modding tutorials? Just throwin ideas out there
They still use the multiple textures, but it's all handled in EntityPlayer and is only called when rendering the held item (so it doesn't affect your inventory). An animated texture wouldn't really work for render in the world.
He doesn't just want the texture to be stretched, he wants it to actually change. The whole arrow appearing further back thing.
I have a tutorial that explains how to do that here but doing it my way means that if you have two of those bows in your inventory, then the textures change on both of them while you draw back your bow.
thank you VERY much, nice read of your tutorial (admittedly the main thing i was after was being asked here) I didnt even know that items could do onUpdate.
I wish there was a way to not have to update all icons but its better then not ^.^ thank you again.
ItemBow does not have the code to change the Icon image while in use :sad.gif:
I wish it was that easy. im trying to change the image as the bow is drawn back.
That is in entity player.
Do you know of any way to mimic the effect without editing entityplayer?
Yes, it is in ItemBow
Here, maybe you should just see the code itself
That works but when used it will mimic the bow pull back textures. So you might have to edit entity player.
No, it will mimic whatever texture you use with it. Go download v1.9 of my mod and play it on 1.00, the Laser Designator mimics that pull back effect WITH its own texture
You're basing this assumption on coding that was used way back in 1.8, when bow drawback was new
how do i change which image is being shown during the draw back? currently it will just show the bow being held, shaking slightly then when released the arrow appears out of no where. (hadn't honestly even though of enumaction but since i was directly inheriting from Item bow I had it already)
Thank you all for your help so far... sadly its looking like i will not be able to get it done without base modification... maybe there will be a forge hook later
He doesn't just want the texture to be stretched, he wants it to actually change. The whole arrow appearing further back thing.
I have a tutorial that explains how to do that here but doing it my way means that if you have two of those bows in your inventory, then the textures change on both of them while you draw back your bow.
Couldn't he just go back into the old 1.8.1 coding and find it there? Cause it used to be they used multiple textures rather than the GL11 stretching
And what about animated textures? Have you considered looking at PKs Advanced Modding tutorials? Just throwin ideas out there
They still use the multiple textures, but it's all handled in EntityPlayer and is only called when rendering the held item (so it doesn't affect your inventory). An animated texture wouldn't really work for render in the world.
thank you VERY much, nice read of your tutorial (admittedly the main thing i was after was being asked here) I didnt even know that items could do onUpdate.
I wish there was a way to not have to update all icons but its better then not ^.^ thank you again.