Workaround for itemstack and keybinds

Started by MojangModCreator on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jan 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Workaround for itemstack and keybinds

I'm trying to make a scythe with an ability which does damage relative to the amount of sharpness you have on the item. I try to do this with a keybind yet I can't cause of me not being able to use itemstack with keybinds. Is there any workarounds for this?

 

Joined Jan 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Another thing, I cannot even…
Fri, 10/25/2024 - 13:18

Another thing, I cannot even make this because I need it to detect if the person has the scythe in their hand and cannot do that because keybinds do not allow itemstacks.

Joined Jan 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I can't, it's an itemstack…
Fri, 10/25/2024 - 14:56

I can't, it's an itemstack and you can't use them in keybinds.

Joined Dec 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Seems like you can…
Fri, 10/25/2024 - 15:00

Seems like you can........... I just used it like this,

Joined Jan 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
ohhh my bad but I still need…
Fri, 10/25/2024 - 15:07

ohhh my bad but I still need help with the sharpness thing. Do you have any solutions for that? Thanks by the way.

 

Joined Jan 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
If you sent an image, I can…
Fri, 10/25/2024 - 15:17

If you sent an image, I can't see it. Did you figure out how to?

Joined Jan 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Yeah, that's the problem. If…
Fri, 10/25/2024 - 21:28

Yeah, that's the problem. If I try to put that into my procedure and then try run it via a keybind, it wont let me as it doesn't allow things with provided itemstack.

Joined Apr 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Different colored procedure…
Fri, 10/25/2024 - 21:48

Different colored procedure blocks that are linked together, such as the item part of the enchantment level block, can be separated and replaced with other blocks.

You can remove 'provided itemstack' from 'get level of enchantment sharpness of provided itemstack' then you can replace it with 'item in main hand of event/target entity'

Then you won't have the problem of the provided itemstack dependency being missing.

Joined Jan 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thank you so much, this…
Sat, 10/26/2024 - 15:12

Thank you so much, this works perfectly. Kind of dumb I didn't think of this before.