mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2025-02-07 23:32:01 +01:00
BlockProperties: Set default type to insta break, to avoid potential
compatibility issues.
This commit is contained in:
parent
3e328301d8
commit
5e2d4fe57f
@ -205,7 +205,7 @@ public class BlockProperties {
|
||||
private static final BlockProps indestructibleType = new BlockProps(noTool, -1f, indestructibleTimes);
|
||||
|
||||
/** Returned if unknown */
|
||||
public static final BlockProps defaultBlockProps = stoneType;
|
||||
private static BlockProps defaultBlockProps = instantType;
|
||||
|
||||
protected static final Material[] instantMat = new Material[]{
|
||||
// Named in wiki.
|
||||
@ -688,4 +688,18 @@ public class BlockProperties {
|
||||
final int efficiency = itemInHand == null ? 0 : itemInHand.getEnchantmentLevel(Enchantment.DIG_SPEED);
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user