mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 07:06:45 +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) {
|
public boolean isOneBlockPlant(Material material) {
|
||||||
return !(material == Material.CACTUS || material == Material.CHORUS_PLANT
|
return !mcMMO.getMaterialMapStore().isMultiBlock(material);
|
||||||
|| material == Material.SUGAR_CANE || material == Material.KELP_PLANT || material == Material.KELP
|
|
||||||
|| material == Material.TALL_SEAGRASS || material == Material.TALL_GRASS || material == Material.BAMBOO);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -20,6 +20,7 @@ public class MaterialMapStore {
|
|||||||
private HashSet<String> herbalismAbilityBlackList;
|
private HashSet<String> herbalismAbilityBlackList;
|
||||||
private HashSet<String> blockCrackerWhiteList;
|
private HashSet<String> blockCrackerWhiteList;
|
||||||
private HashSet<String> canMakeShroomyWhiteList;
|
private HashSet<String> canMakeShroomyWhiteList;
|
||||||
|
private HashSet<String> multiBlockEntities;
|
||||||
|
|
||||||
public MaterialMapStore()
|
public MaterialMapStore()
|
||||||
{
|
{
|
||||||
@ -30,10 +31,16 @@ public class MaterialMapStore {
|
|||||||
herbalismAbilityBlackList = new HashSet<>();
|
herbalismAbilityBlackList = new HashSet<>();
|
||||||
blockCrackerWhiteList = new HashSet<>();
|
blockCrackerWhiteList = new HashSet<>();
|
||||||
canMakeShroomyWhiteList = new HashSet<>();
|
canMakeShroomyWhiteList = new HashSet<>();
|
||||||
|
multiBlockEntities = new HashSet<>();
|
||||||
|
|
||||||
fillHardcodedHashSets();
|
fillHardcodedHashSets();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isMultiBlock(Material material)
|
||||||
|
{
|
||||||
|
return multiBlockEntities.contains(material.getKey().getKey());
|
||||||
|
}
|
||||||
|
|
||||||
public boolean isAbilityActivationBlackListed(Material material)
|
public boolean isAbilityActivationBlackListed(Material material)
|
||||||
{
|
{
|
||||||
return abilityBlackList.contains(material.getKey().getKey());
|
return abilityBlackList.contains(material.getKey().getKey());
|
||||||
@ -78,6 +85,19 @@ public class MaterialMapStore {
|
|||||||
fillHerbalismAbilityBlackList();
|
fillHerbalismAbilityBlackList();
|
||||||
fillBlockCrackerWhiteList();
|
fillBlockCrackerWhiteList();
|
||||||
fillShroomyWhiteList();
|
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()
|
private void fillShroomyWhiteList()
|
||||||
|
Loading…
Reference in New Issue
Block a user