Creeper Awareness by elix_x

Mobs are afraid of creepers once again!

Creeper awareness resurrects secret feature that was added in snapshot 14w11, and removed after because of the lag it was causing. And that’s simply because mojang implemented it in a very unefficient way.

Spoiler for ext to mojang's implementation, creeper awareness is:

-More efficient.

-Supports charged creepers correctly.

-Supports TNT.

-Has API, meaning any mod can implement support for it’s explosives.

WARNING: Forge 1.9 is in beta, meaning that some things may not work.

Before reporting issue in 1.9, check that you are using latest version of forge.

How does it work?

Each world has list of explosion sources associated to it.

To this list all things that will explode are added. For example primed tnt, or fused creeper.

For each of those sources, list of entities that are in zone that explosion will affect is created. By default, it’s a sphere (yes, sphere, not a box) with 2.5 times radius of future explosion.

Then, each entity in the list is told to go outside of this zone. There are 2 path finding algorithms: “random” and “smart”:

-Random algorith sends them to random block away from center with minimum distance 2.5 times radius of future explosion.

-Smart algorith uses vector math to ray trace position outside of affected zone, and then y search to find accessible block.

By default, smart algorithm is active, but it can be changed in config file.

Videos

Quick demo:

Mass effect:

Sorry for low fps.

Funny video with a pig:

Github

Issues

Source Code

Dev Versions & API

Check out all my mods here: Elix’x mods hub!

SUPPORT ME!

If you like my mods, your support is very appreciated and will speed me up improving my mods!

If you would like to support me, you have 2 options, patreon is prefered one:

 

 

Resource

http://minecraft.curseforge.com/projects/creeper-awareness

 

Spoiler for ICENSE

Creeper Awareness by elix_x is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.

Exceptions:

I grant exception for mod showcases: you can monetize it (video) AND you need to redirect download to this page, you have my permission.

I also grant exception for modpacks: you can use this mod in any modpack, in condition of non commercial purpose (no ad, adf.ly or other).

For other exceptions, you need to ask me.

In short, as long you aren’t stated in exceptions:

You can make mod showcase/tutorial about this mod and monetize it.

You can make modpacks with this mod.

You can share it on other places AS LONG AS YOU PROVIDE LINK BACK HERE and AS LONG AS IT IS IN NON COMMERCIAL PURPOSES!