1
mirror of https://github.com/StarWishsama/Slimefun4.git synced 2024-09-20 03:35:51 +00:00

Fixed Android Miner not breaking Slimefun blocks correctly

This commit is contained in:
Redemption 2018-01-06 15:53:23 +01:00 committed by GitHub
parent fefd3b1fe5
commit 9f0796327b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -710,7 +710,7 @@ public abstract class ProgrammableAndroid extends SlimefunItem {
Collection<ItemStack> drops = block.getDrops();
if (!blockblacklist.contains(block.getType()) && !drops.isEmpty() && CSCoreLib.getLib().getProtectionManager().canBuild(UUID.fromString(BlockStorage.getBlockInfo(b, "owner")), block)) {
if(item != null) {
if(fits(b, BlockStorage.retrieve(block))) {
if(fits(b, item.getItem())) {
pushItems(b, BlockStorage.retrieve(block));
if(SlimefunItem.blockhandler.containsKey(item.getID())) SlimefunItem.blockhandler.get(item.getID()).onBreak(null, block, item, UnregisterReason.ANDROID_DIG);
block.getWorld().playEffect(block.getLocation(), Effect.STEP_SOUND, block.getType());
@ -733,7 +733,7 @@ public abstract class ProgrammableAndroid extends SlimefunItem {
if (!blockblacklist.contains(block.getType()) && !drops.isEmpty() && CSCoreLib.getLib().getProtectionManager().canBuild(UUID.fromString(BlockStorage.getBlockInfo(b, "owner")), block)) {
try {
if(item != null) {
if(fits(b, BlockStorage.retrieve(block))) {
if(fits(b, item.getItem())) {
pushItems(b, BlockStorage.retrieve(block));
if(SlimefunItem.blockhandler.containsKey(item.getID())) SlimefunItem.blockhandler.get(item.getID()).onBreak(null, block, item, UnregisterReason.ANDROID_DIG);
block.getWorld().playEffect(block.getLocation(), Effect.STEP_SOUND, block.getType());