mirror of
https://github.com/YatopiaMC/Yatopia.git
synced 2024-08-24 23:03:00 +02:00
37 lines
1.6 KiB
Diff
37 lines
1.6 KiB
Diff
From f4d1452e0d9f5256302c5bf661b90a9d0787f5f2 Mon Sep 17 00:00:00 2001
|
|
From: chickeneer <emcchickeneer@gmail.com>
|
|
Date: Fri, 17 Jan 2020 21:32:10 -0600
|
|
Subject: [PATCH] EMC Add the BlockHarvestBeehiveEvent
|
|
|
|
---
|
|
src/main/java/net/minecraft/server/IDispenseBehavior.java | 6 ++++++
|
|
1 file changed, 6 insertions(+)
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/IDispenseBehavior.java b/src/main/java/net/minecraft/server/IDispenseBehavior.java
|
|
index 3af686c7f1..df0501b65e 100644
|
|
--- a/src/main/java/net/minecraft/server/IDispenseBehavior.java
|
|
+++ b/src/main/java/net/minecraft/server/IDispenseBehavior.java
|
|
@@ -4,6 +4,7 @@ import java.util.Iterator;
|
|
import java.util.List;
|
|
import java.util.Random;
|
|
// CraftBukkit start
|
|
+import com.empireminecraft.customevents.BlockHarvestBeehiveEvent;
|
|
import org.bukkit.Location;
|
|
import org.bukkit.TreeType;
|
|
import org.bukkit.craftbukkit.event.CraftEventFactory;
|
|
@@ -861,6 +862,11 @@ public interface IDispenseBehavior {
|
|
int k = (Integer) iblockdata.get(BlockBeehive.c);
|
|
|
|
if (k >= 5) {
|
|
+ // EMC start
|
|
+ if (!(new BlockHarvestBeehiveEvent(bukkitBlock, MCUtil.toBukkitBlock(world, blockposition), craftItem).callEvent())) {
|
|
+ return itemstack;
|
|
+ }
|
|
+ // EMC end
|
|
if (itemstack.isDamaged(1, world.random, (EntityPlayer) null)) {
|
|
itemstack.setCount(0);
|
|
}
|
|
--
|
|
2.25.1.windows.1
|
|
|