summaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
authorAndrew Ardill <andrew.ardill@gmail.com>2011-12-02 21:36:53 +1100
committerAndrew Ardill <andrew.ardill@gmail.com>2011-12-02 21:50:57 +1100
commit645079be08da59a89b7e19f519f1384836753ca4 (patch)
treee9ff68677ad6a5905cac8a88611f6bf4ad5bbcfc /src/main/java
parentf15c466e8911dd8aa3a55af91e00e753220fea63 (diff)
downloadcraftbukkit-645079be08da59a89b7e19f519f1384836753ca4.tar
craftbukkit-645079be08da59a89b7e19f519f1384836753ca4.tar.gz
craftbukkit-645079be08da59a89b7e19f519f1384836753ca4.tar.lz
craftbukkit-645079be08da59a89b7e19f519f1384836753ca4.tar.xz
craftbukkit-645079be08da59a89b7e19f519f1384836753ca4.zip
Make the EnderDragon respect experience drop set in death event
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/net/minecraft/server/EntityEnderDragon.java12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/main/java/net/minecraft/server/EntityEnderDragon.java b/src/main/java/net/minecraft/server/EntityEnderDragon.java
index 522cf30a..e0836fe5 100644
--- a/src/main/java/net/minecraft/server/EntityEnderDragon.java
+++ b/src/main/java/net/minecraft/server/EntityEnderDragon.java
@@ -501,7 +501,7 @@ public class EntityEnderDragon extends EntityComplex {
int j;
if (!this.world.isStatic && this.r > 150 && this.r % 5 == 0) {
- i = 1000;
+ i = expToDrop / 20; // CraftBukkit - drop experience as dragon falls from sky. use experience drop from death event. This is now set in getExpReward()
while (i > 0) {
j = EntityExperienceOrb.b(i);
@@ -513,7 +513,7 @@ public class EntityEnderDragon extends EntityComplex {
this.move(0.0D, 0.10000000149011612D, 0.0D);
this.V = this.yaw += 20.0F;
if (this.r == 200) {
- i = 10000;
+ i = expToDrop - 10 * (expToDrop / 20); // CraftBukkit - drop the remaining experience
while (i > 0) {
j = EntityExperienceOrb.b(i);
@@ -587,4 +587,12 @@ public class EntityEnderDragon extends EntityComplex {
public boolean e_() {
return false;
}
+
+ // CraftBukkit start
+ public int getExpReward() {
+ // This value is equal to the amount of experience dropped while falling from the sky (10 * 1000)
+ // plus what is dropped when the dragon hits the ground (10000)
+ return 20000;
+ }
+ // CraftBukkit end
}