Wildstash commited on
Commit
d3fc4e6
·
verified ·
1 Parent(s): 52c3ed1

Sync engraved Paper plugin source

Browse files
.gitattributes CHANGED
@@ -74,3 +74,4 @@ assets/afterblock_textures/gallery/contact_sheet_30.png filter=lfs diff=lfs merg
74
  assets/afterblock_textures/gallery/contact_sheet_31.png filter=lfs diff=lfs merge=lfs -text
75
  assets/afterblock_textures/gallery/contact_sheet_32.png filter=lfs diff=lfs merge=lfs -text
76
  server-kit/dreamwall-paper-bridge-0.1.0.jar filter=lfs diff=lfs merge=lfs -text
 
 
74
  assets/afterblock_textures/gallery/contact_sheet_31.png filter=lfs diff=lfs merge=lfs -text
75
  assets/afterblock_textures/gallery/contact_sheet_32.png filter=lfs diff=lfs merge=lfs -text
76
  server-kit/dreamwall-paper-bridge-0.1.0.jar filter=lfs diff=lfs merge=lfs -text
77
+ paper-plugin/target/dreamwall-paper-bridge-0.1.0.jar filter=lfs diff=lfs merge=lfs -text
paper-plugin/README.md CHANGED
@@ -9,8 +9,8 @@ The hackathon Space is the official submission surface. This plugin scaffold is
9
  - `/dreamwall` shows the configured Space endpoint.
10
  - `/dreamwall fetch` calls the Space app domain and confirms the bridge can reach Hugging Face.
11
  - `/dreamwall pack` asks the player client to load the Hugging Face-hosted `AfterBlockMuseum.zip` resource pack.
12
- - `/dreamwall demo` places a safe local pedestal/sign proof, spawns an `ItemDisplay` relic, adds a lectern passport book and spirit button, and gives the player a Paper item with `CustomModelData 730002`.
13
- - `/dreamwall import` calls the live `quick_curate` Gradio endpoint, parses the returned `dreamwall.museum.v1` packet, places a packet-derived pedestal/sign/`ItemDisplay`/lectern passport/spirit button/item at the artifact coordinates, paints a lit route from `YOU ARE HERE` to that plot, and gives the player a route compass.
14
  - `/dreamwall import here` uses the same live packet but places it two blocks in front of the player for fast video proof.
15
  - `/dreamwall museum where` prints the coordinate contract used by the Space and server.
16
  - `/dreamwall museum build` creates the 12 x 12 living museum campus at the configured origin, with plot pads, memory rails, hall gates, banner markers, and a `YOU ARE HERE` entry.
@@ -136,8 +136,8 @@ The jar will be in `target/dreamwall-paper-bridge-0.1.0.jar`.
136
  7. Run `/dreamwall pack` in game and accept the resource pack.
137
  8. Run `/dreamwall museum build` once to create the coordinate-accurate museum campus.
138
  9. Run `/dreamwall museum check` to confirm the built world matches the Space coordinate map.
139
- 10. Run `/dreamwall demo` in game to place a pedestal proof, visible `ItemDisplay`, lectern passport, spirit button, and receive the AirPods demo item.
140
- 11. Run `/dreamwall import` to place a live Hugging Face artifact packet at its generated plot, update the route trail, receive the route compass, and right-click the spirit button for the relic profile, or `/dreamwall import here` for a nearby proof.
141
 
142
  ## Local Server Proof
143
 
 
9
  - `/dreamwall` shows the configured Space endpoint.
10
  - `/dreamwall fetch` calls the Space app domain and confirms the bridge can reach Hugging Face.
11
  - `/dreamwall pack` asks the player client to load the Hugging Face-hosted `AfterBlockMuseum.zip` resource pack.
