Skip to content

Commit c342f8c

Browse files
committed
Loot Table
1 parent 44c7ff2 commit c342f8c

File tree

21 files changed

+1181
-48
lines changed

21 files changed

+1181
-48
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,7 @@ src/main/java/com/github/cubiomes/*
4949
!src/main/java/com/github/cubiomes/.gitkeep
5050

5151
dump_includes.txt
52+
53+
# other
54+
55+
Thumbs.db

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,14 @@ I also added the ability to import waypoints from [Wurst7-CevAPI](https://github
160160
### Highlight Timeout Setting
161161
Can now change the default 5 minute render timeout with ```/sm:config EspTimeoutMinutes```
162162

163+
### Loot Table Browser
164+
165+
Can now visually search and browse through the loot table for the given map area. Click the 'Loot Table' button on the seed map to open the browser. You can also make ESP highlights or waypoints to the chests or simply copy the coordinates. Enchantments will be highlighted with colors and icons.
166+
167+
![LootTable](https://i.imgur.com/lnT5LsP.png)
168+
163169
### Export Loot Table
164-
Can now export the entire loot table for the map you're viewing by clicking ```Export Loot``` or via commands such as ```/sm:exportloot <radius> [dimension] [structures/all]```.
170+
Can now export the entire loot table for the map you're viewing (or any other dimension) via the command ```/sm:exportloot <radius> [dimension] [structures/all]```.
165171

166172
Exported data will be located in ```SeedMapper/loot/<Server IP>_<Seed>-<Date/Time>.json```
167173

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
package dev.xpple.simplewaypoints.api;
2+
3+
import com.mojang.brigadier.exceptions.CommandSyntaxException;
4+
import dev.xpple.simplewaypoints.impl.SimpleWaypointsImpl;
5+
import java.util.Map;
6+
import java.util.Set;
7+
import net.minecraft.client.Minecraft;
8+
import net.minecraft.core.BlockPos;
9+
import net.minecraft.resources.ResourceKey;
10+
import net.minecraft.world.level.Level;
11+
12+
public interface SimpleWaypointsAPI {
13+
static SimpleWaypointsAPI getInstance() {
14+
return SimpleWaypointsImpl.INSTANCE;
15+
}
16+
17+
void registerCommandAlias(String alias);
18+
19+
Set<String> getCommandAliases();
20+
21+
String getWorldIdentifier(Minecraft minecraft);
22+
23+
Map<String, Map<String, Waypoint>> getAllWaypoints();
24+
25+
Map<String, Waypoint> getWorldWaypoints(String worldIdentifier);
26+
27+
int addWaypoint(String worldIdentifier, ResourceKey<Level> dimension, String name, BlockPos pos) throws CommandSyntaxException;
28+
29+
int addWaypoint(String worldIdentifier, ResourceKey<Level> dimension, String name, BlockPos pos, int color) throws CommandSyntaxException;
30+
31+
int removeWaypoint(String worldIdentifier, String name) throws CommandSyntaxException;
32+
33+
int renameWaypoint(String worldIdentifier, String name, String newName) throws CommandSyntaxException;
34+
35+
int editWaypoint(String worldIdentifier, String name, BlockPos pos) throws CommandSyntaxException;
36+
37+
int editWaypoint(String worldIdentifier, String name, ResourceKey<Level> dimension, BlockPos pos) throws CommandSyntaxException;
38+
39+
int setWaypointVisibility(String worldIdentifier, String name, boolean visible) throws CommandSyntaxException;
40+
41+
int setWaypointColor(String worldIdentifier, String name, int color) throws CommandSyntaxException;
42+
}

src/main/java/dev/xpple/seedmapper/render/RenderManager.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,13 @@ public static void clear() {
8282
HIGHLIGHTS.clear();
8383
}
8484

85+
public static void clearHighlight(BlockPos pos) {
86+
if (pos == null) {
87+
return;
88+
}
89+
HIGHLIGHTS.removeIf(highlight -> highlight.pos().equals(pos));
90+
}
91+
8592
public static void registerEvents() {
8693
WorldRenderEvents.END_EXTRACTION.register(RenderManager::extractLines);
8794
WorldRenderEvents.END_MAIN.register(RenderManager::renderLines);

0 commit comments

Comments
 (0)