Can anyone help now?

Started by Ahmet Enes TAŞÇI on

Topic category: Help with modding (Java Edition)

Last seen on 11:40, 31. Aug 2024
Joined Aug 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Can anyone help now?
Mon, 09/18/2023 - 17:06 (edited)

Hello. I'm working on a wand. This staff is just like a ranged weapon, but it is not in the ranged weapon category. I want this wand to throw a wither head when right clicked under all circumstances. but it's not exactly like that. I want to make my own skull. I know this much: the skulls that Wither fires are not actually full entities. They are built-in parts that sit hidden inside Wither's model's head. When the wither fires, this piece separates from the wither and turns into an entity. The blue skull is just the NBT labeled version of the normal skull. Anyway, how do I make my own head and what procedure do I use to make it move at a constant speed forever, who can help me? I want it to go in the direction I'm looking. my head model: https://ibb.co/68V2Ngz

Edited by Ahmet Enes TAŞÇI on Mon, 09/18/2023 - 17:06
Last seen on 05:10, 3. Dec 2023
Joined Jun 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Your skull model looks…
Mon, 09/18/2023 - 16:13

Your skull model looks really cool. I'm not completely sure how you would be able to animate it though.

There are two ways that I can think of to do this. 

The first, and simpler would be to create the wand as a ranged weapon, and then you can set the model of the projectile to the head model. The only issue here would be that the staff would have a charge on it(click and release like a bow), it wouldn't be just a click(like a snow ball). There is probably a way to do this, you would just have to look at and modify the code (without testing, I'm pretty sure it's the getUseDuration, you can just set it to 0, or possibly remove it). You would then set the "While Projectile Flying Tick" to "Set no Gravity of [Immediate Source Entity] to (true)" - this will keep it flying in a straight line forever. I also added to mine in the tick procedure "If does entity of type [player] exist in [150] square cube = false" "despawn [Immediate Source Entity]" - otherwise if the projectile gets too far out of range, it will end up with a velocity of 0 and just float in the air. The last thing you would need to do is set up a procedure for the "projectile hits block" and "projectile hits entity" - I was able to use the same procedure for both triggers - you can set it to explode, make noise, particles, etc.

The other option would be to create a projectile entity of the skull. Then on your non-ranged wand set up a "when right clicked on entity" summon projectile w/direction of player and velocity of x. You would have to set up similar procedures to the one above to make the projectile do things like fly in a straight line, and explode. I don't have much coding experience, so I'm not completely sure how you would set up/define the projectile entity by itself.

Last seen on 11:40, 31. Aug 2024
Joined Aug 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thank you so much, you are…
Mon, 09/18/2023 - 19:08

Thank you so much, you are the king man >;D