Unable to decrease block NBT tags?

Started by CR1MS4NE on Sun, 12/13/2020 - 02:44

Topic category: Help with modding (Java Edition)

Last seen on 20:44, 18. May 2022
Joined May 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Unable to decrease block NBT tags?
Sun, 12/13/2020 - 02:44

It seems I can't cause block number NBT tags to decrease properly. I know I've done this successfully before, but I think I've just made a mistake somewhere and am not aware of it. Basically I'm trying to make a block with a number NBT that will decrease every tick until reaching 0. When an entity collides with it, it should set the cooldown to 100, and then not be able to trigger again until the cooldown is over. That way, standing in the block would cause the collision event to trigger only every 5 seconds. What is happening to me is that colliding with the block does set the value to 100, but it never seems to decrease, which means it can never be reactivated.

Here are my procedures. https://imgur.com/a/ZHhdPrD

 

Print when you increase it,…
Sun, 12/13/2020 - 10:51

Print when you increase it, it could be that a colliding trigger is being triggered.

Last seen on 20:44, 18. May 2022
Joined May 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
I already have it being…
Sun, 12/13/2020 - 14:42

I already have it being printed. In the console the value appears to stay at 100 without decreasing.

I meant to print all cases…
Mon, 12/14/2020 - 07:53

I meant to print all cases where you set or increase it. Probably on collide event

Last seen on 20:44, 18. May 2022
Joined May 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
I'm printing everything I…
Wed, 12/16/2020 - 01:22

I'm printing everything I can now, I'm not seeing what's going wrong. It seems like the collision event triggers but once the player steps off the plant, it stops doing anything. The cooldown just stays at 100.

Last seen on 00:04, 1. Apr 2022
Joined Mar 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
I understand the problem you…
Fri, 03/11/2022 - 04:18

I understand the problem you were having as this issue is also happening to me. I have a simple procedure that when projectile hits living entity, set nbt number to 1, when hit with another projectile, set nbt to 2. I have set up a timer so that after 15 seconds set nbt to 0, but it wont work. the entity's nbt remains 2. I have tried many different procedures to try and "zero" my nbt value and nothing is working aside from hitting the entity with another projectile that sets nbt to 0. 

The same is occurring with players, me being the test subject. It seems nbt values have no problem increasing but will not decrease when set to decrease. Maybe its because im using a timer "on player tick update" but i have been working on this for hours and cannot figure it out.

Last seen on 00:04, 1. Apr 2022
Joined Mar 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Sorry to post yet again so…
Fri, 03/11/2022 - 04:20

Sorry to post yet again so quickly, but also for the entity i have a timer set for "entity tick update" as well. so thats not the problem either.