Jump to content

[1.12.2] Creating a throwable item that sticks in the ground, like an arrow


Recommended Posts

Posted (edited)

I'm trying to create a throwable item that sticks in the ground and can be picked up, like an arrow. However, when I right click the item in-game, it catches an exception, saying that the constructor that I'm calling in my Item class doesn't exist in my entity class, even though it does. Any help?

 

Log: https://pastebin.com/yw3i0wsq

Entity class: https://github.com/TheSlayerMC/Journey-1.12/blob/86e5e7f2b7c3c6c7975d9e0b48e33e4a64a1c20b/main/java/net/journey/entity/projectile/EntityCharredKnife.java

Item class: https://github.com/TheSlayerMC/Journey-1.12/blob/86e5e7f2b7c3c6c7975d9e0b48e33e4a64a1c20b/main/java/net/journey/items/ItemThrowableArrow.java

Item registry: https://github.com/TheSlayerMC/Journey-1.12/blob/master/main/java/net/journey/JourneyItems.java#L1462

 

Example of a throwable item that does work:

 

Entity class: https://github.com/TheSlayerMC/Journey-1.12/blob/master/main/java/net/journey/entity/projectile/EntityCorbaPiercer.java

Item class: https://github.com/TheSlayerMC/Journey-1.12/blob/master/main/java/net/journey/items/ItemPiercer.java

Edited by Dizzlepop12
Posted
28 minutes ago, Dizzlepop12 said:

Any help?

For one EntitySizzlingKnife is an abstract class.

And it doesnt contain a constructor World, EntityLivingBase, float, int

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Posted
8 minutes ago, Animefan8888 said:

For one EntitySizzlingKnife is an abstract class.

And it doesnt contain a constructor World, EntityLivingBase, float, int

That's because I started with the EntityCharredKnife class first as a test, the rest of the knife entity classes are older versions and don't have the same code. If you look at the EntityCharredKnife class, it's not abstract and it does contain the correct constructor, and that's the one I tested it with.

Posted
1 minute ago, Dizzlepop12 said:

That's because I started with the EntityCharredKnife class first as a test, the rest of the knife entity classes are older versions and don't have the same code. If you look at the EntityCharredKnife class, it's not abstract and it does contain the correct constructor, and that's the one I tested it with.

Not according to the crash report.

"net.journey.entity.projectile.EntitySizzlingKnife.<init>(net.minecraft.world.World, net.minecraft.entity.EntityLivingBase, float, int)"

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Posted
4 minutes ago, Animefan8888 said:

Not according to the crash report.

"net.journey.entity.projectile.EntitySizzlingKnife.<init>(net.minecraft.world.World, net.minecraft.entity.EntityLivingBase, float, int)"

Ohh you right, when I use the charred knife it doesn't throw any kind of exception, it just doesn't do anything.

Posted
13 minutes ago, Dizzlepop12 said:

Ohh you right, when I use the charred knife it doesn't throw any kind of exception, it just doesn't do anything.

