mirror of
https://github.com/YouHaveTrouble/Enchantio.git
synced 2026-10-26 20:35:30 +00:00
current block breaknig method does not allow for control over not breaking blocks tool is not effective for
This commit is contained in:
@@ -25,7 +25,6 @@ public class TunnellingEnchant implements EnchantioEnchant {
|
||||
public static final Key AFFECTED_BLOCKS_KEY = Key.key("enchantio", "affected_by_tunnelling");
|
||||
|
||||
private final int anvilCost, weight, maxLevel, blocksPerLevel;
|
||||
private final boolean canBreakToolIncompatibleBlocks;
|
||||
private final EnchantmentRegistryEntry.EnchantmentCost minimumCost;
|
||||
private final EnchantmentRegistryEntry.EnchantmentCost maximumCost;
|
||||
private final Set<TagEntry<ItemType>> supportedItemTags = new HashSet<>();
|
||||
@@ -41,8 +40,7 @@ public class TunnellingEnchant implements EnchantioEnchant {
|
||||
Collection<TagEntry<ItemType>> supportedItemTags,
|
||||
Map<Key, Set<TagEntry<BlockType>>> affectedBlockTags,
|
||||
int maxLevel,
|
||||
int blocksPerLevel,
|
||||
boolean canBreakToolIncompatibleBlocks
|
||||
int blocksPerLevel
|
||||
) {
|
||||
this.anvilCost = anvilCost;
|
||||
this.weight = weight;
|
||||
@@ -50,7 +48,6 @@ public class TunnellingEnchant implements EnchantioEnchant {
|
||||
this.maximumCost = maximumCost;
|
||||
this.maxLevel = maxLevel;
|
||||
this.blocksPerLevel = blocksPerLevel;
|
||||
this.canBreakToolIncompatibleBlocks = canBreakToolIncompatibleBlocks;
|
||||
this.supportedItemTags.addAll(supportedItemTags);
|
||||
this.enchantTagKeys.addAll(enchantTagKeys);
|
||||
this.affectedBlockTags.putAll(affectedBlockTags);
|
||||
@@ -115,10 +112,6 @@ public class TunnellingEnchant implements EnchantioEnchant {
|
||||
return blocksPerLevel;
|
||||
}
|
||||
|
||||
public boolean canBreakToolIncompatibleBlocks() {
|
||||
return canBreakToolIncompatibleBlocks;
|
||||
}
|
||||
|
||||
public static TunnellingEnchant create(ConfigurationSection configurationSection) {
|
||||
TunnellingEnchant tunnellingEnchant = new TunnellingEnchant(
|
||||
EnchantioConfig.getInt(configurationSection, "anvilCost", 1),
|
||||
@@ -161,8 +154,7 @@ public class TunnellingEnchant implements EnchantioEnchant {
|
||||
))
|
||||
),
|
||||
EnchantioConfig.getInt(configurationSection, "maxLevel", 1),
|
||||
EnchantioConfig.getInt(configurationSection, "blocksPerLevel", 1),
|
||||
EnchantioConfig.getBoolean(configurationSection, "canBreakToolIncompatibleBlocks", false)
|
||||
EnchantioConfig.getInt(configurationSection, "blocksPerLevel", 1)
|
||||
);
|
||||
|
||||
if (EnchantioConfig.getBoolean(configurationSection, "enabled", true)) {
|
||||
|
||||
Reference in New Issue
Block a user