I wanna make throwable swords, which take the texture of the Sword the Player is holding. Can anyone explain me how to make item-based entities that behave like a thrown Sword? or, if this is not possible to create sword-like entities that use a pre-made texture? (I know how to color the entity so that wouldn't be the problem)?
If you are interested you can take a look on what i have so far:
I believe arrows are using an actual model when in flight. When the ender pearl is rendered it renders the image on the screen to face the player that is looking at it. You will either need to make a model for the sword entity or a custom renderer that compares the position of the player looking at it with the direction the sword is traveling and rotate the image about the y axis accordingly.
Rollback Post to RevisionRollBack
"If It Is To Be It Is Up To Me" simple quote and I don't know where it comes from but I enjoy it.
Current Mod: Armerger | Light Drafter
[!PLEASE DELETE THIS THREAD!]
Hello,
I wanna make throwable swords, which take the texture of the Sword the Player is holding. Can anyone explain me how to make item-based entities that behave like a thrown Sword? or, if this is not possible to create sword-like entities that use a pre-made texture? (I know how to color the entity so that wouldn't be the problem)?
If you are interested you can take a look on what i have so far:
Render Class
Entity Class
Item Class
(complete src)
You will need a separate class that extends EntityThrowable. I recommend taking a look at EntityEnderPearl and ItemEnderPearl in net.minecraft.
Current Mod: Armerger | Light Drafter
I already did, but i don't want the entity to turn towards the player, and it should also rotate durin flight.
Maybe you could help me with using the Arrow Entity for this? Arrows are the only entities I know about that do NOT face the player.
I believe arrows are using an actual model when in flight. When the ender pearl is rendered it renders the image on the screen to face the player that is looking at it. You will either need to make a model for the sword entity or a custom renderer that compares the position of the player looking at it with the direction the sword is traveling and rotate the image about the y axis accordingly.
Current Mod: Armerger | Light Drafter
ok, I'll try that.
So far, I got it almost working, but the thrown Sword is invisible
Here's my Rendering Code:
Render Class
Entity Class
Item Class
I'm sure I missed something in the rendering, but I have no idea what it is...
hello? still there?
Anyone?
Bump
Frankly i suck at everything to do with rendering but you should be ablly to do a matrix push, do your two rotations call super then pop the matrix.
Current Mod: Armerger | Light Drafter
The problem is that the entity is still invisible after doing the rendering.. :/
Look in the arrow renderer
My mods
#StopModReposts
I did, but still the entity is invisible. Do you know any tutorials for rendering entities from items (RenderItem class didn't help)?
Everything I've found is outdated since 1.8.9 != 1.8
Bump ...