From 69ee00b6f01fef1d2056c57fc79cd5b33af4d273 Mon Sep 17 00:00:00 2001 From: feildmaster Date: Sat, 10 Mar 2012 14:54:23 -0600 Subject: Adding PathfinderGoalBreakDoor for diff visibility. --- .../minecraft/server/PathfinderGoalBreakDoor.java | 38 ++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 src/main/java/net/minecraft/server/PathfinderGoalBreakDoor.java diff --git a/src/main/java/net/minecraft/server/PathfinderGoalBreakDoor.java b/src/main/java/net/minecraft/server/PathfinderGoalBreakDoor.java new file mode 100644 index 00000000..97be70cd --- /dev/null +++ b/src/main/java/net/minecraft/server/PathfinderGoalBreakDoor.java @@ -0,0 +1,38 @@ +package net.minecraft.server; + +public class PathfinderGoalBreakDoor extends PathfinderGoalDoorInteract { + + private int i; + + public PathfinderGoalBreakDoor(EntityLiving entityliving) { + super(entityliving); + } + + public boolean a() { + return !super.a() ? false : !this.e.d(this.a.world, this.b, this.c, this.d); + } + + public void c() { + super.c(); + this.i = 240; + } + + public boolean b() { + double d0 = this.a.e((double) this.b, (double) this.c, (double) this.d); + + return this.i >= 0 && !this.e.d(this.a.world, this.b, this.c, this.d) && d0 < 4.0D; + } + + public void e() { + super.e(); + if (this.a.am().nextInt(20) == 0) { + this.a.world.triggerEffect(1010, this.b, this.c, this.d, 0); + } + + if (--this.i == 0 && this.a.world.difficulty == 3) { + this.a.world.setTypeId(this.b, this.c, this.d, 0); + this.a.world.triggerEffect(1012, this.b, this.c, this.d, 0); + this.a.world.triggerEffect(2001, this.b, this.c, this.d, this.e.id); + } + } +} -- cgit v1.2.3