Skip to content

Commit 99f4915

Browse files
authored
Merge pull request #13 from GoldenShad0w/v1.0.11
v1.0.11
2 parents 2acac06 + 8314b73 commit 99f4915

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>goldenshadow</groupId>
88
<artifactId>DisplayEntityEditor</artifactId>
9-
<version>1.0.10</version>
9+
<version>1.0.11</version>
1010
<packaging>jar</packaging>
1111

1212
<name>DisplayEntityEditor</name>

src/main/java/goldenshadow/displayentityeditor/events/Interact.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,9 +361,16 @@ public static void cycleInventory(Player p) {
361361
*/
362362
private static void spawnDisplayEntity(Location location, EntityType type) {
363363
assert location.getWorld() != null;
364+
location.setYaw(0);
365+
location.setPitch(0);
366+
if (type != EntityType.BLOCK_DISPLAY) {
367+
location.setX((int) location.getX() + (((location.getX()) < 0 ? -1 : 1) * 0.5));
368+
location.setZ((int) location.getZ() + (((location.getZ()) < 0 ? -1 : 1) * 0.5));
369+
}
364370
if (location.getY() < 0) location.setY(location.getY() + 0.0001);
365371
Display d = (Display) location.getWorld().spawnEntity(location, type, false);
366372
d.setVisualFire(true);
373+
367374
if (d instanceof ItemDisplay) {
368375
((ItemDisplay) d).setItemStack(new ItemStack(Material.DIAMOND));
369376
}

0 commit comments

Comments
 (0)