Jump to content

Recommended Posts

Posted (edited)

 

 

104938722_privatestaticfinalSetBlockEFFECTIVE_ONSets.newHashSet(Blocks_SAND.jpeg.f73fee212cf821bf149906e4ddfc435e.jpeg

 

I'm trying to create my own custom tool class. I'm trying to avoid Registering objects as a pickaxe item, because I want to 

use the effective_on feature to be able to create a pickaxe that breaks dirt, cobblestone, wood, etc..

So I created my own class, Sledge Hammer, that extends ToolItem

 

986639688_Moddingissues.jpeg.80600d4a68805c8bd275423641238c4c.jpeg

 

Then I create my tool Item by registering it as a new Instance of the class I just created. 

 

Tools.jpeg.294d37bab2a77a66320d955a3aa969d0.jpeg\

 

I pass an IItemTier, SLEDGE_HAMMER, which has a harvest level of 3.

 

2050011711_publicenumModItemTierimplementsIItenTier.jpeg.c7ce1d89a992e56eb2b75baf33d583b0.jpeg

 

When I test this, the item shows up as it should, but when I break blocks with a harvest level of 2 or greater I do not receive the drop.

I do receive the drop for blocks with harvest level 1. It does all this despite the IItemTier being defined with a harvest level of 3. 

Obviously I'm doing something wrong and I don't know what at this point. If anyone can point in me in the right direction that would be great.

*What's even weirder is that the attackDamage and maxUses works as I defined it.

Edited by CriscoMods
Posted

Why are you posting text as images? 

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted
1 hour ago, Draco18s said:

Why are you posting text as images? 

new to the site. Posting the image as text was easier to me.

I see the full image on my side.

Do you not see it as an image?

Also do you know what Illegal forge reposting is? I accidentally shared a link to a site doing it on here and had no idea it was bad.

Posted

It's text.... The forum supports text, you can just copy and paste.

You want code formatting, click the <> button. 

 

If there was an issue with your code and I wanted to fix it,  I'd have to completely retype your code if you post an image. You post text I can edit it. 

  • Like 1

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted
23 hours ago, Draco18s said:

It's text.... The forum supports text, you can just copy and paste.

You want code formatting, click the <> button. 

 

If there was an issue with your code and I wanted to fix it,  I'd have to completely retype your code if you post an image. You post text I can edit it. 

oh... makes a bunch of sense. I'll do better next time I post

thanks

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



×
×
  • Create New...

Important Information

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