12
+ - `/dreamwall demo` places a safe local pedestal proof, spawns an `ItemDisplay` relic, engraves the name/caption in-world, adds a lectern passport book and profile button, and gives the player a Paper item with `CustomModelData 730002`.
13
+ - `/dreamwall import` calls the live `quick_curate` Gradio endpoint, parses the returned `dreamwall.museum.v1` packet, places a packet-derived pedestal/`ItemDisplay`/engraved nameplate/lectern passport/profile button/item at the artifact coordinates, paints a lit route from `YOU ARE HERE` to that plot, and gives the player a route compass.
14
  - `/dreamwall import here` uses the same live packet but places it two blocks in front of the player for fast video proof.
15
  - `/dreamwall museum where` prints the coordinate contract used by the Space and server.
16
  - `/dreamwall museum build` creates the 12 x 12 living museum campus at the configured origin, with plot pads, memory rails, hall gates, banner markers, and a `YOU ARE HERE` entry.
 
136
  7. Run `/dreamwall pack` in game and accept the resource pack.
137
  8. Run `/dreamwall museum build` once to create the coordinate-accurate museum campus.
138
  9. Run `/dreamwall museum check` to confirm the built world matches the Space coordinate map.
139
+ 10. Run `/dreamwall demo` in game to place a pedestal proof, visible `ItemDisplay`, engraved name/caption, lectern passport, profile button, and receive the AirPods demo item.
140
+ 11. Run `/dreamwall import` to place a live Hugging Face artifact packet at its generated plot, update the route trail, receive the route compass, and right-click the profile button for the relic history, or `/dreamwall import here` for a nearby proof.
141
 
142
  ## Local Server Proof
143
 
paper-plugin/src/main/java/com/dreamwall/DreamWallPlugin.java CHANGED
@@ -16,6 +16,7 @@ import com.google.gson.JsonNull;
16
  import com.google.gson.JsonObject;
17
  import com.google.gson.JsonParser;
18
 
 
19
  import org.bukkit.Location;
20
  import org.bukkit.Material;
21
  import org.bukkit.Particle;
@@ -30,6 +31,7 @@ import org.bukkit.command.CommandSender;
30
  import org.bukkit.entity.Display.Billboard;
31
  import org.bukkit.entity.ItemDisplay;
32
  import org.bukkit.entity.Player;
 
33
  import org.bukkit.event.EventHandler;
34
  import org.bukkit.event.Listener;
35
  import org.bukkit.event.block.Action;
@@ -133,7 +135,7 @@ public final class DreamWallPlugin extends JavaPlugin implements Listener {
133
  String xyz = getConfig().getString(key + ".xyz", "unknown");
134
 
135
  player.sendTitle(compactItemName(title), compactLore(spirit), 5, 70, 15);
136
- player.sendMessage("AfterBlock spirit: " + compactLore(spirit));
137
  player.sendMessage("History: " + compactLore(memory));
138
  player.sendMessage("Hall: " + hall + " | Owner: " + owner + " | XYZ " + xyz);
139
  }
