Allow block to specify their type for AI pathfinding (#3546)

This commit is contained in:
diesieben07 authored and LexManos committed 2017-01-11 16:43:41 -08:00
1 parent 9835e3705c
commit df0f1c4e75
3 files changed
+60 -4

No files matched your search

@@ -197,7 +197,7 @@
public SoundType func_185467_w()
{
return this.field_149762_H;
@@ -908,6 +932,1177 @@
@@ -908,6 +932,1188 @@
{
}
@@ -1370,12 +1370,23 @@
+ return false;
+ }
+
+ /**
+ * Get the {@code PathNodeType} for this block. Return {@code null} for vanilla behavior.
+ *
+ * @return the PathNodeType
+ */
+ @Nullable
+ public net.minecraft.pathfinding.PathNodeType getAiPathNodeType(IBlockState state, IBlockAccess world, BlockPos pos)
+ {
+ return isBurning(world, pos) ? net.minecraft.pathfinding.PathNodeType.DAMAGE_FIRE : null;
+ }
+
+ /* ========================================= FORGE END ======================================*/
+
public static void func_149671_p()
{
func_176215_a(0, field_176230_a, (new BlockAir()).func_149663_c("air"));
@@ -1201,14 +2396,7 @@
@@ -1201,14 +2407,7 @@
}
else
{