Event triggered twice

Started by Cdztw on

Topic category: Help with modding (Java Edition)

Last seen on 03:43, 26. Mar 2024
Joined Feb 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Event triggered twice

I got a problem about triggering the event.

This is the procedure, which triggered when the block gets redstone signal (Redstone on)
Basically it reads block's NBT data which stores target block's coordinates, check the target block is a redstone lamp or not, and invert the "lit" boolean property.

I searched on the forums and knowing event will trigger on both client-side and server-side, so I added if statement to make it only runs on server-side, but it still triggered twice.

Can someone help me to solve the problem?

I'm using MCreator 2023.2, and Minecraft version is 1.19.2