Skip to content

Commit

Permalink
Fix protections for potted plants and undyed shulker boxes
Browse files Browse the repository at this point in the history
  • Loading branch information
PseudoKnight committed Sep 23, 2018
1 parent e43daa7 commit d3c4681
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
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 d3c4681

Please sign in to comment.