mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 21:26:46 +01:00
Fixing 1.13.2 bamboo material errors
This commit is contained in:
parent
3c08af363f
commit
f904ac7019
@ -176,9 +176,7 @@ public class HerbalismManager extends SkillManager {
|
||||
}
|
||||
|
||||
public boolean isOneBlockPlant(Material material) {
|
||||
return !(material == Material.CACTUS || material == Material.CHORUS_PLANT
|
||||
|| material == Material.SUGAR_CANE || material == Material.KELP_PLANT || material == Material.KELP
|
||||
|| material == Material.TALL_SEAGRASS || material == Material.TALL_GRASS || material == Material.BAMBOO);
|
||||
return !mcMMO.getMaterialMapStore().isMultiBlock(material);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -20,6 +20,7 @@ public class MaterialMapStore {
|
||||
private HashSet<String> herbalismAbilityBlackList;
|
||||
private HashSet<String> blockCrackerWhiteList;
|
||||
private HashSet<String> canMakeShroomyWhiteList;
|
||||
private HashSet<String> multiBlockEntities;
|
||||
|
||||
public MaterialMapStore()
|
||||
{
|
||||
@ -30,10 +31,16 @@ public class MaterialMapStore {
|
||||
herbalismAbilityBlackList = new HashSet<>();
|
||||
blockCrackerWhiteList = new HashSet<>();
|
||||
canMakeShroomyWhiteList = new HashSet<>();
|
||||
multiBlockEntities = new HashSet<>();
|
||||
|
||||
fillHardcodedHashSets();
|
||||
}
|
||||
|
||||
public boolean isMultiBlock(Material material)
|
||||
{
|
||||
return multiBlockEntities.contains(material.getKey().getKey());
|
||||
}
|
||||
|
||||
public boolean isAbilityActivationBlackListed(Material material)
|
||||
{
|
||||
return abilityBlackList.contains(material.getKey().getKey());
|
||||
@ -78,6 +85,19 @@ public class MaterialMapStore {
|
||||
fillHerbalismAbilityBlackList();
|
||||
fillBlockCrackerWhiteList();
|
||||
fillShroomyWhiteList();
|
||||
fillMultiBlockEntitiesList();
|
||||
}
|
||||
|
||||
private void fillMultiBlockEntitiesList()
|
||||
{
|
||||
multiBlockEntities.add("cactus");
|
||||
multiBlockEntities.add("chorus_plant");
|
||||
multiBlockEntities.add("sugar_cane");
|
||||
multiBlockEntities.add("kelp_plant");
|
||||
multiBlockEntities.add("kelp");
|
||||
multiBlockEntities.add("tall_seagrass");
|
||||
multiBlockEntities.add("tall_grass");
|
||||
multiBlockEntities.add("bamboo");
|
||||
}
|
||||
|
||||
private void fillShroomyWhiteList()
|
||||
|
Loading…
Reference in New Issue
Block a user