Trying to damage armor with player tick. But i need a itemstack?

Started by Zexmus on Sun, 05/24/2020 - 06:04

Topic category: Help with modding (Java Edition)

Last seen on 03:54, 3. Dec 2020
Joined Feb 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Trying to damage armor with player tick. But i need a itemstack?
Sun, 05/24/2020 - 06:04

Im trying to get this armor to take damage when its in the sun. But i need a itemstack and i dont really know how to add a itemstack

https://imgur.com/a/Fq6xyD2

Last seen on 21:18, 4. Aug 2021
Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
The light level procedure…
Sun, 05/24/2020 - 11:38

The light level procedure block doesn’t really work (at least for me) because my procedure always actives. Just use “Is entity in sun”.

Also, I think itemstack is just a fancy word for item, otherwise I don’t know. Did you try to use the damage procedure? If you did, did it give you an error?

Last seen on 21:17, 28. Jun 2021
Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Just add any code block that…
Sun, 05/24/2020 - 13:03

Just add any code block that contains "provided item" in it. It will automatically add itemstack as a dependency for that procedure, or give you an error that itemstack is not allowed as a dependency.

Last seen on 21:17, 28. Jun 2021
Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
but you're using "on player…
Sun, 05/24/2020 - 13:06

but you're using "on player tick" event trigger, that event does not provide you with an itemstack

Last seen on 03:54, 3. Dec 2020
Joined Feb 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
So can I add a itemstack? or…
Mon, 05/25/2020 - 02:51

So can I add a itemstack? or get a way to get it damaged?

Last seen on 21:17, 28. Jun 2021
Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
you would need to write code…
Mon, 05/25/2020 - 04:37

you would need to write code. do want that?

Last seen on 21:18, 4. Aug 2021
Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Does the “on armor tick”…
Mon, 05/25/2020 - 12:10

Does the “on armor tick” trigger provide you itemstack?

Last seen on 09:40, 5. Aug 2021
Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
or just GLOBAL VAR ITEMSTACK…
Mon, 05/25/2020 - 12:45

or just GLOBAL VAR ITEMSTACK--ARMOR_HEAD_IF_CUSTOM and default:None

WHEN PLAYER SUITS UP WITH THIS ITEM:SET ARMOR_HEAD_IF_CUSTOM TO <PROVIDED_ITEMSTACK>

WHEN PLAYER SUITS DOWN:

SET ARMOR_HEAD_IF_CUSTOM TO <NONE>

 

PS:None means air and if it doesnt work then:

By Trolmaso:

user status when posting this comment:
TIME=UTC +8:00 2020/5/25 20:43
Trolmaso--Active 11 minutes ago--Joined Mar 2020 User points:325 DONATOR

and an IMAGE:

    ----------
     \ .   .  \
      \        \
       |        |
    /  /        |
    --||        |
       /________/
      /   V     \
      /___|______\
Sorry for bad ASCII imaging...


Does the “on armor tick” trigger provide you itemstack?

 

Last seen on 21:18, 4. Aug 2021
Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
That's the best image I have…
Mon, 05/25/2020 - 12:50

That's the best image I have ever seen lol

Last seen on 21:17, 28. Jun 2021
Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
your armor's update tick…
Mon, 05/25/2020 - 19:46

your armor's update tick event does provide you with itemstack

Last seen on 21:18, 4. Aug 2021
Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Then it will work :)
Mon, 05/25/2020 - 19:59

Then it will work :)