Started by
ninjawizard1234
on
Topic category: Help with Minecraft modding (Java Edition)
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
i will post the procedures again, but basicly what i want is to display a NBT value (number) on the GUI of a Entity
so the fuel burn, i can return it using a item, but for some reason that scapes me, it wont display on the GUI
guys nvm the title its to transfer the nbt from the return procedure to the gui of the entity sorry about the confusion
if the entity returns its value on each tick, how come that value is not avalible for display in text?
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!
is there any way at all do to this on 2023.4? using vars or any other way?
nobody? im stuck on this one for a while now
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
i manage to return the entity NBT on its GUI, finally... i made global vars to pull them, could not find another way
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.
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
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 :)