mirror of
https://github.com/barkeser2002/CatServer.git
synced 2026-09-25 04:20:02 +03:00
21 lines
1013 B
Diff
21 lines
1013 B
Diff
--- ../src-base/minecraft/net/minecraft/entity/item/EntityExpBottle.java
|
|
+++ ../src-work/minecraft/net/minecraft/entity/item/EntityExpBottle.java
|
|
@@ -40,9 +40,16 @@
|
|
{
|
|
if (!this.world.isRemote)
|
|
{
|
|
- this.world.playEvent(2002, new BlockPos(this), PotionUtils.getPotionColor(PotionTypes.WATER));
|
|
+ // CraftBukkit - moved to after event
|
|
+ // this.world.playEvent(2002, new BlockPos(this), PotionUtils.getPotionColor(PotionTypes.WATER));
|
|
int i = 3 + this.world.rand.nextInt(5) + this.world.rand.nextInt(5);
|
|
|
|
+ org.bukkit.event.entity.ExpBottleEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callExpBottleEvent(this, i);
|
|
+ i = event.getExperience();
|
|
+ if (event.getShowEffect()) {
|
|
+ this.world.playEvent(2002, new BlockPos(this), PotionUtils.getPotionColor(PotionTypes.WATER));
|
|
+ }
|
|
+
|
|
while (i > 0)
|
|
{
|
|
int j = EntityXPOrb.getXPSplit(i);
|