Untamed Wilds

Untamed Wilds

8M Downloads

Rare skins not spawing on servers(related to the eggs not working)

AyenHajar opened this issue ยท 3 comments

commented

I have found that rare skins for the green arowana are not spawning naturally or with a spawn egg on servers. I have enabled wild rare skins and configs as such in the config files. I have spammed the spawn egg on a private server to find the rare skins don't spawn, however in a single player world rare skins would start to spawn like usual. I have done it several times to confirm my suspicion and which it resulted in the rare skin arowanas not spawning on servers at all. However the only way I managed to spawn a rare skin arowana on a server was through copy entity data of one in a singleplayer world then summoning it in a server.

The is a what shows up in console when I spawn a green arowana(note the arowana still spawns but as the common variant) and looks undoubtedly similar to what shows when you try use an egg:
[18:19:37 FATAL]: Error executing task on Server
[18:19:37 WARN]: java.lang.NullPointerException
[18:19:37 WARN]: at untamedwilds.entity.ComplexMob.chooseSkinForSpecies(ComplexMob.java:118)
[18:19:37 WARN]: at untamedwilds.util.EntityUtils.createMobFromItem(EntityUtils.java:138)
[18:19:37 WARN]: at untamedwilds.item.MobBucketedItem.func_203792_a(MobBucketedItem.java:46)
[18:19:37 WARN]: at net.minecraft.item.BucketItem.func_77659_a(BucketItem.java:94)
[18:19:37 WARN]: at net.minecraft.item.ItemStack.func_77957_a(ItemStack.java:386)
[18:19:37 WARN]: at net.minecraft.server.management.PlayerInteractionManager.func_187250_a(PlayerInteractionManager.java:353)
[18:19:37 WARN]: at net.minecraft.network.play.ServerPlayNetHandler.func_147346_a(ServerPlayNetHandler.java:1480)
[18:19:37 WARN]: at net.minecraft.network.play.client.CPlayerTryUseItemPacket.func_148833_a(CPlayerTryUseItemPacket.java:30)
[18:19:37 WARN]: at net.minecraft.network.play.client.CPlayerTryUseItemPacket.func_148833_a(CPlayerTryUseItemPacket.java:9)
[18:19:37 WARN]: at net.minecraft.network.PacketThreadUtil.lambda$ensureRunningOnSameThread$0(PacketThreadUtil.java:26)
[18:19:37 WARN]: at net.minecraft.util.concurrent.TickDelayedTask.run(SourceFile:18)
[18:19:37 WARN]: at net.minecraft.util.concurrent.ThreadTaskExecutor.func_213166_h(ThreadTaskExecutor.java:153)
[18:19:37 WARN]: at net.minecraft.util.concurrent.RecursiveEventLoop.func_213166_h(SourceFile:23)
[18:19:37 WARN]: at net.minecraft.server.MinecraftServer.func_213166_h(MinecraftServer.java:942)
[18:19:37 WARN]: at net.minecraft.server.MinecraftServer.func_213166_h(MinecraftServer.java:176)
[18:19:37 WARN]: at net.minecraft.util.concurrent.ThreadTaskExecutor.func_213168_p(ThreadTaskExecutor.java:126)
[18:19:37 WARN]: at net.minecraft.server.MinecraftServer.func_213205_aW(MinecraftServer.java:925)
[18:19:37 WARN]: at net.minecraft.server.MinecraftServer.func_213168_p(MinecraftServer.java:919)
[18:19:37 WARN]: at net.minecraft.util.concurrent.ThreadTaskExecutor.func_213161_c(ThreadTaskExecutor.java:136)
[18:19:37 WARN]: at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:998)
[18:19:37 WARN]: at net.minecraft.server.MinecraftServer.func_240802_v_(MinecraftServer.java:821)
[18:19:37 WARN]: at net.minecraft.server.MinecraftServer.func_240783_a_(MinecraftServer.java:269)
[18:19:37 WARN]: at java.base/java.lang.Thread.run(Thread.java:829)

I am on the 1.4.1 release of this mod on 1.16.5 forge 36.2.5

I theories the root of this issue is the same is as what is causing eggs to not work on servers. It is probably a rendering bug to do with the skins but at least it doesn't completely stop the mob from spawning
In summary the rare skins are not spawning via any method with the exception of spawning it in with commands via copy entity data from a single player world.

commented

It was impossible until the latest alpha. Check out the wiki for the format, and the entity data files, which can safely be overriden by datapacks (just copy the file and change any params)

To quote the wiki:

skins (integer): Defines how many skins each mob has. This value is a two-digit number, where the first digit represents how many skins a mob has, and the second digit how many rare skins the mob has (eg. Green Arowana have 12, 1 normal skin, 2 rare skins). Skins matching the defined numbers should be present in the appropiate folder, suffixed with _n or _nr (where n is replaced with the number)

Since you on a server, keep in mind that any new skin needs to also be provided by a resource pack, otherwise you will get missing textures

Closing the issue since the bug should now be fixed

commented

Yes, most of the Skin system is broken on servers and does not work as intended due to a less-than-ideal approach (the server cannot "see" how many skins exist, yet it is up to the server to assign skins, since they are synced DataParameters)

It is mostly reworked for the next version and works well on servers, with the caveat that the number of skins needs to be directly stated as part of a datapack

commented

How would one state the number of skins as part of a datapack?