diff --git a/src/main/java/io/josemmo/bukkit/plugin/renderer/FakeImage.java b/src/main/java/io/josemmo/bukkit/plugin/renderer/FakeImage.java index 12a3185..9750bf2 100644 --- a/src/main/java/io/josemmo/bukkit/plugin/renderer/FakeImage.java +++ b/src/main/java/io/josemmo/bukkit/plugin/renderer/FakeImage.java @@ -349,10 +349,11 @@ private void load() { // Generate frames frames = new FakeItemFrame[width*height]; + boolean glowing = hasFlag(FLAG_GLOWING); for (int col=0; col= 17; private static final AtomicInteger lastFrameId = new AtomicInteger(MAX_FRAME_ID); private final int id; private final Location location; private final BlockFace face; private final Rotation rotation; + private final boolean glowing; private final FakeMap[] maps; /** @@ -44,13 +47,21 @@ private static int getNextId() { * @param location Frame location * @param face Block face * @param rotation Frame rotation + * @param glowing Whether is glowing or regular frame * @param maps Fake maps to animate */ - public FakeItemFrame(@NotNull Location location, @NotNull BlockFace face, @NotNull Rotation rotation, @NotNull FakeMap[] maps) { + public FakeItemFrame( + @NotNull Location location, + @NotNull BlockFace face, + @NotNull Rotation rotation, + boolean glowing, + @NotNull FakeMap[] maps + ) { this.id = getNextId(); this.location = location; this.face = face; this.rotation = rotation; + this.glowing = glowing; this.maps = maps; plugin.fine("Created FakeItemFrame#" + this.id + " using " + this.maps.length + " FakeMap(s)"); } @@ -100,7 +111,7 @@ public void spawn(@NotNull Player player) { // Create item frame entity SpawnEntityPacket framePacket = new SpawnEntityPacket(); framePacket.setId(id) - .setEntityType(EntityType.ITEM_FRAME) + .setEntityType((glowing && SUPPORTS_GLOWING) ? EntityType.GLOW_ITEM_FRAME : EntityType.ITEM_FRAME) .setPosition(x, y, z) .setRotation(pitch, yaw) .setData(orientation);