We've split up the commands, scripting and mods, and add ons category! Please be sure you get your thread in the right place.

409

Edit Player NBT

27 Comments

Please sign in to leave a comment.

Sorted by oldest
  • 5
    Registered User commented
    Comment actions Permalink

    To clear up any confusion, when I say "it might have been rejected before" I mean that maybe the Mojang team had thought of it and rejected it, I did make sure to check for identical posts and rejected ideas similar to this before posting and found nothing.

  • 9
    Registered User commented
    Comment actions Permalink

    I'd like to see this feature in the game too, but there's a reason why it'll very likely never become reality.
    If you change the player's health through survival elements, such as instant damage, the game will be notified of that, and update health bars, scoreboard objectives, etc.
    If you change it through NBT, there's no way of telling the game when it happens, unless it updates everything whenever you change a tiny bit of data. This could lead to performance issues, or desynchronization between the client (the players' devices) and the server.
    That's only my explanation, though. It might be inaccurate, but why wouldn't they add that feature then?

  • 6
    Registered User commented
    Comment actions Permalink

    I mean a players nbt is actually handled by client so it wouldn't link correctly to server but if the player data was handled by the server than it would probably fix a lot of minecraft's client to server de-sync issues but what issues this would create is unclear.

  • 4
    Registered User commented
    Comment actions Permalink

    I agree that the reason why you cannot do it already is likely due to desynchronization between client and server.

    Maybe allow nbt editing of just the inventory at the very least, as that would open up a lot more possibilities for maps/datapacks, such as changing the lore of an item in the player's inventory while keeping the stack size, and not having to cycle through all 64 of the possible stack sizes to use /replaceitem

  • 9
    Registered User commented
    Comment actions Permalink

    The desynchronization problem could simply be fixed by them making it sync when such a command is ran, sure when used too much it would cause lag but I do not see that as much of a problem, overuse any command and it will cause lag, also server plugins edit NBT data all the time, however they are doing it they have it work just fine, Mojang could do the same thing.

  • 6
    Registered User commented
    Comment actions Permalink

    Dinnerbone said "The whole idea behind editing NBT isn't that you're editing the entity, or the item, or the block - you're saving it, editing the save data, and loading it again. NBT isn't what we are using in memory, we have more efficient in-memory structures for things. It's 100% just save data." and modifying player data would have to kick the player out then reconnect them. 

  • 7
    Registered User commented
    Comment actions Permalink

    My point is that server plugins can do it, so Mojang could find a way to do it too

  • 10
    Registered User commented
    Comment actions Permalink

    Wow, a suggestion in this category that isn't bad (seriously kids stop asking for /fly and other fraction server crap!),

    this would be great for custom games (pvp, pve, adventure, etc.)! this deserves more votes.
    and maybe just things like heath, damage, speed, maybe even custom values!

  • 1
    Registered User commented
    Comment actions Permalink

    the issue with destroying the player and disconnecting could be solved by creating a copy of that player and then setting the net id to it and THEN destroy the old player in the same frame.

    and then you have edited player nbt data.

  • 6
    Registered User commented
    Comment actions Permalink

    This would be great! /data merge entity @p {Motion:[0.0,1.0,0.0]} would be amazing!

  • 3
    Registered User commented
    Comment actions Permalink

    Even if the tags we could modify were restricted to things like fire ticks, inventory, etc. it would be worth it. We don't need to be able to set our flying speed and stuff.

  • 18
    Registered User commented
    Comment actions Permalink

    This deserves way more votes than it currently has.

    Mapmakers and Data Pack creators would be GODS.

    The only issue I could think of would be lag, but there are already many commands that lag the game anyway. The persons utilizing this would-be feature would need to understand the risks and optimize their commands, much like a real programmer.

    Just imagine what we could do if we could directly manipulate player motion and acceleration.

  • 6
    Registered User commented
    Comment actions Permalink

    This was rejected before because it doesn't align with Dinnerbone's agenda. Player inventory editing via direct NBT manipulation was in the game at one point, was fully functioning but was marked as a "bug" and removed later, even though it was working perfectly fine. From Dinnerbone's perspective, NBT is like "saving", but from a user's perspective NBT is more of the current state of something, not like saving it. To solve desync issues, you would just need to send the different NBT to the client, which could then merge it with its client-side NBT to produce the correct NBT. Then the player would just have to be updated to match that.

  • 5
    Registered User commented
    Comment actions Permalink

    We would rule over our players, i love it
    For real I had so many problems with my health/regen datapack due to being unable to touch neither foodLevel, foodExhaustionLevel, foodSaturationLevel. I had to give up on my original idea and make a compromise with like, potion effects, which is just crude really

  • 5
    Registered User commented
    Comment actions Permalink

    Seeing as how this used to be in the game and was removed with basically a check to see if the entity whose data you're trying to modify is a player, this would likely be incredibly easy to implement. As such, considering how incredibly useful this would be to map makers and server admins, and how it would eliminate the need for plugins in order to do certain things, I think that Mojang should at least try this out again, and if it works well, implement it entirely. I would be very glad to see this readded.

  • 2
    Registered User commented
    Comment actions Permalink

    How doesn’t this have more votes?!

  • 3
    Registered User commented
    Comment actions Permalink

    Please add to this: Also the ability to more easily detect right clicks with certain items

  • 1
    Registered User commented
    Comment actions Permalink

    YES. I mean, it's unlikely to become a reality, but still. What I'm really gunning for is NBT crafting. That would be huge.

  • 1
    Registered User commented
    Comment actions Permalink

    I can't be cause of security problems.

  • 1
    Registered User commented
    Comment actions Permalink

    I can't be cause of security problems.

     

    But what security problems? we can already see all of the nbt

  • 1
    Registered User commented
    Comment actions Permalink

    We need M O R E votes!!!

  • 0
    Registered User commented
    Comment actions Permalink

    would be very pog indeed

  • 0
    Registered User commented
    Comment actions Permalink

    Some NBT might stay locked ( like UUID , Health ... ) But for health they needs to add a new command
    "/sethealth" so this could actualy update health nbt with a value

  • 0
    Registered User commented
    Comment actions Permalink

    the thing is that there wouldnt even be a problem with lag bcs the system already works on mobs. you can easily change the health of a mob and it updates + it is already in the game meaning we have prove that it doesnt cause lag. this needs more votes tbh. this would be such a great thing to have as a mapmaker myself and i can only dream of all the things u can do with it. well... thats kinda all i have to say, hope this becomes reality one day.

  • 0
    Registered User commented
    Comment actions Permalink

    This is such a good idea :)

  • 0
    Registered User commented
    Comment actions Permalink

    DO IT

  • 0
    Registered User commented
    Comment actions Permalink

    This idea is fantastic, though Mojang probably won't add it because it gives players a little too much freedom and discourages the need to actually learn real coding. Normal vanilla mechanics at a grand scale just cause a lot of lag when things become super complex.