@@ -284,10 +286,12 @@ public final class DreamWallPlugin extends JavaPlugin implements Listener {
284
  int customModelData = integer(minecraft, "custom_model_data", 730001);
285
  String command = giveCommand(customModelData);
286
  ItemStack item = artifactItem(title, customModelData,
287
- List.of("Owner: " + owner, "Hall: " + hall, "XYZ: " + base.getBlockX() + " " + base.getBlockY() + " " + base.getBlockZ(), compactLore(memory)));
 
288
  ItemStack passport = passportBook(title, owner, hall, zone, memory, spirit, command, base, customModelData);
289
  player.getInventory().addItem(item, passport);
290
  placeDisplayRelic(world, base, item);
 
291
  placePassportLectern(world, base, passport);
292
  placeSpiritButton(world, base, title, owner, hall, memory, spirit);
293
  if (!placeHere) {
@@ -298,7 +302,7 @@ public final class DreamWallPlugin extends JavaPlugin implements Listener {
298
  }
299
  world.spawnParticle(Particle.ENCHANT, base.clone().add(0.5, 1.4, 0.5), 38, 0.45, 0.65, 0.45, 0.015);
300
  player.sendMessage("Imported " + title + " by " + owner + " into " + hall + ".");
301
- player.sendMessage("Displayed item, placed passport lectern, and gave CustomModelData " + customModelData + ".");
302
  if (!placeHere) {
303
  player.sendMessage("Placed at packet coordinates " + base.getBlockX() + " " + base.getBlockY() + " " + base.getBlockZ()
304
  + " and updated the lit route from YOU ARE HERE.");
@@ -334,7 +338,8 @@ public final class DreamWallPlugin extends JavaPlugin implements Listener {
334
  }
335
 
336
  ItemStack item = artifactItem("AfterBlock AirPods Relic", 730002,
337
- List.of("Owner: @Wildstash", "Hall: Hall of Companions", "XYZ: " + base.getBlockX() + " " + base.getBlockY() + " " + base.getBlockZ(), "Private worlds through public noise."));
 
338
  ItemStack passport = passportBook(
339
  "AfterBlock AirPods Relic",
340
  "@Wildstash",
@@ -347,12 +352,14 @@ public final class DreamWallPlugin extends JavaPlugin implements Listener {
347
  730002);
348
  player.getInventory().addItem(item, passport);
349
  placeDisplayRelic(world, base, item);
 
 
350
  placePassportLectern(world, base, passport);
351
  placeSpiritButton(world, base, "AfterBlock AirPods Relic", "@Wildstash", "Hall of Companions",
352
  "A small object that carried private worlds through public noise.",
353
  "I am what remained when a pocket object became a place.");
354
  world.spawnParticle(Particle.ENCHANT, base.clone().add(0.5, 1.4, 0.5), 28, 0.35, 0.55, 0.35, 0.01);
355
- sender.sendMessage("Placed demo pedestal, displayed relic item, lectern passport, spirit button, and gave Paper item with CustomModelData 730002.");
356
  sender.sendMessage("Run /dreamwall pack and accept the pack to see the generated item model.");
357
  }
358
 
@@ -854,6 +861,35 @@ public final class DreamWallPlugin extends JavaPlugin implements Listener {
854
  });
855
  }
856
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
857
  private ItemStack passportBook(String title, String owner, String hall, String zone, String memory, String spirit,
858
  String command, Location base, int customModelData) {
859
  ItemStack book = new ItemStack(Material.WRITTEN_BOOK);
@@ -902,7 +938,7 @@ public final class DreamWallPlugin extends JavaPlugin implements Listener {
902
  getConfig().set(key + ".xyz", base.getBlockX() + " " + base.getBlockY() + " " + base.getBlockZ());
903
  saveConfig();
904
  placeStandingSign(world, base.getBlockX() - 4, base.getBlockY(), base.getBlockZ() - 2,
905
- "Spirit button", "right-click", "profile + lore", compactItemName(title));
906
  }
907
 
908
  private String spiritButtonKey(Location location) {
 
16
  import com.google.gson.JsonObject;
17
  import com.google.gson.JsonParser;
18
 
19
+ import org.bukkit.Color;
20
  import org.bukkit.Location;
21
  import org.bukkit.Material;
22
  import org.bukkit.Particle;
 
31
  import org.bukkit.entity.Display.Billboard;
32
  import org.bukkit.entity.ItemDisplay;
33
  import org.bukkit.entity.Player;
34
+ import org.bukkit.entity.TextDisplay;
35
  import org.bukkit.event.EventHandler;
36
  import org.bukkit.event.Listener;
37
  import org.bukkit.event.block.Action;
 
135
  String xyz = getConfig().getString(key + ".xyz", "unknown");
136
 
137
  player.sendTitle(compactItemName(title), compactLore(spirit), 5, 70, 15);
138
+ player.sendMessage("Relic profile: " + compactLore(spirit));
139
  player.sendMessage("History: " + compactLore(memory));
140
  player.sendMessage("Hall: " + hall + " | Owner: " + owner + " | XYZ " + xyz);
141
  }
 
286
  int customModelData = integer(minecraft, "custom_model_data", 730001);
287
  String command = giveCommand(customModelData);
288
  ItemStack item = artifactItem(title, customModelData,
289
+ List.of("Owner: " + owner, "Hall: " + hall, "XYZ: " + base.getBlockX() + " " + base.getBlockY() + " " + base.getBlockZ(),
290
+ "Caption: " + compactLore(memory), "Click profile button for full history."));
291
  ItemStack passport = passportBook(title, owner, hall, zone, memory, spirit, command, base, customModelData);
292
  player.getInventory().addItem(item, passport);
293
  placeDisplayRelic(world, base, item);
294
+ placeEngravedRelicText(world, base, title, owner, hall, memory, customModelData);
295
  placePassportLectern(world, base, passport);
296
  placeSpiritButton(world, base, title, owner, hall, memory, spirit);
297
  if (!placeHere) {
 
302
  }
303
  world.spawnParticle(Particle.ENCHANT, base.clone().add(0.5, 1.4, 0.5), 38, 0.45, 0.65, 0.45, 0.015);
304
  player.sendMessage("Imported " + title + " by " + owner + " into " + hall + ".");
305
+ player.sendMessage("Displayed item, engraved name/caption, placed passport lectern, and gave CustomModelData " + customModelData + ".");
306
  if (!placeHere) {
307
  player.sendMessage("Placed at packet coordinates " + base.getBlockX() + " " + base.getBlockY() + " " + base.getBlockZ()
308
  + " and updated the lit route from YOU ARE HERE.");
 
338
  }
339
 
340
  ItemStack item = artifactItem("AfterBlock AirPods Relic", 730002,
341
+ List.of("Owner: @Wildstash", "Hall: Hall of Companions", "XYZ: " + base.getBlockX() + " " + base.getBlockY() + " " + base.getBlockZ(),
342
+ "Caption: Private worlds through public noise.", "Click profile button for full history."));
343
  ItemStack passport = passportBook(
344
  "AfterBlock AirPods Relic",
345
  "@Wildstash",
 
352
  730002);
353
  player.getInventory().addItem(item, passport);
354
  placeDisplayRelic(world, base, item);
355
+ placeEngravedRelicText(world, base, "AfterBlock AirPods Relic", "@Wildstash", "Hall of Companions",
356
+ "A small object that carried private worlds through public noise.", 730002);
357
  placePassportLectern(world, base, passport);
358
  placeSpiritButton(world, base, "AfterBlock AirPods Relic", "@Wildstash", "Hall of Companions",
359
  "A small object that carried private worlds through public noise.",
360
  "I am what remained when a pocket object became a place.");
361
  world.spawnParticle(Particle.ENCHANT, base.clone().add(0.5, 1.4, 0.5), 28, 0.35, 0.55, 0.35, 0.01);
362
+ sender.sendMessage("Placed demo pedestal, displayed relic item, engraved name/caption, lectern passport, profile button, and gave Paper item with CustomModelData 730002.");
363
  sender.sendMessage("Run /dreamwall pack and accept the pack to see the generated item model.");
364
  }
365
 
 
861
  });
