MysticMods / MysticalWorld

Library mod for use with the Mystic Mods (Embers, Roots, Gadgetry, Mystic World, etc.)
MIT License
27 stars 30 forks source link

Silk Worms Crash #175

Closed WenXin20 closed 4 years ago

WenXin20 commented 4 years ago

General Information

Describe the bug:

- I spawned in multiple silk worm with a spawn egg, and then crashed. Also, the Silk Worm model looks squished. - Possibly related to Performant. **To Reproduce:**
  1. Spawn in Silk Worms
  2. Crash

Expected behavior:

- No crashes, and the silk worm shouldn't look squished. *** ### Environment Versions

Mystic Mods Versions

Other Versions:


Logging Information

Please Use gist, paste.ee, pastebin or some other log sharing service

Crash Report: https://gist.github.com/WenXin20/3f18d926ae2add1122dc3486929b76d7


Additional Information

Screenshots:

2020-07-21_15 23 46

noobanidus commented 4 years ago

That model is strange, it looks as though I've somehow reversed things.

Re: the crash, I'm not entirely sure what's happening. I'm going to presume it's some sort of race condition.

I fixed it!

WenXin20 commented 4 years ago

Thanks!

noobanidus commented 4 years ago

(That was a joke, I made it worse, but I worked out how to fix it.)

noobanidus commented 4 years ago

Okay, so I've pushed a fix for the model and I'm going to release an update. I think I've also covered the area where spamming silkworm eggs and them trying to eat each other causes the game to crash with a null check (of sorts). I'm not sure if that 100% solves your issue though, so I'll leave this open.

WenXin20 commented 4 years ago

Oh, lol, thanks! I'll give it a try when I get the chance.

WenXin20 commented 4 years ago

The crash seems to be fixed, although I've noticed that when they attack each other, their movements are quite jerky, as if they are lagging. Other mobs are moving normally.

Also their hitbox might be a little too big, and is it intended that they kill each other in one hit? Even if one is twice as big as the other?

noobanidus commented 4 years ago

Oh, those are really good examples! It was intended that they kill each other in one hit, but it should be the larger one killing the smaller ones. I'll reduce the speed of the melee attack goal to match the random walking goal (half the speed) to see if that helps with the jerkiness.

noobanidus commented 4 years ago

Okay, killing a silkworm now causes the larger silkworm to grow, and the larger silkworm will cannibalize the smaller ones (rather than the other way around). The melee attack is a bit smaller now.

Their hitbox at the minute is designed to be relatively large as there were issues with too-small hitboxes being stacked together in the same place causing a lot of lag when it came to random movement and pathing. I think most of that should be resolved with the cannibalism though...

WenXin20 commented 4 years ago

Thanks, sounds good