Skip to content

Commit

Permalink
Fix Mode.PUNCH doing nothing
Browse files Browse the repository at this point in the history
  • Loading branch information
OutCraft-Mods committed Jan 24, 2023
1 parent f22b399 commit 4e42ab7
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/main/java/com/workert/robotics/helpers/CodeHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ public static void registerDefaultCommands() {
"com.simibubi.create.content.contraptions.components.deployer.DeployerTileEntity$Mode"));
method.setAccessible(true);

Object mode;
Object mode = null;
switch (arguments.get(3).trim()) {
case "Mode.PUNCH":
mode = Class.forName(
Expand All @@ -167,9 +167,7 @@ public static void registerDefaultCommands() {
.getEnumConstants()[1];
}

method.invoke(DeployerHandler.class, fakePlayer, robot.position(), pos, Vec3.ZERO, Class.forName(
"com.simibubi.create.content.contraptions.components.deployer.DeployerTileEntity$Mode")
.getEnumConstants()[1]);
method.invoke(DeployerHandler.class, fakePlayer, robot.position(), pos, Vec3.ZERO, mode);

robot.getInventory().setItem(0, fakePlayer.getItemInHand(InteractionHand.MAIN_HAND));
fakePlayer.discard();
Expand Down

0 comments on commit 4e42ab7

Please sign in to comment.