862
  }
863
 
864
+ private void placeEngravedRelicText(World world, Location base, String title, String owner, String hall, String memory,
865
+ int customModelData) {
866
+ String nameLine = compactItemName(title);
867
+ String captionLine = compactLore(memory);
868
+ String ownerLine = compactLore(owner + " | " + hall + " | CMD " + customModelData);
869
+
870
+ Location nameplate = base.clone().add(0.5, 2.55, 0.5);
871
+ world.spawn(nameplate, TextDisplay.class, display -> {
872
+ display.setText(nameLine + "\n" + captionLine + "\n" + ownerLine);
873
+ display.setBillboard(Billboard.CENTER);
874
+ display.setAlignment(TextDisplay.TextAlignment.CENTER);
875
+ display.setLineWidth(220);
876
+ display.setShadowed(true);
877
+ display.setDefaultBackground(false);
878
+ display.setBackgroundColor(Color.fromARGB(150, 18, 13, 8));
879
+ display.setTextOpacity((byte) 255);
880
+ display.setViewRange(72.0f);
881
+ display.setDisplayWidth(4.0f);
882
+ display.setDisplayHeight(1.2f);
883
+ display.setGlowColorOverride(Color.fromRGB(238, 210, 136));
884
+ display.setGlowing(true);
885
+ });
886
+
887
+ placeStandingSign(world, base.getBlockX(), base.getBlockY(), base.getBlockZ() + 2,
888
+ "Engraved", nameLine, compactLore(owner), "CMD " + customModelData);
889
+ placeStandingSign(world, base.getBlockX() + 1, base.getBlockY(), base.getBlockZ() + 2,
890
+ "Caption", captionLine, "Profile button", "for history");
891
+ }
892
+
893
  private ItemStack passportBook(String title, String owner, String hall, String zone, String memory, String spirit,
894
  String command, Location base, int customModelData) {
895
  ItemStack book = new ItemStack(Material.WRITTEN_BOOK);
 
938
  getConfig().set(key + ".xyz", base.getBlockX() + " " + base.getBlockY() + " " + base.getBlockZ());
939
  saveConfig();
940
  placeStandingSign(world, base.getBlockX() - 4, base.getBlockY(), base.getBlockZ() - 2,
941
+ "Profile button", "right-click", "history + lore", compactItemName(title));
942
  }
