Jump to content

[1.12.2] Using TConstruct Tools to chop wood into planks from No Punch Blocks


guicoelho

Recommended Posts

Hello guys. I'm trying to make both of these mods work together, using Hatchets and Lumberaxes to break Wood -> Planks and Planks -> Sticks, so that these tools function the same as the Axe.

 

However, I'm very new to modding and having an insane hard time doing that. What I was able to do was to import the classes from TConstruct so that I can use them on the NPT (No Punch Trees).

 

What I think I need to do is somehow incorporate the tools here:

 

 

com.alcatrezescapee.notreepunching.util

PlayerInteractionHandler.Java

( https://github.com/alcatrazEscapee/no-tree-punching )

Where do I start guys?

 

 

Edited by guicoelho
Link to comment
Share on other sites

3 hours ago, guicoelho said:

What I think I need to do is somehow incorporate the tools here:

No no no no no. Why are you changing that mods code? Do you have permission to do that?

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.

Link to comment
Share on other sites

4 hours ago, Animefan8888 said:

No no no no no. Why are you changing that mods code? Do you have permission to do that?

Because I don't really have an idea on how to do what I said... Also, the source code is available and I'm not really trying to publish a mod or anything, just to be able to use the TConstruct tools with NTP in single player.

Link to comment
Share on other sites

3 minutes ago, guicoelho said:

Because I don't really have an idea on how to do what I said

Firstly proper etiquette don't post code that doesn't belong to you. Yes even if it is on github/open source. The proper thing to do would be to link it to their github.

Secondly do you know Java or any object oriented language similar to Java?

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.

Link to comment
Share on other sites

6 minutes ago, Animefan8888 said:

Firstly proper etiquette don't post code that doesn't belong to you. Yes even if it is on github/open source. The proper thing to do would be to link it to their github.

Secondly do you know Java or any object oriented language similar to Java?

Wow man I really did not knew that, I already edited my OP. Also, I'm familiar with Java but in no way I'm good at it

Link to comment
Share on other sites

Just now, guicoelho said:

Also, I'm familiar with Java but in no way I'm good at it

You'll need to check if the stack.getItem() is an instance of Hatchet and or LumberAxe. Then in the build.gradle file from when you setup your directory you'll need to specify that Tinkers Construct is a dependency of your mod.

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.

Link to comment
Share on other sites

16 minutes ago, Animefan8888 said:

You'll need to check if the stack.getItem() is an instance of Hatchet and or LumberAxe. Then in the build.gradle file from when you setup your directory you'll need to specify that Tinkers Construct is a dependency of your mod.

It's not an instance of Hatchet/Lumberaxe. How could I set that up? I could get the dependency set up. Sorry for all the stupid questions, I feel like a fool using Eclipse :|

Link to comment
Share on other sites

Just now, guicoelho said:

It's not an instance of Hatchet/Lumberaxe.

? If I understand correctly you went and looked at ItemStack#getItem and saw that it returned an Item. You need to check if ItemStack#getItem() instanceof Hatchet/LumberAxe. instanceof is a key word in Java. Look it up if you don't understand it.

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.

Link to comment
Share on other sites

Man, I can't get it to work. I just want to use the Hatchet/Lumberaxe to break log/wood like an axe on NTP. I did not think it would be that hard to make it work... Guess it's beyond my capalities.

 

I even tried making the Pickaxe (from the game) to do it. Didn't work.

Edited by guicoelho
so i dont make a double post
Link to comment
Share on other sites

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.



×
×
  • Create New...

Important Information

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