FatherToast / SpecialAI

Adds additional AI patterns to mobs to make the game more challenging. 'Passive' mobs will fight back, monsters will break light sources and wooden doors, some mobs gain random extra abilities, and villages are more... village-y.
8 stars 7 forks source link

Incompatability Issue with 'Berry Cows' Mod #24

Closed AnimePixie closed 2 years ago

AnimePixie commented 2 years ago

Setup

Describe the bug Hi, I'm A beginner modder that's been developing a mod called 'Berry Cows', recent two users reported to me that when used with Special AI the textures on my Cows break. I was wondering If it would be possible to get some help working out what the code is I need to adjust?

from what i see looking at a log I have it looks like it has something to do with the species selection, in my mod there are 33 different species of berry cow and there are systems in the code that dictate how each entity selects it species. Judging from the logs it looks like my code is correctly selecting the species then something is causing the ID number that dictates this to be subtracted from constantly resulting in the code updating the texture to be the ID 0 and then negative numbers, which obviously do not exist. I hope that helps a bit ^_^;

To Reproduce install both 'special AI' and 'Berry Cows' on the same instance of Minecraft.

Reports I don't a github report set up but you can see the reports in the comment here: https://www.curseforge.com/minecraft/mc-mods/berry-cows Link to Log mentioned

Sarinsa commented 2 years ago

Are you able to provide a link of sorts to your code? A bit tricky without a repository, but that would help us a lot on getting a clue as to what could be causing it!

AnimePixie commented 2 years ago

Hi, sure I have Zipped the MCreator Workspace here: https://www.dropbox.com/s/6hn8xx4m3pbwf0l/berrycows.zip?dl=0 I hope that helps

Sarinsa commented 2 years ago

Ah oof, if its an mcreator project that complicates things a bit. Ill see if I can figure something out, but my knowledge with mcreator is nonexistent

FatherToast commented 2 years ago

This is a lot of code to look through without an IDE or something. Where all do you modify the cow variant in your code? Does the glitch still happen with the AIs "eat breeding items" and/or "depacify" disabled?

AnimePixie commented 2 years ago

you'll want to look in "BerryCowsSpawnTexture", "OnBreedingEvent" and 'Checkforhybrid" i think. If 'eat breeding items' is disabled in the config the issue doesn't occur, so i guess it has something to do with that.

FatherToast commented 2 years ago

Okay, the problem appears to be in "BerryCowEatGrassProcedure". It looks like it ends up decrementing the variant every time "EntityMobGriefingEvent" is fired; this event is used to check if a mob is allowed to grief, so you should not perform any actions in response to it.

AnimePixie commented 2 years ago

ah I see, ty, any advice on what i should be using instead? I basically just needed something to 'grow back' the berry's after it eats grass.