Armor Display Item fix in Material=Block

Former-commit-id: 25fba9c1510de963070c899f8a2329aceafa93fd [formerly e16b0753355eedfe832c26c713d5c687eefb98bc]
Former-commit-id: 66cf0cf7c58c92d8ceb918f5af368bd367a85220
This commit is contained in:
Vlele committed 2019-06-08 13:44:05 +08:00
1 parent 0d11e050e7
commit 3c2159cdf2
1 file changed
+10 -2
@@ -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());