I've encountered a really weird problem, and I can't find the solution. I have 2 different tools that I use to add locations to list variable, and the other one would be used to remove location from list variable. BUT this one (if {br.mythic.chest.locations::*} contains {_loc} is not working, even if the block coordinates are exactly the same, even pitch and yaw.
So I made a test event with on break of gold block, and in this one, when all of the code is inside of the same event, it works. Why? I don't understand. And no errors at all, everything else works fine.
So I made a test event with on break of gold block, and in this one, when all of the code is inside of the same event, it works. Why? I don't understand. And no errors at all, everything else works fine.
Code:
#THIS CODE ADDS LOCATION INTO THE LIST VARIABLE
on block place of bedrock:
if world of player is "alkumaailma":
if name of player's tool is "Sijainti LISÄYS työkalu":
#Normaalit arkut
if {BR.adding.loc::%player's uuid%} is "normal":
cancel event
if {br.chest.locations::*} or {br.mythic.chest.locations::*} contains location of event-block:
send "&cTämä sijainti on jo lisätty!" to player
stop
else:
add location of event-block to {br.chest.locations::*}
send "&6%location of event-block% &flisätty arkkujen sijainti ryhmään" to player
#Myyttiset arkut
else if {BR.adding.loc::%player's uuid%} is "mythic":
cancel event
if {br.mythic.chest.locations::*} or {br.chest.locations::*} contains location of event-block:
send "&cTämä sijainti on jo lisätty!" to player
stop
else:
add location of event-block to {br.mythic.chest.locations::*}
send "&6%location of event-block% &flisätty myyttisten arkkujen sijainti ryhmään" to player
#THIS CODE SHOULD BROADCAST "DEBUG2" BUT IT DOES NOT!
on break of ender chest:
if world of player is "alkumaailma":
if name of player's tool is "Sijainnin POISTAMIS työkalu":
if {BR.deleting.single.loc::%player's uuid%} is set:
broadcast "Debug 1"
cancel event
set {_loc} to location of event-block
broadcast "%{_loc}%"
if {br.mythic.chest.locations::*} contains {_loc}:
broadcast "Debug 2" #THIS IS NOT WORKING!
#WHY THIS ONE WORKS?
on break of gold block:
add location of event-block to {locations::*}
broadcast "%{locations::*}%"
set {_loc} to location of event-block
broadcast "%{_loc}%"
if {locations::*} contains {_loc}:
broadcast "working"