gnembon / scarpet

Public Repository of scarpet programs for Minecraft
Creative Commons Zero v1.0 Universal
351 stars 157 forks source link

Graves: Inspired by Universal Graves #336

Open pseudofractal opened 1 year ago

pseudofractal commented 1 year ago

Its almost an 1 to 1 copy of Universal Graves mod except the fancy holograms and some minor stuff. Since this uses fake screens, the minimum carpet version is bumped up to 1.4.57.

Spent a lot of time trying to make things as user friendly as possible. I am not very happy with the stuff I am doing to find a "safe" grave location, but I think the current solution is the best until #311.

Another thing, I am using player Name in all places instead of uuid because I did not find any good way of fetching the uuid from a name (Player heads store the player name and not uuid in their block data and Mojang api is rate limited)

Another another thing, I am using both set() and run('setblock') in different places. The reason for this is, set sometimes fails (particularly when replacing a player head) I need to do some more tests and then make a issue regarding this.

altrisi commented 1 year ago

Found an issue, if you drown the head will pop, and bye items.

altrisi commented 1 year ago

Also curious what determines if the inventory will be restored directly or if the screen will open?

altrisi commented 1 year ago

Found an issue, if you drown the head will pop, and bye items.

Actually, the head will keep some grave data, so if you place it and right click/break it it will disappear, but the items won't be restored.

pseudofractal commented 1 year ago

Also curious what determines if the inventory will be restored directly or if the screen will open?

Well two things.

  1. If the clicker is the grave owner, then it will try to shift all items directly to inventory and try to maintain positions of items. If its someone else, then they get the screen.
  2. While trying to shift items, if the inventory already contains some item in slot x, then it will open the screen.
pseudofractal commented 1 year ago

Found an issue, if you drown the head will pop, and bye items.

Ahh I never tried drowning but it does make sense. The debug command would fix this but a better solution is needed yh....