943
 
944
  private String spiritButtonKey(Location location) {
paper-plugin/target/classes/com/dreamwall/DreamWallPlugin.class ADDED
Binary file (41.5 kB). View file
 
paper-plugin/target/classes/config.yml ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ space-url: "https://build-small-hackathon-dreamwall-mc.hf.space"
2
+ resource-pack-url: "https://huggingface.co/spaces/build-small-hackathon/dreamwall-mc/resolve/main/resource-pack/AfterBlockMuseum.zip"
3
+ resource-pack-sha1: "03487f018e2062e254b5ea443396f29d099f8b67"
4
+ offer-resource-pack-on-join: false
5
+ poll-enabled: false
6
+ poll-seconds: 30
7
+ default-import-prompt: "blue school bag from exam week"
8
+ default-import-story: "It carried my laptop, exam panic, snacks, and the mornings I kept showing up."
9
+ default-import-owner: "@Wildstash"
10
+ gallery-world: "world"
11
+ canvas-size: 12
12
+ plot-size: 32
13
+ gallery-origin:
14
+ x: -192
15
+ y: 80
16
+ z: -192
17
+ gallery-facing: "east"
paper-plugin/target/classes/plugin.yml ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: DreamWall
2
+ version: 0.1.0
3
+ main: com.dreamwall.DreamWallPlugin
4
+ api-version: '1.21'
5
+ author: Codex
6
+ description: Bridge a Paper server to the DreamWall MC Hugging Face Space.
7
+ commands:
8
+ dreamwall:
9
+ description: Show or test the DreamWall Space bridge.
10
+ usage: /dreamwall [fetch|pack|demo|import]
11
+ permission: dreamwall.use
12
+ permissions:
13
+ dreamwall.use:
14
+ default: op
paper-plugin/target/dreamwall-paper-bridge-0.1.0.jar ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:35aeae59268cef96c50f7757451455db5cce30804aa1bd4738532d4d5601762a
3
+ size 319070
paper-plugin/target/maven-archiver/pom.properties ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ artifactId=dreamwall-paper-bridge
2
+ groupId=com.dreamwall
3
+ version=0.1.0
paper-plugin/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst ADDED
@@ -0,0 +1 @@
 
 
1
+ com/dreamwall/DreamWallPlugin.class
paper-plugin/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst ADDED
@@ -0,0 +1 @@
 
 
1
+ /Users/arnav/Documents/Codex/2026-06-05/files-mentioned-by-the-user-screenshot/dreamwall-mc/paper-plugin/src/main/java/com/dreamwall/DreamWallPlugin.java
paper-plugin/target/original-dreamwall-paper-bridge-0.1.0.jar ADDED
Binary file (13.4 kB). View file