File tree 1 file changed +6
-0
lines changed
src/main/java/io/github/thebusybiscuit/slimefun4/implementation/handlers
1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 10
10
import org .bukkit .inventory .ItemStack ;
11
11
12
12
import io .github .thebusybiscuit .slimefun4 .api .events .AndroidMineEvent ;
13
+ import io .github .thebusybiscuit .slimefun4 .api .items .SlimefunItem ;
13
14
import io .github .thebusybiscuit .slimefun4 .core .handlers .BlockBreakHandler ;
14
15
import io .github .thebusybiscuit .slimefun4 .implementation .items .androids .MinerAndroid ;
15
16
17
+ import me .mrCookieSlime .Slimefun .api .BlockStorage ;
18
+
16
19
/**
17
20
* This simple implementation of {@link BlockBreakHandler} will execute the same code
18
21
* for when the {@link Block} is broken by a {@link Player}, by a {@link MinerAndroid} or an explosion.
@@ -54,6 +57,9 @@ public void onAndroidBreak(AndroidMineEvent e) {
54
57
@ Override
55
58
public void onExplode (Block b , List <ItemStack > drops ) {
56
59
onBlockBreak (b );
60
+ SlimefunItem sfItem = BlockStorage .check (b );
61
+ if (sfItem != null )
62
+ drops .addAll (sfItem .getDrops ());
57
63
}
58
64
59
65
}
You can’t perform that action at this time.
0 commit comments