From 75f6b2aabdbe74d602fecaf456cf4787ba7be7da Mon Sep 17 00:00:00 2001 From: ken-kentan Date: Mon, 28 Jan 2019 13:11:22 +0900 Subject: [PATCH 1/2] fix legacy wall_banner id, add legacy_brewing_stand --- .../gamingmesh/jobs/CMILib/ItemManager.java | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/main/java/com/gamingmesh/jobs/CMILib/ItemManager.java b/src/main/java/com/gamingmesh/jobs/CMILib/ItemManager.java index cd7e44aa..caa0427a 100644 --- a/src/main/java/com/gamingmesh/jobs/CMILib/ItemManager.java +++ b/src/main/java/com/gamingmesh/jobs/CMILib/ItemManager.java @@ -671,7 +671,7 @@ public class ItemManager { BLACK_STAINED_GLASS(95, 15, 13941, "Black Stained Glass"), BLACK_STAINED_GLASS_PANE(160, 15, 13201, "Black Stained Glass Pane"), BLACK_TERRACOTTA(159, 15, 26691, "Black Terracotta"), - BLACK_WALL_BANNER(117, 0, 4919, "Black Banner"), + BLACK_WALL_BANNER(177, 0, 4919, "Black Banner"), BLACK_WOOL(35, 15, 16693, "Black Wool"), BLAZE_POWDER(377, 0, 18941, "Blaze Powder"), BLAZE_ROD(369, 0, 8289, "Blaze Rod"), @@ -689,7 +689,7 @@ public class ItemManager { BLUE_STAINED_GLASS(95, 11, 7107, "Blue Stained Glass"), BLUE_STAINED_GLASS_PANE(160, 11, 28484, "Blue Stained Glass Pane"), BLUE_TERRACOTTA(159, 11, 5236, "Blue Terracotta"), - BLUE_WALL_BANNER(117, 4, 17757, "Blue Banner"), + BLUE_WALL_BANNER(177, 4, 17757, "Blue Banner"), BLUE_WOOL(35, 11, 15738, "Blue Wool"), BONE(352, 0, 5686, "Bone"), BONE_BLOCK(216, 0, 17312, "Bone Block"), @@ -721,7 +721,7 @@ public class ItemManager { BROWN_STAINED_GLASS(95, 12, 20945, "Brown Stained Glass"), BROWN_STAINED_GLASS_PANE(160, 12, 17557, "Brown Stained Glass Pane"), BROWN_TERRACOTTA(159, 12, 23664, "Brown Terracotta"), - BROWN_WALL_BANNER(117, 3, 14731, "Brown Banner"), + BROWN_WALL_BANNER(177, 3, 14731, "Brown Banner"), BROWN_WOOL(35, 12, 32638, "Brown Wool"), BUBBLE_COLUMN(-1, -1, 13758, "Bubble Column"), BUBBLE_CORAL(-1, -1, 12464, "Bubble Coral"), @@ -806,7 +806,7 @@ public class ItemManager { CYAN_STAINED_GLASS(95, 9, 30604, "Cyan Stained Glass"), CYAN_STAINED_GLASS_PANE(160, 9, 11784, "Cyan Stained Glass Pane"), CYAN_TERRACOTTA(159, 9, 25940, "Cyan Terracotta"), - CYAN_WALL_BANNER(117, 6, 10889, "Cyan Banner"), + CYAN_WALL_BANNER(177, 6, 10889, "Cyan Banner"), CYAN_WOOL(35, 9, 12221, "Cyan Wool"), DAMAGED_ANVIL(145, 2, 10274, "Damaged Anvil"), DANDELION(37, 0, 30558, "Dandelion", "YELLOW_FLOWER"), @@ -963,7 +963,7 @@ public class ItemManager { GRAY_STAINED_GLASS(95, 7, 29979, "Gray Stained Glass"), GRAY_STAINED_GLASS_PANE(160, 7, 25272, "Gray Stained Glass Pane"), GRAY_TERRACOTTA(159, 7, 18004, "Gray Terracotta"), - GRAY_WALL_BANNER(117, 8, 24275, "Gray Banner"), + GRAY_WALL_BANNER(177, 8, 24275, "Gray Banner"), GRAY_WOOL(35, 7, 27209, "Gray Wool"), GREEN_BANNER(425, 2, 10698, "Green Banner"), GREEN_BED(355, 13, 13797, "Green Bed"), @@ -975,7 +975,7 @@ public class ItemManager { GREEN_STAINED_GLASS(95, 13, 22503, "Green Stained Glass"), GREEN_STAINED_GLASS_PANE(160, 13, 4767, "Green Stained Glass Pane", "STAINED_GLASS_PANE"), GREEN_TERRACOTTA(159, 13, 4105, "Green Terracotta"), - GREEN_WALL_BANNER(117, 2, 15046, "Green Banner"), + GREEN_WALL_BANNER(177, 2, 15046, "Green Banner"), GREEN_WOOL(35, 13, 25085, "Green Wool"), GUARDIAN_SPAWN_EGG(383, 68, 20113, "Spawn Guardian", "Guardian Spawn Egg"), GUNPOWDER(289, 0, 29974, "Gunpowder", "SULPHUR"), @@ -1061,7 +1061,7 @@ public class ItemManager { LIGHT_BLUE_STAINED_GLASS(95, 3, 17162, "Light Blue Stained Glass"), LIGHT_BLUE_STAINED_GLASS_PANE(160, 3, 18721, "Light Blue Stained Glass Pane"), LIGHT_BLUE_TERRACOTTA(159, 3, 31779, "Light Blue Terracotta"), - LIGHT_BLUE_WALL_BANNER(117, 12, 12011, "Light Blue Banner"), + LIGHT_BLUE_WALL_BANNER(177, 12, 12011, "Light Blue Banner"), LIGHT_BLUE_WOOL(35, 3, 21073, "Light Blue Wool"), LIGHT_GRAY_BANNER(425, 7, 11417, "Light Gray Banner"), LIGHT_GRAY_BED(355, 8, 5090, "Light Gray Bed"), @@ -1074,7 +1074,7 @@ public class ItemManager { LIGHT_GRAY_STAINED_GLASS(95, 8, 5843, "Light Gray Stained Glass"), LIGHT_GRAY_STAINED_GLASS_PANE(160, 8, 19008, "Light Gray Stained Glass Pane"), LIGHT_GRAY_TERRACOTTA(159, 8, 26388, "Light Gray Terracotta"), - LIGHT_GRAY_WALL_BANNER(117, 7, 31088, "Light Gray Banner"), + LIGHT_GRAY_WALL_BANNER(177, 7, 31088, "Light Gray Banner"), LIGHT_GRAY_WOOL(35, 8, 22936, "Light Gray Wool"), LIGHT_WEIGHTED_PRESSURE_PLATE(147, 0, 14875, "Light Weighted Pressure Plate", "GOLD_PLATE"), LILAC(175, 1, 22837, "Lilac"), @@ -1090,7 +1090,7 @@ public class ItemManager { LIME_STAINED_GLASS(95, 5, 24266, "Lime Stained Glass"), LIME_STAINED_GLASS_PANE(160, 5, 10610, "Lime Stained Glass Pane"), LIME_TERRACOTTA(159, 5, 24013, "Lime Terracotta"), - LIME_WALL_BANNER(117, 10, 21422, "Lime Banner"), + LIME_WALL_BANNER(177, 10, 21422, "Lime Banner"), LIME_WOOL(35, 5, 10443, "Lime Wool"), LINGERING_POTION(441, 0, 25857, "Lingering Potion"), LLAMA_SPAWN_EGG(383, 103, 23640, "Spawn Llama", "Llama Spawn Egg"), @@ -1105,7 +1105,7 @@ public class ItemManager { MAGENTA_STAINED_GLASS(95, 2, 26814, "Magenta Stained Glass"), MAGENTA_STAINED_GLASS_PANE(160, 2, 14082, "Magenta Stained Glass Pane"), MAGENTA_TERRACOTTA(159, 2, 25900, "Magenta Terracotta"), - MAGENTA_WALL_BANNER(117, 13, 23291, "Magenta Banner"), + MAGENTA_WALL_BANNER(177, 13, 23291, "Magenta Banner"), MAGENTA_WOOL(35, 2, 11853, "Magenta Wool"), MAGMA_BLOCK(213, 0, 25927, "Magma Block", "MAGMA"), MAGMA_CREAM(378, 0, 25097, "Magma Cream"), @@ -1183,7 +1183,7 @@ public class ItemManager { ORANGE_STAINED_GLASS_PANE(160, 1, 21089, "Orange Stained Glass Pane"), ORANGE_TERRACOTTA(159, 1, 18684, "Orange Terracotta"), ORANGE_TULIP(38, 5, 26038, "Orange Tulip"), - ORANGE_WALL_BANNER(117, 114, 9936, "Orange Banner"), + ORANGE_WALL_BANNER(177, 114, 9936, "Orange Banner"), ORANGE_WOOL(35, 1, 23957, "Orange Wool"), OXEYE_DAISY(38, 8, 11709, "Oxeye Daisy"), PACKED_ICE(174, 0, 28993, "Packed Ice"), @@ -1207,7 +1207,7 @@ public class ItemManager { PINK_STAINED_GLASS_PANE(160, 6, 24637, "Pink Stained Glass Pane"), PINK_TERRACOTTA(159, 6, 23727, "Pink Terracotta"), PINK_TULIP(38, 7, 27319, "Pink Tulip"), - PINK_WALL_BANNER(117, 9, 9421, "Pink Banner"), + PINK_WALL_BANNER(177, 9, 9421, "Pink Banner"), PINK_WOOL(35, 6, 7611, "Pink Wool"), PISTON(33, 0, 21130, "Piston", "PISTON_BASE"), PISTON_HEAD(34, 0, 30226, "Piston Head", "PISTON_EXTENSION"), @@ -1319,7 +1319,7 @@ public class ItemManager { PURPLE_STAINED_GLASS(95, 10, 21845, "Purple Stained Glass"), PURPLE_STAINED_GLASS_PANE(160, 10, 10948, "Purple Stained Glass Pane"), PURPLE_TERRACOTTA(159, 10, 10387, "Purple Terracotta"), - PURPLE_WALL_BANNER(117, 5, 14298, "Purple Banner"), + PURPLE_WALL_BANNER(177, 5, 14298, "Purple Banner"), PURPLE_WOOL(35, 10, 11922, "Purple Wool"), PURPUR_BLOCK(201, 0, 7538, "Purpur Block"), PURPUR_PILLAR(202, 0, 26718, "Purpur Pillar"), @@ -1361,7 +1361,7 @@ public class ItemManager { RED_STAINED_GLASS_PANE(160, 14, 8630, "Red Stained Glass Pane"), RED_TERRACOTTA(159, 14, 5086, "Red Terracotta"), RED_TULIP(38, 4, 16781, "Red Tulip"), - RED_WALL_BANNER(117, 1, 4378, "Red Banner"), + RED_WALL_BANNER(177, 1, 4378, "Red Banner"), RED_WOOL(35, 14, 11621, "Red Wool"), REPEATER(356, 0, 28823, "Redstone Repeater"), REPEATING_COMMAND_BLOCK(-1, -1, 12405, "Repeating Command Block"), @@ -1555,7 +1555,7 @@ public class ItemManager { LEGACY_CAKE_BLOCK(92, 0, -1, "Cake Block"), LEGACY_DIODE_BLOCK_OFF(93, 0, -1, "Diode Block Off"), LEGACY_DIODE_BLOCK_ON(94, 0, -1, "Diode Block On"), -// LEGACY_BREWING_STAND(117, -1, -1, "LEGACY_BREWING_STAND", ""), + LEGACY_BREWING_STAND(117, 0, -1, "Brewing Stand"), // LEGACY_CAULDRON(118, 0, -1, "LEGACY_CAULDRON", ""), // LEGACY_REDSTONE_LAMP_ON(124, -1, -1, "LEGACY_REDSTONE_LAMP_ON", ""), // LEGACY_WOOD_DOUBLE_STEP(125, -1, -1, "LEGACY_WOOD_DOUBLE_STEP", ""), From f3a9346dba2b8d514a94a18247932ba56043db31 Mon Sep 17 00:00:00 2001 From: ken-kentan Date: Mon, 28 Jan 2019 13:11:52 +0900 Subject: [PATCH 2/2] fix #337 --- .../java/com/gamingmesh/jobs/listeners/JobsPaymentListener.java | 2 +- .../java/com/gamingmesh/jobs/stuff/FurnaceBrewingHandling.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/gamingmesh/jobs/listeners/JobsPaymentListener.java b/src/main/java/com/gamingmesh/jobs/listeners/JobsPaymentListener.java index 1aa03592..c9a425e3 100644 --- a/src/main/java/com/gamingmesh/jobs/listeners/JobsPaymentListener.java +++ b/src/main/java/com/gamingmesh/jobs/listeners/JobsPaymentListener.java @@ -1458,7 +1458,7 @@ public class JobsPaymentListener implements Listener { "[current]", jPlayer.getFurnaceCount(), "[max]", jPlayer.getMaxFurnacesAllowed() == 0 ? "-" : jPlayer.getMaxFurnacesAllowed())); } - } else if (CMIMaterial.get(block).equals(CMIMaterial.BREWING_STAND)) { + } else if (CMIMaterial.get(block).equals(CMIMaterial.BREWING_STAND) || CMIMaterial.get(block).equals(CMIMaterial.LEGACY_BREWING_STAND)) { if (!Jobs.getGCManager().isBrewingStandsReassign()) return; diff --git a/src/main/java/com/gamingmesh/jobs/stuff/FurnaceBrewingHandling.java b/src/main/java/com/gamingmesh/jobs/stuff/FurnaceBrewingHandling.java index 2755e7ef..ceab6f01 100644 --- a/src/main/java/com/gamingmesh/jobs/stuff/FurnaceBrewingHandling.java +++ b/src/main/java/com/gamingmesh/jobs/stuff/FurnaceBrewingHandling.java @@ -289,7 +289,7 @@ public class FurnaceBrewingHandling { public static ownershipFeedback registerBrewingStand(Player player, Block block) { - if (!CMIMaterial.get(block).equals(CMIMaterial.BREWING_STAND)) + if (!CMIMaterial.get(block).equals(CMIMaterial.BREWING_STAND) && !CMIMaterial.get(block).equals(CMIMaterial.LEGACY_BREWING_STAND)) return ownershipFeedback.invalid; JobsPlayer jPlayer = Jobs.getPlayerManager().getJobsPlayer(player);