Skip to content

Commit 9ac8c1c

Browse files
committed
change the commands, rename value in Utility.java
1 parent 370b9eb commit 9ac8c1c

File tree

2 files changed

+13
-14
lines changed

2 files changed

+13
-14
lines changed

src/main/java/dev/dfonline/codeclient/Commands.java

+9-10
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22

33
import com.mojang.brigadier.CommandDispatcher;
44
import dev.dfonline.codeclient.action.None;
5-
import dev.dfonline.codeclient.action.impl.GetActionDump;
6-
import dev.dfonline.codeclient.action.impl.GetPlotSize;
7-
import dev.dfonline.codeclient.action.impl.MoveToSpawn;
5+
import dev.dfonline.codeclient.action.impl.*;
86
import dev.dfonline.codeclient.config.Config;
97
import dev.dfonline.codeclient.dev.BuildClip;
108
import dev.dfonline.codeclient.dev.LastPos;
@@ -148,19 +146,20 @@ public static void register(CommandDispatcher<FabricClientCommandSource> dispatc
148146
// return 0;
149147
// }));
150148
// dispatcher.register(literal("placetemplate").executes(context -> {
151-
// CodeClient.currentAction = new PlaceTemplates(Utility.TemplatesInInventory(), () -> Utility.sendMessage("Done!", ChatType.SUCCESS));
149+
// CodeClient.currentAction = new PlaceTemplates(Utility.TemplatesInInventory(), () -> {
150+
// Utility.sendMessage("Done!", ChatType.SUCCESS);
151+
// CodeClient.currentAction = new None();
152+
// });
152153
// CodeClient.currentAction.init();
153154
// return 0;
154155
// }));
155-
156+
//
156157
// dispatcher.register(literal("codeforme").executes(context -> {
157158
// if(!(CodeClient.location instanceof Dev)) return 1;
158159
// CodeClient.currentAction = new ClearPlot(() -> {
159-
// CodeClient.currentAction = new MoveToSpawn(() -> {
160-
// CodeClient.currentAction = new PlaceTemplates(Utility.TemplatesInInventory(), () -> {
161-
// Utility.sendMessage("Done!", ChatType.SUCCESS);
162-
// });
163-
// CodeClient.currentAction.init();
160+
// CodeClient.currentAction = new PlaceTemplates(Utility.TemplatesInInventory(), () -> {
161+
// CodeClient.currentAction = new None();
162+
// Utility.sendMessage("Done!", ChatType.SUCCESS);
164163
// });
165164
// CodeClient.currentAction.init();
166165
// });

src/main/java/dev/dfonline/codeclient/Utility.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,13 @@ public static void sendInventory() {
4949

5050
/**
5151
* Ensure the player is holding an item, by holding and setting the first slot.
52-
* @param template Any item
52+
* @param item Any item
5353
*/
54-
public static void makeHolding(ItemStack template) {
54+
public static void makeHolding(ItemStack item) {
5555
PlayerInventory inv = CodeClient.MC.player.getInventory();
56-
Utility.sendHandItem(template);
56+
Utility.sendHandItem(item);
5757
inv.selectedSlot = 0;
58-
inv.setStack(0, template);
58+
inv.setStack(0, item);
5959
}
6060

6161
public static void sendHandItem(ItemStack item) {

0 commit comments

Comments
 (0)