RAT's Mischief

RAT's Mischief

3M Downloads

Rats change colour, apparently

IdrisQe opened this issue ยท 8 comments

commented

So... The other night I was playing my world, and noticed my rat was albino...
Now I'm absolutely sure the rat I tamed when I started this world was not albino, but i figured maybe I just misremembered.
Today, when I loaded the world... It was not albino. Again, I didn't think much of it, but after returning from a mining trip, the exact same rat was standing and albino again.

I reloaded the world, and the rat was light brown (and standing again, but I sat him back down)
2021-03-10_16 50 31

And on a hunch, I went far away so the chunks unloaded, then came back.
The rat was standing again... (Still the same rat! I only tamed one in this world, and he was still in the same place with the sitting behaviour!) and was now grey.
2021-03-10_16 53 34

I left the area once more, to ensure I wasn't seeing things (I hadn't checked my screenshots yet)
and sure enough, when I came back, the rat was now dark brown, for some reason.
2021-03-10_16 58 43

I reloaded the world again and he was grey again, but I didn't screenshot since I think the point is made. Tried searching my log but there wasn't anything about rat textures so I have no idea why the textures seem to be changing every time I reload. Is it because he isn't named, maybe? I have no idea.

commented

Do you have Immersive portals?

commented

...Oh.
I do, are they incompatible?

commented

Yes, a previous issue was opened for this.

commented

I wanted to test it by

modImplementation('com.github.Ladysnake:Rats-Mischief:1.0.3')
    modImplementation 'software.bernie.geckolib:geckolib-fabric-1.16.5:3.0.15:dev'

However I get

java.lang.NoSuchFieldError: field_4673
	at ladysnake.ratsmischief.client.render.entity.RatEntityRenderer.<init>(RatEntityRenderer.java:25)
	at ladysnake.ratsmischief.client.MischiefClient.lambda$onInitializeClient$0(MischiefClient.java:26)
	at net.fabricmc.fabric.api.client.rendereregistry.v1.EntityRendererRegistry.initialize(EntityRendererRegistry.java:82)

Seems that field_4673 cannot be remapped because its superclass is in geckolib but loom remap ignores geckolib's classes

commented

I suspect that it's a networking issue. Why does RatEntity use custom spawn packet? https://github.com/Ladysnake/Rats-Mischief/blob/main/src/main/java/ladysnake/ratsmischief/common/entity/RatEntity.java#L213
LivingEntity's default createSpawnPacket implementation should be sufficient.

commented
commented

LivingEntity's default createSpawnPacket implementation should be sufficient.

Yes it should. I just made a custom packet implementation cause that's how I always do, most of my entities never being living entities and therefore requiring custom packets. I'll test without my custom packets, but nice if you managed to fix it!

commented

The IP fix does seem to have fixed it! Interestingly, installing the new version seems to have re-tamed my rat! Which means I guess the data wasn't getting deleted but instead just... not used? Not sure! But it's working now!