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

    • seguridad seguridad
    • I am creating a server with mods but when i try tostart it it say in the logs:   [29Jan2025 20:36:50.715] [main/WARN] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Mod file /server/libraries/net/minecraftforge/fmlcore/1.20.1-47.3.27/fmlcore-1.20.1-47.3.27.jar is missing mods.toml file 159[29Jan2025 20:36:50.717] [main/DEBUG] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Considering mod file candidate /server/libraries/net/minecraftforge/javafmllanguage/1.20.1-47.3.27/javafmllanguage-1.20.1-47.3.27.jar 160[29Jan2025 20:36:50.717] [main/WARN] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Mod file /server/libraries/net/minecraftforge/javafmllanguage/1.20.1-47.3.27/javafmllanguage-1.20.1-47.3.27.jar is missing mods.toml file 161[29Jan2025 20:36:50.718] [main/DEBUG] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Considering mod file candidate /server/libraries/net/minecraftforge/lowcodelanguage/1.20.1-47.3.27/lowcodelanguage-1.20.1-47.3.27.jar 162[29Jan2025 20:36:50.718] [main/WARN] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Mod file /server/libraries/net/minecraftforge/lowcodelanguage/1.20.1-47.3.27/lowcodelanguage-1.20.1-47.3.27.jar is missing mods.toml file 163[29Jan2025 20:36:50.719] [main/DEBUG] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Considering mod file candidate /server/libraries/net/minecraftforge/mclanguage/1.20.1-47.3.27/mclanguage-1.20.1-47.3.27.jar 164[29Jan2025 20:36:50.719] [main/WARN] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Mod file /server/libraries/net/minecraftforge/mclanguage/1.20.1-47.3.27/mclanguage-1.20.1-47.3.27.jar is missing mods.toml file
    • How do you configure the entity reach of a custom weapon? Asking for 1.21 Minecraft parchment
    • This topic is over a year old. If you are having an issue, please read the FAQ for the proper way to post logs, and create your own thread.
    • hello i have been trying to put this specific pack for a while now but ive been hit with a new error everytime. no matter if its a previous version or if i change the pack format it will just not work please help latest log:https://mclo.gs/b6Qra5d <----- this is with pack version 1.20 no changes done to it debug log: https://mclo.gs/jczkfRK
  • Topics

  • Who's Online (See full list)

    • There are no registered users currently online
×
×
  • Create New...

Important Information

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