Jump to content

[1.15.2] Add CoolDown Capibility to custom Sword


andrepascoa

Recommended Posts

Hi! I'm building a simple sword where it should count to 5 once every hit and once it hits five starts a cooldown! that logic is still not implemented because I'm having problems saving data inside the ItemStack of the sword in the form of a capability! here's my code, All it does is give me this error Execution failed for task ':runClient', but if I remove the initCapability function inside DickSword.java it doesn't give any error!

https://github.com/MisterProgrammer/DickMod/blob/master/src/main/java/com/example/DickMod/DickMod.java

https://github.com/MisterProgrammer/DickMod/blob/master/src/main/java/com/example/DickMod/ForgeEventSubscriber.java

https://github.com/MisterProgrammer/DickMod/blob/master/src/main/java/com/example/DickMod/objects/items/DickSword.java

https://github.com/MisterProgrammer/DickMod/blob/master/src/main/java/com/example/DickMod/capabilities/CoolDownCapability.java

https://github.com/MisterProgrammer/DickMod/blob/master/src/main/java/com/example/DickMod/capabilities/interfaces/ICoolDown.java

https://github.com/MisterProgrammer/DickMod/blob/master/src/main/java/com/example/DickMod/capabilities/instances/CoolDown.java

Edited by andrepascoa
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.

Announcements



×
×
  • Create New...

Important Information

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