From 3c2159cdf208f7e12ecc30e7acb5f26bd7cd7662 Mon Sep 17 00:00:00 2001 From: Vlele <1207223090@qq.com> Date: Sat, 8 Jun 2019 13:43:13 +0800 Subject: [PATCH] Armor Display Item fix in Material=Block Former-commit-id: 25fba9c1510de963070c899f8a2329aceafa93fd [formerly e16b0753355eedfe832c26c713d5c687eefb98bc] Former-commit-id: 66cf0cf7c58c92d8ceb918f5af368bd367a85220 --- .../quickshop/Shop/ArmorStandDisplayItem.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/maxgamer/quickshop/Shop/ArmorStandDisplayItem.java b/src/main/java/org/maxgamer/quickshop/Shop/ArmorStandDisplayItem.java index 82c929e93..5e8fff915 100644 --- a/src/main/java/org/maxgamer/quickshop/Shop/ArmorStandDisplayItem.java +++ b/src/main/java/org/maxgamer/quickshop/Shop/ArmorStandDisplayItem.java @@ -87,7 +87,11 @@ public class ArmorStandDisplayItem implements DisplayItem { } private void setPoseForArmorStand() { - this.armorStand.setRightArmPose(new EulerAngle(-89.5, 0, 0)); + if (this.originalItemStack.getType().isBlock()) { + this.armorStand.setRightArmPose(new EulerAngle(-0.2, 0, 0)); + } else { + this.armorStand.setRightArmPose(new EulerAngle(-89.5, 0, 0)); + } } @Override @@ -120,6 +124,10 @@ public class ArmorStandDisplayItem implements DisplayItem { .getFacing(); //Replace by container face. } Location asloc = this.shop.getLocation().clone(); + Util.debugLog("containerBlockFace " + containerBlockFace); + if(this.originalItemStack.getType().isBlock()){ + asloc.add(0, 1, 0); + } switch (containerBlockFace) { case SOUTH: if (Util.isTool(this.originalItemStack.getType())) { @@ -197,7 +205,7 @@ public class ArmorStandDisplayItem implements DisplayItem { continue; } ArmorStand eArmorStand = (ArmorStand) entity; - if (plugin.getItemMatcher().matches(eArmorStand.getItemInHand(),this.guardedIstack)) { + if (plugin.getItemMatcher().matches(eArmorStand.getItemInHand(), this.guardedIstack)) { if (!eArmorStand.getUniqueId().equals(this.armorStand.getUniqueId())) { Util.debugLog("Removing dupes ArmorEntity " + eArmorStand.getUniqueId().toString() + " at " + eArmorStand .getLocation().toString());