Fix spawnerconvert functionaltity
Kakifrucht opened this issue ยท 21 comments
Essentials supports the retrieval of premade mobspawners (/i mobspawner:mobdatavalue) and should usually, if the player has the permission for the specific mob, change the spawner on placement automatically to the given mobtype. Due to changes of data value handling in vanilla 1.8, it is no longer possible to store such value for mobspawners in the item while in inventory. Maybe add a lore and read that on placement?
I'm working on a BlockStateMeta solution that should fix giving spawner items and signs for anything 1.8.3+.
Currently the essentials.spawnerconvert.* permissions are not used, could you add those? Otherwise it works nice, although it would be nice to add a lore maybe? Currently when adding a lore it does not seem to work. Thanks!
Lore is added starting from 37d4dc7, as for spawnerconvert, the permission seems to be used, so I'm not sure why it isn't working.
Weirdly the lore does only work with /i, not /give.
As for the permission, I just tested it and it doesn't seem to be used, as I could just place whatever I wanted.
That's odd, it certainly does not for me.
/i 52:50 1 lore:Test
Works!
/give me 52:50 1 lore:Test
Does not work! I also tried /essentials:give
No stacktraces, I just get a normal monster spawner.
Don't specify the lore, the name is done automatically. /give vemacs mob_spawner:50 1
gives me a creeper spawner with the name Creeper Spawner.
Yes exactly, but I want to add a custom lore. This works with /i, so why not with /give?
I can't reproduce, edited message above. What is a bug is that when the lore is set, the name is lost.
Odd, as it worked before with the 1.7 Essentials builds. Nothing major, but would be nice if possible.
It shows Monster Spawner, it should be a creeper spawner though.
Use the command without the lore and odd behaviour will start.
Yeah well the name plus the fact that once you place it won't be a creeper spawner, at least for me.
Looks like that Essentials is doing something weird when the lore is set. File this as another bug (it's a bit of a non-frequent use case so not super high priority).
Before the 1.8 update:
- Give yourself a custom mobspawner (/give player mobspawner:mobvalue 1), where mobvalue is the mob network id, for instance pig is 50
- Place the mobspawner
- Essentials will check if a mobspawner has been placed, check the placed items datavalue (in this case 50) and then change the mob on the placed mobspawner
This is no longer possible, as the data value can no longer be stored in mobspawner items in your inventory. Giving yourself a custom spawner will simply reset the data value to 0.
Further information:
The feature was added here:
1cb9ddf
Basically, it allowed you to spawn in pre-set mobspawner items, so instead of giving someone a default (pig) spawner, you could give them a chicken spawner using /i 52:93, for example. Then, when they placed the spawner, it would be automatically set to chicken (if they had the essentials.spawnerconvert.chicken permission).
Wait so what exactly is the issue? What could you do before that you can't now? Please explain it step by step.