Skip to content

Commit

Permalink
Merge pull request #388 from PseudoKnight/master
Browse files Browse the repository at this point in the history
Fix protections for potted plants and undyed shulker boxes
  • Loading branch information
me4502 committed Sep 26, 2018
2 parents 01dfebe + d3c4681 commit 7fb7d59
Showing 1 changed file with 5 additions and 2 deletions.
Expand Up @@ -56,6 +56,7 @@ public final class Materials {
private static Set<Material> shulkerBoxes = new HashSet<>();

static {
shulkerBoxes.add(Material.SHULKER_BOX);
shulkerBoxes.add(Material.WHITE_SHULKER_BOX);
shulkerBoxes.add(Material.ORANGE_SHULKER_BOX);
shulkerBoxes.add(Material.MAGENTA_SHULKER_BOX);
Expand Down Expand Up @@ -236,7 +237,6 @@ public final class Materials {
MATERIAL_FLAGS.put(Material.COMMAND_BLOCK, MODIFIED_ON_RIGHT);
MATERIAL_FLAGS.put(Material.BEACON, MODIFIED_ON_RIGHT);
MATERIAL_FLAGS.put(Material.COBBLESTONE_WALL, 0);
MATERIAL_FLAGS.put(Material.FLOWER_POT, MODIFIED_ON_RIGHT);
MATERIAL_FLAGS.put(Material.ANVIL, MODIFIED_ON_RIGHT);
MATERIAL_FLAGS.put(Material.TRAPPED_CHEST, MODIFIED_ON_RIGHT);
MATERIAL_FLAGS.put(Material.HEAVY_WEIGHTED_PRESSURE_PLATE, 0);
Expand Down Expand Up @@ -607,6 +607,9 @@ public final class Materials {
for (Material button : Tag.BUTTONS.getValues()) {
MATERIAL_FLAGS.put(button, MODIFIED_ON_RIGHT);
}
for (Material pot : Tag.FLOWER_POTS.getValues()) {
MATERIAL_FLAGS.put(pot, MODIFIED_ON_RIGHT);
}

// Check for missing items/blocks
for (Material material : Material.values()) {
Expand Down Expand Up @@ -1090,7 +1093,7 @@ public static boolean isItemAppliedToBlock(Material item, Material block) {
public static boolean isConsideredBuildingIfUsed(Material type) {
return type == Material.REPEATER
|| type == Material.COMPARATOR
|| type == Material.FLOWER_POT;
|| Tag.FLOWER_POTS.getValues().contains(type);
}

/**
Expand Down

0 comments on commit 7fb7d59

Please sign in to comment.