Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the cwaypoint command #513

Merged
merged 30 commits into from
Jan 17, 2025
Merged
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
f1db688
Add the cwaypoint command
xpple Mar 27, 2023
a8407f4
Remove unnecessary code
xpple Mar 28, 2023
8fe1c58
Implement saving to a file
xpple Mar 28, 2023
49f7c53
Merge remote-tracking branch 'upstream/fabric' into cwaypoint
xpple Jan 7, 2025
390721b
Port to mojmap
xpple Jan 7, 2025
b28ca0c
Make waypoints storage future-proof + rely on level id for data persi…
xpple Jan 7, 2025
ba2361c
Fix ordering of translation keys
xpple Jan 7, 2025
5cff09d
Widen exception bound
xpple Jan 7, 2025
63573c3
Remove leading space from translation
xpple Jan 7, 2025
14c335d
Add null check
xpple Jan 7, 2025
9d53160
Render augmented waypoint name at the top of the screen
xpple Jan 9, 2025
32605d6
Move rendering code to WaypointCommand.java
xpple Jan 9, 2025
815ab4e
Render box with name when waypoint is in loaded chunks
xpple Jan 10, 2025
6924795
Adjust size slightly
xpple Jan 10, 2025
49929fc
Replace y offset with distance in top screen display
xpple Jan 10, 2025
c8a1392
Use records instead of pairs
xpple Jan 10, 2025
650c7fa
No idea how this happened
xpple Jan 10, 2025
78b48fb
Replace map with list
xpple Jan 10, 2025
2d882a8
Make comment clearer
xpple Jan 10, 2025
895112e
Sort waypoint lines based on distance
xpple Jan 10, 2025
cd3bba8
Undo sorting because it did not work
xpple Jan 10, 2025
ad9efd2
Bracket labels and make them yellow
xpple Jan 10, 2025
016d21f
Add dimension check for waypoint boxes
xpple Jan 10, 2025
70cfd25
Format coordinates nicely
xpple Jan 10, 2025
136b320
Widen exception bound in throws clause
xpple Jan 10, 2025
7a6f866
Replace priority queue with list
xpple Jan 17, 2025
79b0386
Return amount of waypoints in list subcommand
xpple Jan 17, 2025
bdac028
Replace AtomicInteger with singleton array
xpple Jan 17, 2025
8d83538
Introduce WaypointCommand.registerEvents method
xpple Jan 17, 2025
0ab199e
Add unit test for loading waypoint file
Earthcomputer Jan 17, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ org.gradle.jvmargs=-Xmx2G
# also check this on https://fabricmc.net/develop/
fabric_version=0.110.5+1.21.4
clientarguments_version=1.10.1
betterconfig_version=2.1.2
betterconfig_version=2.3.0
seedfinding_core_version=1.200.1
seedfinding_biome_version=1.171.1
seedfinding_feature_version=1.171.9
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
import net.fabricmc.fabric.api.client.command.v2.ClientCommandRegistrationCallback;
import net.fabricmc.fabric.api.client.command.v2.FabricClientCommandSource;
import net.fabricmc.fabric.api.client.networking.v1.ClientPlayNetworking;
import net.fabricmc.fabric.api.client.rendering.v1.HudRenderCallback;
import net.fabricmc.fabric.api.client.rendering.v1.WorldRenderEvents;
import net.fabricmc.fabric.api.networking.v1.PayloadTypeRegistry;
import net.fabricmc.loader.api.FabricLoader;
import net.minecraft.Util;
Expand Down Expand Up @@ -91,6 +93,8 @@ public void onInitializeClient() {
FishingCracker.registerEvents();
PlayerRandCracker.registerEvents();
ServerBrandManager.registerEvents();
HudRenderCallback.EVENT.register(WaypointCommand::renderWaypointLabels);
WorldRenderEvents.AFTER_ENTITIES.register(WaypointCommand::renderWaypointBoxes);
xpple marked this conversation as resolved.
Show resolved Hide resolved
}

private static Set<String> getCommands(CommandDispatcher<?> dispatcher) {
Expand Down Expand Up @@ -173,6 +177,7 @@ public static void registerCommands(CommandDispatcher<FabricClientCommandSource>
UsageTreeCommand.register(dispatcher);
UuidCommand.register(dispatcher);
VarCommand.register(dispatcher);
WaypointCommand.register(dispatcher);
WeatherCommand.register(dispatcher);
WhisperEncryptedCommand.register(dispatcher);
WikiCommand.register(dispatcher);
Expand Down
Loading
Loading