Throwable Axe (ranged items)

Started by Max094_Reikeb on

Topic category: Help with MCreator software

Last seen on 13:50, 6. Apr 2024
Joined Jun 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Throwable Axe (ranged items)

Hi!
I need some help with a throwable axe I made...
I created a new ranged item (as an axe) and the amo is itsef but the problem is that it's not acting like an arrow : the axe doesn't stay on the ground once we throw it, until we get it back (like an arrow I said) but it diseappears! Is there a way to fix it?

Last seen on 01:34, 21. May 2020
Joined Sep 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I can fix that. You will…
Thu, 03/05/2020 - 09:53

I can fix that. You will have to look a bit at the coding but it isn't hard. Find the javascript of the item, scroll down and find a part like this:

	this.remove();

Delete that and it will not despawn the arrow when it hits the ground, this will not allow you to pick it back up but it will make it stay there. I will try and make it so that you can pick it back up but you will have to give me a while

 

Thanks,

Shadow

Last seen on 13:50, 6. Apr 2024
Joined Jun 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Okay, thx very much, anyway,…
Thu, 03/05/2020 - 10:01

Okay, thx very much, anyway, I'll release first version of the mod after MCreator 2020.2 is done, so of course I'll give you time to help me :)

Last seen on 01:34, 21. May 2020
Joined Sep 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I am not certain that that…
Thu, 03/05/2020 - 10:09

I am not certain that that will fully work, but I am testing everything and will do my best

 

Thanks,

Shadow

Last seen on 13:50, 6. Apr 2024
Joined Jun 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Oh, and also, I didn't find…
Thu, 03/05/2020 - 10:13

Oh, and also, I didn't find your code but I found this so I guess it's the same...

if (this.inGround) {
	this.world.removeEntity(this);
}

I'll test if removing this code works...

Last seen on 13:50, 6. Apr 2024
Joined Jun 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Waw man, it works, and there…
Thu, 03/05/2020 - 10:18

Waw man, it works, and there's a weird thing : I can get the axe back, but if I do, I get an arrow back, not the axe itself sooo... Is there a way to fix it?

Last seen on 01:34, 21. May 2020
Joined Sep 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Ok, from the code I can tell…
Thu, 03/05/2020 - 10:25

Ok, from the code I can tell you are using 1.12.2 right?

Last seen on 13:50, 6. Apr 2024
Joined Jun 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Yes I am. Now, the only…
Thu, 03/05/2020 - 10:27

Yes I am. Now, the only thing I have left to do is to change the arrow I get back into the throwing axe. Do you know if I can setup some kind of durability so when we throw the axe, it looses a bit of it? (and eventually breaks at the end?)

Last seen on 13:50, 6. Apr 2024
Joined Jun 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Oh and I forgot to say, we…
Thu, 03/05/2020 - 10:29

Oh and I forgot to say, we need to get the throwing axe back WITH enchants if it has some and the modified name if it has one too!

Last seen on 01:34, 21. May 2020
Joined Sep 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
hmm, unfortunately I am not…
Thu, 03/05/2020 - 10:31

hmm, unfortunately I am not sure how to do that, maybe by getting the NBT tags of the item first? not entirely sure, I also don't have much time before I will go to bed (it's late here)

 

 

Last seen on 13:50, 6. Apr 2024
Joined Jun 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Yeah I get it, as I said,…
Thu, 03/05/2020 - 10:34

Yeah I get it, as I said, take your time, I'll not release the mod until next MCreator update because I need vines stuff

Last seen on 03:10, 19. Feb 2022
Joined Jun 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
maybe despawn the bullet on…
Thu, 03/05/2020 - 10:34

maybe despawn the bullet on a block and summon a dropped item of the arrow?