Skip to content
Permalink
Browse files

Add CHARCOAL as a fuel source

  • Loading branch information
me4502 committed Feb 23, 2020
1 parent 16a2a40 commit 9c6b93fa64ecbc39641f5921833260bde01090e4
@@ -139,14 +139,15 @@ public static Location getBlockCentre(Block block) {
drops.add(new ItemStack(Material.COCOA_BEANS, 3));
break;
default:
if(tool == null || ItemUtil.getMaxDurability(tool.getType()) > 0)
if(tool == null) {
drops.addAll(block.getDrops());
else
} else {
drops.addAll(block.getDrops(tool));
}
break;
}

return drops.toArray(new ItemStack[drops.size()]);
return drops.toArray(new ItemStack[0]);
}

public static Block[] getTouchingBlocks(Block block) {
@@ -155,7 +156,7 @@ public static Location getBlockCentre(Block block) {
for(BlockFace face : LocationUtil.getDirectFaces())
blocks.add(block.getRelative(face));

return blocks.toArray(new Block[blocks.size()]);
return blocks.toArray(new Block[0]);
}

public static Block[] getIndirectlyTouchingBlocks(Block block) {
@@ -167,6 +168,6 @@ public static Location getBlockCentre(Block block) {
if(!(x == 0 && y == 0 & z == 0))
blocks.add(block.getRelative(x,y,z));

return blocks.toArray(new Block[blocks.size()]);
return blocks.toArray(new Block[0]);
}
}
@@ -668,6 +668,7 @@ public static boolean isAFuel(ItemStack item) {

switch(item.getType()) {
case COAL:
case CHARCOAL:
case COAL_BLOCK:
case WOODEN_AXE:
case WOODEN_HOE:

0 comments on commit 9c6b93f

Please sign in to comment.
You can’t perform that action at this time.