Skip to content

Commit 9ebb668

Browse files
committed
Image Support
1 parent 1ce374e commit 9ebb668

File tree

331 files changed

+782
-439
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

331 files changed

+782
-439
lines changed

TODO

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
High Priority Tasks:
22
- Fix Interaction Support for Virtual Machine / Browser
3-
- Build QEMU Statically for All Platforms
4-
- Add Support for Images / GIFs
5-
- Rewrite all JavaDocs
3+
- Compile QEMU Statically
4+
- Rewrite all JavaDocs / Code Clean Up
65

76
Medium Priority Tasks:
87
- Create Showcase Video

mcav-bukkit/src/main/java/me/brandonli/mcav/bukkit/media/image/BlockImage.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ public void displayImage(final StaticImage image) {
8989

9090
@Override
9191
public void release() {
92+
if (this.locationCache == null) {
93+
return;
94+
}
9295
final BlockData empty = Material.AIR.createBlockData();
9396
final BlockState emptyState = empty.createBlockState();
9497
final Collection<BlockState> blockStates = new HashSet<>();

mcav-bukkit/src/main/java/me/brandonli/mcav/bukkit/media/image/DisplayableImage.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,7 @@
1717
*/
1818
package me.brandonli.mcav.bukkit.media.image;
1919

20-
import me.brandonli.mcav.bukkit.media.config.ChatConfiguration;
21-
import me.brandonli.mcav.bukkit.media.config.EntityConfiguration;
22-
import me.brandonli.mcav.bukkit.media.config.MapConfiguration;
23-
import me.brandonli.mcav.bukkit.media.config.ScoreboardConfiguration;
20+
import me.brandonli.mcav.bukkit.media.config.*;
2421
import me.brandonli.mcav.media.image.StaticImage;
2522
import me.brandonli.mcav.media.player.pipeline.filter.video.dither.algorithm.DitherAlgorithm;
2623

@@ -93,4 +90,8 @@ static DisplayableImage entity(final EntityConfiguration entityConfiguration) {
9390
static DisplayableImage scoreboard(final ScoreboardConfiguration scoreboardConfiguration) {
9491
return new ScoreboardImage(scoreboardConfiguration);
9592
}
93+
94+
static DisplayableImage block(final BlockConfiguration blockConfiguration) {
95+
return new BlockImage(blockConfiguration);
96+
}
9697
}

mcav-bukkit/src/main/java/me/brandonli/mcav/bukkit/media/image/EntityImage.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
import static java.util.Objects.requireNonNull;
2121

2222
import java.util.Collection;
23-
import java.util.SplittableRandom;
2423
import java.util.UUID;
2524
import me.brandonli.mcav.bukkit.MCAVBukkit;
2625
import me.brandonli.mcav.bukkit.media.config.EntityConfiguration;
@@ -52,8 +51,6 @@
5251
*/
5352
public class EntityImage implements DisplayableImage {
5453

55-
private static final SplittableRandom SPLITTABLE_RANDOM = new SplittableRandom();
56-
5754
private final EntityConfiguration entityConfiguration;
5855

5956
private TextDisplay entity;
@@ -114,6 +111,9 @@ public void displayImage(final StaticImage data) {
114111
*/
115112
@Override
116113
public void release() {
114+
if (this.entity == null) {
115+
return;
116+
}
117117
final BukkitScheduler scheduler = Bukkit.getScheduler();
118118
final Plugin plugin = MCAVBukkit.getPlugin();
119119
scheduler.runTask(plugin, this::release0);

mcav-bukkit/src/main/java/me/brandonli/mcav/bukkit/media/result/ScoreboardResult.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
import static java.util.Objects.requireNonNull;
2121

22+
import io.papermc.paper.scoreboard.numbers.NumberFormat;
2223
import java.util.Collection;
2324
import java.util.UUID;
2425
import me.brandonli.mcav.bukkit.MCAVBukkit;
@@ -80,6 +81,7 @@ private void start0() {
8081
@SuppressWarnings("deprecation")
8182
final Objective objective = scoreboard.registerNewObjective(objectiveName, "dummy", "");
8283
objective.setDisplaySlot(DisplaySlot.SIDEBAR);
84+
objective.numberFormat(NumberFormat.blank());
8385
for (int i = 0; i < lines; i++) {
8486
final UUID random = UUID.randomUUID();
8587
final String name = random.toString();
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

mcav-bukkit/src/test/resources/colored-blocks/blast_furnace_front_on.png.mcmeta

Lines changed: 0 additions & 6 deletions
This file was deleted.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

mcav-bukkit/src/test/resources/colored-blocks/campfire_fire.png.mcmeta

Lines changed: 0 additions & 5 deletions
This file was deleted.
Binary file not shown.
Binary file not shown.

mcav-bukkit/src/test/resources/colored-blocks/campfire_log_lit.png.mcmeta

Lines changed: 0 additions & 6 deletions
This file was deleted.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

mcav-bukkit/src/test/resources/colored-blocks/chain_command_block_back.png.mcmeta

Lines changed: 0 additions & 6 deletions
This file was deleted.
Binary file not shown.

mcav-bukkit/src/test/resources/colored-blocks/chain_command_block_conditional.png.mcmeta

Lines changed: 0 additions & 6 deletions
This file was deleted.
Binary file not shown.

mcav-bukkit/src/test/resources/colored-blocks/chain_command_block_front.png.mcmeta

Lines changed: 0 additions & 6 deletions
This file was deleted.
Binary file not shown.

mcav-bukkit/src/test/resources/colored-blocks/chain_command_block_side.png.mcmeta

Lines changed: 0 additions & 6 deletions
This file was deleted.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

mcav-bukkit/src/test/resources/colored-blocks/command_block_back.png.mcmeta

Lines changed: 0 additions & 6 deletions
This file was deleted.
Binary file not shown.

mcav-bukkit/src/test/resources/colored-blocks/command_block_conditional.png.mcmeta

Lines changed: 0 additions & 6 deletions
This file was deleted.
Binary file not shown.

mcav-bukkit/src/test/resources/colored-blocks/command_block_front.png.mcmeta

Lines changed: 0 additions & 6 deletions
This file was deleted.
Binary file not shown.

mcav-bukkit/src/test/resources/colored-blocks/command_block_side.png.mcmeta

Lines changed: 0 additions & 6 deletions
This file was deleted.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

mcav-bukkit/src/test/resources/colored-blocks/crimson_stem.png.mcmeta

Lines changed: 0 additions & 6 deletions
This file was deleted.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

mcav-bukkit/src/test/resources/colored-blocks/fire_0.png.mcmeta

Lines changed: 0 additions & 38 deletions
This file was deleted.
Binary file not shown.

mcav-bukkit/src/test/resources/colored-blocks/fire_1.png.mcmeta

Lines changed: 0 additions & 3 deletions
This file was deleted.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

mcav-bukkit/src/test/resources/colored-blocks/firefly_bush_emissive.png.mcmeta

Lines changed: 0 additions & 5 deletions
This file was deleted.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

mcav-bukkit/src/test/resources/colored-blocks/kelp.png.mcmeta

Lines changed: 0 additions & 5 deletions
This file was deleted.

mcav-bukkit/src/test/resources/colored-blocks/kelp_plant.png.mcmeta

Lines changed: 0 additions & 5 deletions
This file was deleted.

mcav-bukkit/src/test/resources/colored-blocks/lantern.png.mcmeta

Lines changed: 0 additions & 5 deletions
This file was deleted.

mcav-bukkit/src/test/resources/colored-blocks/lava_flow.png.mcmeta

Lines changed: 0 additions & 5 deletions
This file was deleted.

mcav-bukkit/src/test/resources/colored-blocks/lava_still.png.mcmeta

Lines changed: 0 additions & 45 deletions
This file was deleted.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

mcav-bukkit/src/test/resources/colored-blocks/magma.png.mcmeta

Lines changed: 0 additions & 11 deletions
This file was deleted.
Binary file not shown.
Binary file not shown.
Binary file not shown.

mcav-bukkit/src/test/resources/colored-blocks/nether_portal.png.mcmeta

Lines changed: 0 additions & 3 deletions
This file was deleted.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

mcav-bukkit/src/test/resources/colored-blocks/prismarine.png.mcmeta

Lines changed: 0 additions & 30 deletions
This file was deleted.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

mcav-bukkit/src/test/resources/colored-blocks/repeating_command_block_back.png.mcmeta

Lines changed: 0 additions & 6 deletions
This file was deleted.

mcav-bukkit/src/test/resources/colored-blocks/repeating_command_block_conditional.png.mcmeta

Lines changed: 0 additions & 6 deletions
This file was deleted.

mcav-bukkit/src/test/resources/colored-blocks/repeating_command_block_front.png.mcmeta

Lines changed: 0 additions & 6 deletions
This file was deleted.

mcav-bukkit/src/test/resources/colored-blocks/repeating_command_block_side.png.mcmeta

Lines changed: 0 additions & 6 deletions
This file was deleted.

mcav-bukkit/src/test/resources/colored-blocks/respawn_anchor_top.png.mcmeta

Lines changed: 0 additions & 3 deletions
This file was deleted.

mcav-bukkit/src/test/resources/colored-blocks/sculk.png.mcmeta

Lines changed: 0 additions & 6 deletions
This file was deleted.

mcav-bukkit/src/test/resources/colored-blocks/sculk_catalyst_side_bloom.png.mcmeta

Lines changed: 0 additions & 5 deletions
This file was deleted.

mcav-bukkit/src/test/resources/colored-blocks/sculk_catalyst_top_bloom.png.mcmeta

Lines changed: 0 additions & 5 deletions
This file was deleted.

mcav-bukkit/src/test/resources/colored-blocks/sculk_sensor_tendril_active.png.mcmeta

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)