Mod Support - Woodcutting now works. Still need to add # of drops from a

given block.
This commit is contained in:
GJ
2012-05-17 17:03:56 -04:00
parent 0afc0d59a4
commit d20c5e1773
7 changed files with 144 additions and 25 deletions

View File

@ -118,7 +118,12 @@ public class BlockChecks {
return true;
default:
return false;
if (customBlocksEnabled && ModChecks.isCustomOreBlock(block)) {
return true;
}
else {
return false;
}
}
}

View File

@ -78,4 +78,49 @@ public class ModChecks {
return null;
}
/**
* Check if a custom block is a leaf block.
*
* @param block The block to check
* @return true if the block represents leaves, false otherwise
*/
public static boolean isCustomLeafBlock(Block block) {
if (blocksInstance.customLeaves.contains(new ItemStack(block.getTypeId(), 1, (short) 0, block.getData()))) {
return true;
}
else {
return false;
}
}
/**
* Check if a custom block is a log block.
*
* @param block The block to check
* @return true if the block represents a log, false otherwise
*/
public static boolean isCustomLogBlock(Block block) {
if (blocksInstance.customLogs.contains(new ItemStack(block.getTypeId(), 1, (short) 0, block.getData()))) {
return true;
}
else {
return false;
}
}
/**
* Check if a custom block is an ore block.
*
* @param block The block to check
* @return true if the block represents an ore, false otherwise
*/
public static boolean isCustomOreBlock(Block block) {
if (blocksInstance.customOres.contains(new ItemStack(block.getTypeId(), 1, (short) 0, block.getData()))) {
return true;
}
else {
return false;
}
}
}