Skip to content
This repository was archived by the owner on Sep 12, 2025. It is now read-only.

Commit c1e86e5

Browse files
author
Andrei Hava
committed
feedback loop
1 parent 74f96e4 commit c1e86e5

12 files changed

Lines changed: 112 additions & 53 deletions

File tree

.idea/runConfigurations/Fabric_Server___fabric__fabric.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/workspace.xml

Lines changed: 11 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
This is a simple mod that adds a void dimension for restriction-free building of lawn bases.
1313

1414
> [!CAUTION]
15-
> This mod is currently in Alpha, meaning that not all planned functionality is present and there may be a significant amount of bugs. Proceed with caution.
15+
> This mod is currently in Beta, meaning that there may be a significant amount of bugs. Please help us by reporting them using the relevant links!
1616
1717
## Features
1818
- Adds an empty void dimension perfect for building large bases and factories.
@@ -24,7 +24,6 @@ This is a simple mod that adds a void dimension for restriction-free building of
2424

2525
## Planned Features
2626
- Add various settings to the void dimension, such as eternal daylight, disabling mob spawning, etc.
27-
- Add more feedback on various actions, such as binding a Linked Void Pearl.
2827

2928
## Commands
3029
The mod adds a few commands to assist in debugging and administration. You can see them listed below.

common/src/main/java/dev/detpikachu/buildersvoid/ModConfig.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99

1010
@Config(value = ModConstants.MOD_ID)
1111
public class ModConfig implements BalmConfigData {
12-
@Comment("Enables a cooldown when using any of the Void Pearl variants")
12+
@Comment("Enables a cooldown when using any of the pearl variants")
1313
public boolean enableCooldown = true;
1414

15-
@Comment("Void Pearl usage cooldown length, in ticks")
15+
@Comment("Pearl usage cooldown length, in ticks")
1616
public int cooldown = 100;
1717

1818
public static void initialize(BalmConfig config) {

common/src/main/java/dev/detpikachu/buildersvoid/command/ModCommands.java

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
import net.minecraft.commands.Commands;
99
import net.minecraft.commands.arguments.EntityArgument;
1010
import net.minecraft.commands.arguments.selector.EntitySelector;
11+
import net.minecraft.network.chat.Component;
1112
import net.minecraft.resources.ResourceLocation;
13+
import net.minecraft.server.level.ServerPlayer;
1214

1315
import static dev.detpikachu.buildersvoid.ModConstants.id;
1416

@@ -39,20 +41,41 @@ public static void initialize(BalmCommands commands) {
3941
});
4042
}
4143

42-
private static int onTeleportTargetPlayer(CommandContext<CommandSourceStack> context) throws CommandSyntaxException {
44+
private static int onTeleportTargetPlayer(CommandContext<CommandSourceStack> context) {
4345
final var target = context.getArgument("target", EntitySelector.class);
4446
final var sourcePlayer = context.getSource().getPlayer();
45-
final var targetPlayer = target.findSinglePlayer(context.getSource());
47+
ServerPlayer targetPlayer;
48+
49+
try {
50+
targetPlayer = target.findSinglePlayer(context.getSource());
51+
} catch (CommandSyntaxException ignoredException) {
52+
context.getSource().sendSystemMessage(Component.translatable("message.buildersvoid.player_not_found"));
53+
return 1;
54+
}
4655

4756
TeleportLogic.teleportIntoVoid(sourcePlayer, targetPlayer.getUUID(), false);
4857
return 0;
4958
}
5059

51-
private static int onTeleportSourceToTarget(CommandContext<CommandSourceStack> context) throws CommandSyntaxException {
60+
private static int onTeleportSourceToTarget(CommandContext<CommandSourceStack> context) {
5261
final var source = context.getArgument("source", EntitySelector.class);
53-
final var sourcePlayer = source.findSinglePlayer(context.getSource());
62+
ServerPlayer sourcePlayer;
5463
final var target = context.getArgument("target", EntitySelector.class);
55-
final var targetPlayer = target.findSinglePlayer(context.getSource());
64+
ServerPlayer targetPlayer;
65+
66+
try {
67+
sourcePlayer = source.findSinglePlayer(context.getSource());
68+
} catch (CommandSyntaxException ignoredException) {
69+
context.getSource().sendSystemMessage(Component.translatable("message.buildersvoid.player_not_found"));
70+
return 1;
71+
}
72+
73+
try {
74+
targetPlayer = target.findSinglePlayer(context.getSource());
75+
} catch (CommandSyntaxException ignoredException) {
76+
context.getSource().sendSystemMessage(Component.translatable("message.buildersvoid.player_not_found"));
77+
return 1;
78+
}
5679

5780
TeleportLogic.teleportIntoVoid(sourcePlayer, targetPlayer.getUUID(), false);
5881
return 0;

0 commit comments

Comments
 (0)