summaryrefslogtreecommitdiffstats
path: root/src/main/java/net/minecraft/server/PathfinderGoalEatTile.java
diff options
context:
space:
mode:
authorThinkofdeath <thinkofdeath@spigotmc.org>2014-11-26 08:32:16 +1100
committermd_5 <git@md-5.net>2014-11-28 17:16:30 +1100
commit24557bc2b37deb6a0edf497d547471832457b1dd (patch)
treec560572889a3b0b34964a0cddb35dc87fda3c914 /src/main/java/net/minecraft/server/PathfinderGoalEatTile.java
parenta4805dbd77da057cc1ea0bf344379bc6e53ca1f6 (diff)
downloadcraftbukkit-24557bc2b37deb6a0edf497d547471832457b1dd.tar
craftbukkit-24557bc2b37deb6a0edf497d547471832457b1dd.tar.gz
craftbukkit-24557bc2b37deb6a0edf497d547471832457b1dd.tar.lz
craftbukkit-24557bc2b37deb6a0edf497d547471832457b1dd.tar.xz
craftbukkit-24557bc2b37deb6a0edf497d547471832457b1dd.zip
Update to Minecraft 1.8
For more information please see http://www.spigotmc.org/
Diffstat (limited to 'src/main/java/net/minecraft/server/PathfinderGoalEatTile.java')
-rw-r--r--src/main/java/net/minecraft/server/PathfinderGoalEatTile.java75
1 files changed, 0 insertions, 75 deletions
diff --git a/src/main/java/net/minecraft/server/PathfinderGoalEatTile.java b/src/main/java/net/minecraft/server/PathfinderGoalEatTile.java
deleted file mode 100644
index a38f2a26..00000000
--- a/src/main/java/net/minecraft/server/PathfinderGoalEatTile.java
+++ /dev/null
@@ -1,75 +0,0 @@
-package net.minecraft.server;
-
-// CraftBukkit start
-import org.bukkit.craftbukkit.event.CraftEventFactory;
-import org.bukkit.Material;
-// CraftBukkit end
-
-public class PathfinderGoalEatTile extends PathfinderGoal {
-
- private EntityInsentient b;
- private World c;
- int a;
-
- public PathfinderGoalEatTile(EntityInsentient entityinsentient) {
- this.b = entityinsentient;
- this.c = entityinsentient.world;
- this.a(7);
- }
-
- public boolean a() {
- if (this.b.aI().nextInt(this.b.isBaby() ? 50 : 1000) != 0) {
- return false;
- } else {
- int i = MathHelper.floor(this.b.locX);
- int j = MathHelper.floor(this.b.locY);
- int k = MathHelper.floor(this.b.locZ);
-
- return this.c.getType(i, j, k) == Blocks.LONG_GRASS && this.c.getData(i, j, k) == 1 ? true : this.c.getType(i, j - 1, k) == Blocks.GRASS;
- }
- }
-
- public void c() {
- this.a = 40;
- this.c.broadcastEntityEffect(this.b, (byte) 10);
- this.b.getNavigation().h();
- }
-
- public void d() {
- this.a = 0;
- }
-
- public boolean b() {
- return this.a > 0;
- }
-
- public int f() {
- return this.a;
- }
-
- public void e() {
- this.a = Math.max(0, this.a - 1);
- if (this.a == 4) {
- int i = MathHelper.floor(this.b.locX);
- int j = MathHelper.floor(this.b.locY);
- int k = MathHelper.floor(this.b.locZ);
-
- if (this.c.getType(i, j, k) == Blocks.LONG_GRASS) {
- // CraftBukkit
- if (!CraftEventFactory.callEntityChangeBlockEvent(this.b, this.b.world.getWorld().getBlockAt(i, j, k), Material.AIR, !this.c.getGameRules().getBoolean("mobGriefing")).isCancelled()) {
- this.c.setAir(i, j, k, false);
- }
-
- this.b.p();
- } else if (this.c.getType(i, j - 1, k) == Blocks.GRASS) {
- // CraftBukkit
- if (!CraftEventFactory.callEntityChangeBlockEvent(this.b, this.b.world.getWorld().getBlockAt(i, j - 1, k), Material.DIRT, !this.c.getGameRules().getBoolean("mobGriefing")).isCancelled()) {
- this.c.triggerEffect(2001, i, j - 1, k, Block.getId(Blocks.GRASS));
- this.c.setTypeAndData(i, j - 1, k, Blocks.DIRT, 0, 2);
- }
-
- this.b.p();
- }
- }
- }
-}