BlockProperties: Set default type to insta break, to avoid potential

compatibility issues.
This commit is contained in:
asofold 2012-09-18 16:36:18 +02:00
parent 3e328301d8
commit 5e2d4fe57f

View File

@ -205,7 +205,7 @@ public class BlockProperties {
private static final BlockProps indestructibleType = new BlockProps(noTool, -1f, indestructibleTimes); private static final BlockProps indestructibleType = new BlockProps(noTool, -1f, indestructibleTimes);
/** Returned if unknown */ /** Returned if unknown */
public static final BlockProps defaultBlockProps = stoneType; private static BlockProps defaultBlockProps = instantType;
protected static final Material[] instantMat = new Material[]{ protected static final Material[] instantMat = new Material[]{
// Named in wiki. // Named in wiki.
@ -688,4 +688,18 @@ public class BlockProperties {
final int efficiency = itemInHand == null ? 0 : itemInHand.getEnchantmentLevel(Enchantment.DIG_SPEED); final int efficiency = itemInHand == null ? 0 : itemInHand.getEnchantmentLevel(Enchantment.DIG_SPEED);
return isValidTool(blockId, blockProps, toolProps, efficiency); return isValidTool(blockId, blockProps, toolProps, efficiency);
} }
public static BlockProps getDefaultBlockProps() {
return defaultBlockProps;
}
/**
* Feeding null will cause an npe - will validate.
* @param blockProps
*/
public static void setDefaultBlockProps(BlockProps blockProps) {
blockProps.validate();
BlockProperties.defaultBlockProps = blockProps;
}
} }