Step through it with your IDEs debugger and you'll be able to confirm if it is being spawned at all, or if it is rendering at all.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • UPDATE: this seems to be an Arch-specific issue. Switching to Ubuntu server fixed EVERYTHING.
    • Yes, Attapoll offers a $20 Sign-up bonus for new users using a code (AOVCQ). Enter the Attapoll Referral Code “AOVCQ” and submit. Yes, Attapoll offers $20 Referral Code {AOVCQ} For New Customers. If you are who wish to join Attapoll, then you should use this exclusive Attapoll referral code $20 Signup Bonus Use this Code (AOVCQ) and get $20 Welcome Bonus. You can get a $20 Signup bonus use this referral code {AOVCQ}. You can get a $20 Attpoll Referral Code {AOVCQ}. This Attapoll $20 Referral code is specifically for existing customers and can be redeemed to receive a $20. Enter $20 Attapoll Referral Code {AOVCQ} at checkout. Enjoy $20Welcome Bonus. Use the best Attapoll referral code $20 (AOVCQ) to get up to $20 first time survey as a new user. Complete the survey and get $20 credited on your Attapoll account. Plus, refer your friend to earn 10% commission on their earning If you're on the hunt for a little extra cash or some cool rewards without too much hassle, you've landed in the right place. Today, we're diving into the world of Attapoll referral codes, a nifty way to boost your earnings while taking surveys. Use this Attapoll Referral Link or code {{AOVCQ}} to get a $20 sign up bonus.
    • Yes, Attapoll offers a $20 Sign-up bonus for new users using a code (AOVCQ). Enter the Attapoll Referral Code “AOVCQ” and submit. Yes, Attapoll offers $20 Referral Code {AOVCQ} For New Customers. If you are who wish to join Attapoll, then you should use this exclusive Attapoll referral code $20 Signup Bonus Use this Code (AOVCQ) and get $20 Welcome Bonus. You can get a $20 Signup bonus use this referral code {AOVCQ}. You can get a $20 Attpoll Referral Code {AOVCQ}. This Attapoll $20 Referral code is specifically for existing customers and can be redeemed to receive a $20. Enter $20 Attapoll Referral Code {AOVCQ} at checkout. Enjoy $20Welcome Bonus. Use the best Attapoll referral code $20 (AOVCQ) to get up to $20 first time survey as a new user. Complete the survey and get $20 credited on your Attapoll account. Plus, refer your friend to earn 10% commission on their earning If you're on the hunt for a little extra cash or some cool rewards without too much hassle, you've landed in the right place. Today, we're diving into the world of Attapoll referral codes, a nifty way to boost your earnings while taking surveys. Use this Attapoll Referral Link or code {{AOVCQ}} to get a $20 sign up bonus.
    • Yes, Attapoll offers a $20 Sign-up bonus for new users using a code (AOVCQ). Enter the Attapoll Referral Code “AOVCQ” and submit. Yes, Attapoll offers $20 Referral Code {AOVCQ} For New Customers. If you are who wish to join Attapoll, then you should use this exclusive Attapoll referral code $20 Signup Bonus Use this Code (AOVCQ) and get $20 Welcome Bonus. You can get a $20 Signup bonus use this referral code {AOVCQ}. You can get a $20 Attpoll Referral Code {AOVCQ}. This Attapoll $20 Referral code is specifically for existing customers and can be redeemed to receive a $20. Enter $20 Attapoll Referral Code {AOVCQ} at checkout. Enjoy $20Welcome Bonus. Use the best Attapoll referral code $20 (AOVCQ) to get up to $20 first time survey as a new user. Complete the survey and get $20 credited on your Attapoll account. Plus, refer your friend to earn 10% commission on their earning If you're on the hunt for a little extra cash or some cool rewards without too much hassle, you've landed in the right place. Today, we're diving into the world of Attapoll referral codes, a nifty way to boost your earnings while taking surveys. Use this Attapoll Referral Link or code {{AOVCQ}} to get a $20 sign up bonus.
    • Yes, Attapoll offers a $20 Sign-up bonus for new users using a code (AOVCQ). Enter the Attapoll Referral Code “AOVCQ” and submit. Yes, Attapoll offers $20 Referral Code {AOVCQ} For New Customers. If you are who wish to join Attapoll, then you should use this exclusive Attapoll referral code $20 Signup Bonus Use this Code (AOVCQ) and get $20 Welcome Bonus. You can get a $20 Signup bonus use this referral code {AOVCQ}. You can get a $20 Attpoll Referral Code {AOVCQ}. This Attapoll $20 Referral code is specifically for existing customers and can be redeemed to receive a $20. Enter $20 Attapoll Referral Code {AOVCQ} at checkout. Enjoy $20Welcome Bonus. Use the best Attapoll referral code $20 (AOVCQ) to get up to $20 first time survey as a new user. Complete the survey and get $20 credited on your Attapoll account. Plus, refer your friend to earn 10% commission on their earning If you're on the hunt for a little extra cash or some cool rewards without too much hassle, you've landed in the right place. Today, we're diving into the world of Attapoll referral codes, a nifty way to boost your earnings while taking surveys. Use this Attapoll Referral Link or code {{AOVCQ}} to get a $20 sign up bonus.
  • Topics

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.