summaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
authorEvilSeph <evilseph@gmail.com>2012-02-08 20:01:46 -0500
committerEvilSeph <evilseph@gmail.com>2012-02-08 20:01:46 -0500
commit39002fd39fd318cc488cf2694cf91c501825d696 (patch)
treeb002c4a5804c21ba5058d8384cc1c9a516f169a0 /src/main/java
parentae333ded91b83fddf5c5695032bbda8099a092d8 (diff)
downloadcraftbukkit-39002fd39fd318cc488cf2694cf91c501825d696.tar
craftbukkit-39002fd39fd318cc488cf2694cf91c501825d696.tar.gz
craftbukkit-39002fd39fd318cc488cf2694cf91c501825d696.tar.lz
craftbukkit-39002fd39fd318cc488cf2694cf91c501825d696.tar.xz
craftbukkit-39002fd39fd318cc488cf2694cf91c501825d696.zip
Added EntityEnderCrystal for diff visibility.
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/net/minecraft/server/EntityEnderCrystal.java63
1 files changed, 63 insertions, 0 deletions
diff --git a/src/main/java/net/minecraft/server/EntityEnderCrystal.java b/src/main/java/net/minecraft/server/EntityEnderCrystal.java
new file mode 100644
index 00000000..6cac96be
--- /dev/null
+++ b/src/main/java/net/minecraft/server/EntityEnderCrystal.java
@@ -0,0 +1,63 @@
+package net.minecraft.server;
+
+public class EntityEnderCrystal extends Entity {
+
+ public int a = 0;
+ public int b;
+
+ public EntityEnderCrystal(World world) {
+ super(world);
+ this.bf = true;
+ this.b(2.0F, 2.0F);
+ this.height = this.length / 2.0F;
+ this.b = 5;
+ this.a = this.random.nextInt(100000);
+ }
+
+ protected boolean g_() {
+ return false;
+ }
+
+ protected void b() {
+ this.datawatcher.a(8, Integer.valueOf(this.b));
+ }
+
+ public void y_() {
+ this.lastX = this.locX;
+ this.lastY = this.locY;
+ this.lastZ = this.locZ;
+ ++this.a;
+ this.datawatcher.watch(8, Integer.valueOf(this.b));
+ int i = MathHelper.floor(this.locX);
+ int j = MathHelper.floor(this.locY);
+ int k = MathHelper.floor(this.locZ);
+
+ if (this.world.getTypeId(i, j, k) != Block.FIRE.id) {
+ this.world.setTypeId(i, j, k, Block.FIRE.id);
+ }
+ }
+
+ protected void b(NBTTagCompound nbttagcompound) {}
+
+ protected void a(NBTTagCompound nbttagcompound) {}
+
+ public boolean e_() {
+ return true;
+ }
+
+ public boolean damageEntity(DamageSource damagesource, int i) {
+ if (!this.dead && !this.world.isStatic) {
+ this.b = 0;
+ if (this.b <= 0) {
+ if (!this.world.isStatic) {
+ this.die();
+ this.world.a((Entity) null, this.locX, this.locY, this.locZ, 6.0F);
+ } else {
+ this.die();
+ }
+ }
+ }
+
+ return true;
+ }
+}