Posted May 21, 20205 yr For reference, here's a link to my repo. I am adding "mercury poisoning" to the game. Starting from when the player grabs an item under the tag "vanauto:contains_mercury", every 20 seconds, they have a chance of receiving the poison effect for 10 seconds. I plan on doing this by storing an NBT tag on the player: "LastHgAcquisition", which is then used to calculated whether to tick the player or not. The problem is, I'm not sure if this is good practice, since NBT is usually managed by capabilities, and adding an entire capability like "CanHgPoisonCapability" seems kinda clunky. Is there a simpler way to track these sorts of things? Note: stackable items need to stay stackable. Edited May 21, 20205 yr by superminerJG Made the title more clear.
May 22, 20205 yr Author What I wanted to say was the player should have a value between 0-399 inclusive stored on them, representing what Wold#getGameTime() % 400 was when the player acquired mercury. That way, it seems less predictable.
May 22, 20205 yr Author Which method on the player returns their UUID? I can only find PlayerEntity#getDisplayNameAndUUID, which returns an ITextComponent.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.