Slime entity no longer working due to override of slimeHolographicDisplays
timbru31 opened this issue · 15 comments
Hi,
your NMS code breaks the slime spawner or any other plugin relying on EntityTypes.b (RegistryMaterials of MinecraftKey and EntityClass), since you are overwriting the existing entry with the ID 55 (which is Slime).
Could you instead register an ID that was previously null? There are many IDs not yet used, since NMS breaks anyways you should be safe to use a non-existing ID.
Thanks,
Tim
I've tested with 1.11. At first it seems that Holographic Displays blocks slime spawning, but even after removing the plugin slimes wouldn't spawn. I was able to make them spawn at night in a swamp biome, with the plugin enabled. It looks like this issue has nothing to do with the plugin.
Also I can't use another ID because the client wouldn't be able to see and click the slimes (I tried).
@filoghost - I'm getting numerous issues about slimes being broken. Could you re-investigate if you can solve your problem otherwise than misusing the slime entity?
I'm reopening this issue and closing the newer one, I don't know if it is possible to use slimes without overriding their spawn. If it's not possible, I should probably use another type of entity.
@timbru31 I've taken a look at this issue (https://dev.bukkit.org/projects/silkspawners/issues/120) and done some tests. I'm unable to reproduce the issue or the problems that you mentioned, as you can see here https://gfycat.com/UnluckySerpentineHuman I'm using both HolographicDisplays and SilkSpawners. The slime spawner works (note: it seems to only work with low light levels and in the swamp biome) and I don't see slimeHolographicDisplays in the "/ss list".
CraftBukkit version: git-Spigot-b4417b8-3c48711 (MC: 1.11.2) (Implementing API version 1.11.2-R0.1-SNAPSHOT)
After inspecting the NMS code a bit more (specifically: EntityTypes, RegistryMaterials, RegistryID) HolographicDisplays appears to overwrite the slime ID (that is 55) in the RegistryID. However, the getId method (that maps IDs to entity classes) is never referenced in the NMS code.
Are you using that method to retrieve the NMS entity class from its ID?
https://dev.bukkit.org/projects/holographic-displays/files/2381220 I had to make a release anyway, other bugs were fixed.
I would like to report that, adding Holographic Displays to our server does indeed break the slimes from spawning from a slime spawner. Naturally spawned slimes function fine, but a crafted spawner, or a spawner given using the give command or the silkSpawner give command does not spawn slimes in -any- condition.
Related to this, if I were to say change the ID used by the plugin to something else, say a mob that will not have its SilkSpawner enabled, would you expect there to be any issues with it? I am in need of a somewhat urgent workaround, but thought I would check before attempted to do it myself :D
I'm reopening this, probably related to #76