[SPIGOT-4833] Villager memory API (home, job_site and meeting_point) Created: 01/May/19 Updated: 20/May/19 Resolved: 20/May/19 |
|
Status: | Resolved |
Project: | Spigot |
Component/s: | None |
Affects Version/s: | None |
Fix Version/s: | None |
Type: | New Feature | Priority: | Minor |
Reporter: | Martin Frühauf | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 1 |
Labels: | 1.14, API, feature, villager |
Attachments: |
![]() |
Version: | This server is running CraftBukkit version git-Spigot-1eece4f-1fa9a81 (MC: 1.14) (Implementing API version 1.14-R0.1-SNAPSHOT) |
Guidelines Read: | Yes |
Description |
Please add API functionality for getting/setting the location of the bed (home), workplace (job_site) and bell (meeting_point). I tried to implement it myself and make a PR, but I'm fairly new to this stuff and I can't figure out how to do this exactly. |
Comments |
Comment by Yannick Lamprecht [ 17/May/19 ] |
Bukkit: https://hub.spigotmc.org/stash/projects/SPIGOT/repos/bukkit/pull-requests/430/overview CraftBukkit: https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/pull-requests/557/overview |
Comment by Martin Frühauf [ 06/May/19 ] |
When trying to set the dimension via the /data command, the villager immediately loses its memory about the setting where you changed the dimension.
/data get entity @e[type=minecraft:villager,sort=nearest,limit=1] Brain
/data modify entity @e[type=minecraft:villager,sort=nearest,limit=1] Brain.memories."minecraft:job_site".dimension set value "minecraft:the_nether"
Demonstration as video: https://martin-fr.de/storage/sharex/files/cNrcD560UGQoLVpFYu0PJBL14imkQQfz22utXjhD.mp4
|
Comment by md_5 [ 06/May/19 ] |
That's a really good point. There's at least some chance they just try to go to the coordinates, ignoring the world. I've added most the necessary mappings to make this easier in 1.13.1, but some generic notes would be:
|
Comment by Yannick Lamprecht [ 05/May/19 ] |
I Agree with getting Memories. One question I asked myself is how does the Villager behave when home, meeting and job location is in a different world. Does he magically teleport between worlds or does he is confused?! I will look into pr'ing a VillagerMemory API.
|