summaryrefslogtreecommitdiffstats
path: root/src/main/java/net/minecraft/server/EntityThrownExpBottle.java
diff options
context:
space:
mode:
authorWesley Wolfe <weswolf@aol.com>2012-03-20 01:44:35 -0500
committerEvilSeph <evilseph@gmail.com>2012-03-20 03:24:08 -0400
commit9055a20d71698922c891ac2ff802a8d7e63f78be (patch)
treee89bc618fd9982297047e8da83597903b37c6628 /src/main/java/net/minecraft/server/EntityThrownExpBottle.java
parent71a51b024bc03dd0c7d2ad5cbd21e35d7c8d6c86 (diff)
downloadcraftbukkit-9055a20d71698922c891ac2ff802a8d7e63f78be.tar
craftbukkit-9055a20d71698922c891ac2ff802a8d7e63f78be.tar.gz
craftbukkit-9055a20d71698922c891ac2ff802a8d7e63f78be.tar.lz
craftbukkit-9055a20d71698922c891ac2ff802a8d7e63f78be.tar.xz
craftbukkit-9055a20d71698922c891ac2ff802a8d7e63f78be.zip
Added EntityThrownExpBottle for diff visibility.
Diffstat (limited to 'src/main/java/net/minecraft/server/EntityThrownExpBottle.java')
-rw-r--r--src/main/java/net/minecraft/server/EntityThrownExpBottle.java44
1 files changed, 44 insertions, 0 deletions
diff --git a/src/main/java/net/minecraft/server/EntityThrownExpBottle.java b/src/main/java/net/minecraft/server/EntityThrownExpBottle.java
new file mode 100644
index 00000000..70b254e9
--- /dev/null
+++ b/src/main/java/net/minecraft/server/EntityThrownExpBottle.java
@@ -0,0 +1,44 @@
+package net.minecraft.server;
+
+public class EntityThrownExpBottle extends EntityProjectile {
+
+ public EntityThrownExpBottle(World world) {
+ super(world);
+ }
+
+ public EntityThrownExpBottle(World world, EntityLiving entityliving) {
+ super(world, entityliving);
+ }
+
+ public EntityThrownExpBottle(World world, double d0, double d1, double d2) {
+ super(world, d0, d1, d2);
+ }
+
+ protected float e() {
+ return 0.07F;
+ }
+
+ protected float c() {
+ return 0.7F;
+ }
+
+ protected float d() {
+ return -20.0F;
+ }
+
+ protected void a(MovingObjectPosition movingobjectposition) {
+ if (!this.world.isStatic) {
+ this.world.triggerEffect(2002, (int) Math.round(this.locX), (int) Math.round(this.locY), (int) Math.round(this.locZ), 0);
+ int i = 3 + this.world.random.nextInt(5) + this.world.random.nextInt(5);
+
+ while (i > 0) {
+ int j = EntityExperienceOrb.getOrbValue(i);
+
+ i -= j;
+ this.world.addEntity(new EntityExperienceOrb(this.world, this.locX, this.locY, this.locZ, j));
+ }
+
+ this.die();
+ }
+ }
+}