mirror of
https://github.com/barkeser2002/CatServer.git
synced 2026-09-25 12:05:59 +03:00
23 lines
964 B
Diff
23 lines
964 B
Diff
--- ../src-base/minecraft/net/minecraft/entity/item/EntityExpBottle.java
|
|
+++ ../src-work/minecraft/net/minecraft/entity/item/EntityExpBottle.java
|
|
@@ -38,9 +38,18 @@
|
|
{
|
|
if (!this.worldObj.isRemote)
|
|
{
|
|
- this.worldObj.playEvent(2002, new BlockPos(this), 0);
|
|
+ // CraftBukkit - moved to after event
|
|
+ //this.worldObj.playEvent(2002, new BlockPos(this), 0);
|
|
int i = 3 + this.worldObj.rand.nextInt(5) + this.worldObj.rand.nextInt(5);
|
|
|
|
+ // CraftBukkit start
|
|
+ org.bukkit.event.entity.ExpBottleEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callExpBottleEvent(this, i);
|
|
+ i = event.getExperience();
|
|
+ if (event.getShowEffect()) {
|
|
+ this.worldObj.playEvent(2002, new BlockPos(this), 0);
|
|
+ }
|
|
+ // CraftBukkit end
|
|
+
|
|
while (i > 0)
|
|
{
|
|
int j = EntityXPOrb.getXPSplit(i);
|