How to make every custom block independent?

Started by UAPvP on

Topic category: Help with Minecraft modding (Java Edition)

Joined Oct 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to make every custom block independent?
Wed, 01/24/2024 - 18:13 (edited)

Hi guys!
I am new to modding and trying to do End Anchor thing, and I have some problems with making every placed anchor work.
I want to make so every one of them works independently.
Right now I have that problem that only the last one placed is working, and others when clicked just trigger the last placed anchor.
For example: If I place 2 anchors in overworld and click the first one placed the last placed will explode, and if I click again there will be explosion on that place again.
Can you help me/give ideas?
Image of code:
https://imgur.com/HFAhUyp

(ignore blank variables, they contained cords but I deleted them)

Edited by UAPvP on Wed, 01/24/2024 - 18:13
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Again, the 'while' loop is a…
Thu, 01/25/2024 - 13:17

Again, the 'while' loop is a problem. You don't want a looping condition that will never stop; you just want a procedure that will trigger every update tick. (See previous comment.)