Tranfer NBT numbers from entity to 'OnPlayerUpdate' procedure (2023.4)

Started by ninjawizard1234 on

Topic category: Help with Minecraft modding (Java Edition)

Joined Nov 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Tranfer NBT numbers from entity to 'OnPlayerUpdate' procedure (2023.4)

im trying to make my vehicle fuel system, but i cant make the procedure 'OnPlayerUpdate'' get the values from the entity (horse) entity, someone told me it would work on 2023.4 but no luck so far, not only that but on 2023.3 the 'OnPlayerUpdate' event use to regonize the NBTs, now they wont lol not sure what i do now

Joined Nov 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
i will post the procedures…
Fri, 12/29/2023 - 03:19

i will post the procedures again, but basicly what i want is to display a NBT value (number) on the GUI of a Entity

Joined Nov 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
so the fuel burn, i can…
Fri, 12/29/2023 - 03:30

so the fuel burn, i can return it using a item, but for some reason that scapes me, it wont display on the GUI

Joined Nov 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
guys nvm the title its to…
Fri, 12/29/2023 - 04:41

guys nvm the title its to transfer the nbt from the return procedure to the gui of the entity sorry about the confusion

Joined Nov 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
if the entity returns its…
Fri, 12/29/2023 - 08:56

if the entity returns its value on each tick, how come that value is not avalible for display in text?

Joined Nov 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
klemens if you read this;…
Sat, 12/30/2023 - 00:18

klemens if you read this; remember you told me this was possible on 2023.4 ? i cant understand what i did wrong lol, could u help ? thanks!

Joined Nov 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
is there any way at all do…
Thu, 01/04/2024 - 01:30

is there any way at all do to this on 2023.4? using vars or any other way?

Joined Nov 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
nobody? im stuck on this one…
Thu, 01/04/2024 - 15:40

nobody? im stuck on this one for a while now

Joined Nov 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
just an update; i made it…
Sat, 01/06/2024 - 10:19

just an update; i made it work using 'Get Entity of Type on area x y z' but since its a NULL marked procedure it crashes the game sometimes when i acess the GUI. still looking for a solution here, i also notice that on 'PlayerUpdate' you cant call this NBT from the creature you are Riding, any help here is greatly apreaciated

Joined Nov 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
i manage to return the…
Mon, 01/08/2024 - 00:35

i manage to return the entity NBT on its GUI, finally... i made global vars to pull them, could not find another way

Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Hah, something I can help…
Mon, 01/08/2024 - 09:42

Hah, something I can help with. So, Where does it call for the return procedure? Are you calling it from the GUI procedure? I'm going to assume you are, but I would need to see what you have done to help you well. NBT data is recorded separately for server side and client side. You can use a global variable as a buffer between the two, but since MCreator doesn't support Array variables (unless it does now, my version its kind of old) so you need to make sure its never going to be given a number from two or more sources in a single tick, it will break everything. An example is two players opening a different instance of the the same inventory, A single Global Variable Won't be able to do that. I need to know more information to help you any further, as I have no idea how you have set this up.

Joined Nov 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
no im calling from right…
Mon, 01/08/2024 - 10:09

no im calling from right click, this way i can target the entity to return the NBT and turn into a global :)

it wont update the NBT live while the gui is open but updates every time you click on the entity, to ride or open GUI

i dont think u can call it live while the GUI is open thou but im not sure how much i need this detail

Joined Nov 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
if anybody else wants i…
Mon, 01/08/2024 - 10:12

if anybody else wants i could post these procedures, i just use a single Global Var (global map) and the entity number NBT, but since i made a visual fuel tank too, i had to make a second global, EntityMaxFuel, so i can use the same 10 Returns procedures for all vehicle entities, and display the fuel amount on a tank png on the GUI :)