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

Special AI Mobs not respecting Chunk protection #20

Closed Divineaspect closed 1 year ago

Divineaspect commented 2 years ago

https://github.com/mcenderdragon/Futurepack-API/issues/839#issuecomment-1001047017

FatherToast commented 2 years ago

I'm not sure how this actually pertains to SAI - what is chunk protection? This mod does not cause mobs to do anything that vanilla mobs can't already do in terms of chunks/blocks and does follow the mob griefing game rule.

mcenderdragon commented 2 years ago

@FatherToast I am lsitening to BLockEvents, and it seems like you arent firing them notably (BlockEvent.BreakEvent, BlockEvent.EntityPlaceEvent, aswell as bucket fill & explosions events) but I think tjust the block place & break events are the most important since that will ensure mod compatibility.

FatherToast commented 2 years ago

I am firing LivingDestroyBlockEvent (along with a few others) to test if blocks can be broken. BlockEvent.BreakEvent is fired for players only, so it won't catch mobs trying to break blocks.

mcenderdragon commented 2 years ago

LivingDestroyBlockEvent is not part of the BLockEvents ?

FatherToast commented 2 years ago

No, it is a subclass of the LivingEvent and in vanilla it is used for the wither, ender dragon, and zombies to check if they are allowed to break blocks/doors. I suspect if you are not checking this event, these vanilla mobs will be able to break blocks in protected chunks as well.