String Return

Started by alpgonjustvi on

Topic category: Help with modding (Java Edition)

Last seen on 07:39, 23. Apr 2024
Joined Apr 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
String Return

I want to return strings like this https://imgur.com/8600qFz
 

But it's allways returning the last one which is "No One". And I'm using this returning to overlay https://imgur.com/TN9KXbe

But the prosedure is running sucsesfully, with out returning.

Last seen on 10:38, 22. Apr 2024
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
The problem then would…
Wed, 04/10/2024 - 14:11

The problem then would probably be the block not correctly saving the NBT data. (If none of the other tests pass, it's going to default to the basic return value.) Since the first test passing would return the owner or someone else, the first test is almost certainly the problem.

It's possible vanilla blocks wouldn't allow you to add an NBT tag they don't normally track? I'm not 100% sure how you'd fix this, but I recommend looking into the NBT stuff. 

Last seen on 07:39, 23. Apr 2024
Joined Apr 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thank you, I'll fix that.
Wed, 04/10/2024 - 18:43

Thank you, I'll fix that.

Last seen on 07:39, 23. Apr 2024
Joined Apr 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
https://imgur.com/9jdydsi…
Wed, 04/10/2024 - 18:47

https://imgur.com/9jdydsi but while I'm testing this type of the prosedure, It's working. The problem is about the returning parts. Do you still thinging that is the problem is about the NBT's?

 

Last seen on 10:38, 22. Apr 2024
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Not totally sure, but you…
Wed, 04/10/2024 - 20:02

Not totally sure, but you probably should be using a logic tag, not a string, if you want to save a true/false value. And getting the display name of a player will probably just return player, not the unique display name of the entity.

I'm pretty sure the issue is still going to be attempting to assign custom NBT strings to a vanilla block? Again, I'm not entirely sure what the issue would be, but I have had problems with this in the past.

Last seen on 07:39, 23. Apr 2024
Joined Apr 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I tried it in a differnt way…
Thu, 04/11/2024 - 20:06

I tried it in a differnt way. I used number returns. 0 = No one, 1 = Someone else, 2 = you. ( https://imgur.com/86UK5zJ ) It worked and I used number returns thing. 

 

Last seen on 07:39, 23. Apr 2024
Joined Apr 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I created a new global…
Thu, 04/11/2024 - 20:06

I created a new global prosedure which is getting the returning number values and it's sending me the values (   https://imgur.com/9N96qzm  ). It's totaly correct. Just I can't use it in my overlay. Also I tried to return the values from the "ChestOwnerValuesGetter"PRCDR with strings but it didn't work again. So I thing the problem is about NBT and String Retrun combinations. You are a donator. I don't know your forge but maybe you can check it and try it the differences. Thank you.