Fix being able to add facade to a conduit with microblocks on it

This commit is contained in:
tterrag1098 committed 2015-10-06 00:31:18 -04:00
1 parent b1008cb250
commit 91bdb2a0b8
2 files changed
+19 -11

No files matched your search

@@ -695,6 +695,10 @@ public class BlockConduitBundle extends BlockEio implements IGuiHandler, IFacade
}
public boolean handleFacadeClick(World world, int x, int y, int z, EntityPlayer player, int side, IConduitBundle bundle, ItemStack stack) {
if (MicroblocksUtil.supportMicroblocks() && hasMicroblocks(bundle)) {
return false;
}
// Add facade
if(player.isSneaking()) {
return false;
@@ -1125,4 +1129,8 @@ public class BlockConduitBundle extends BlockEio implements IGuiHandler, IFacade
private ArrayList<ItemStack> IM__getDrops(List<ItemStack> cur, World world, int x, int y, int z, int metadata, int fortune) {
return IMultipartSystem.instance.hook_getDrops(cur, world, x, y, z, metadata, fortune);
}
private boolean hasMicroblocks(IConduitBundle bundle) {
return !bundle.getCoverSystem().getAllParts().isEmpty();
}
}