Advertisement
Guest User

1

a guest
Aug 7th, 2023
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.19 KB | None | 0 0
  1. package net.mcreator.coppermain.command;
  2.  
  3. import net.minecraft.world.entity.Entity;
  4. import net.minecraft.server.level.ServerLevel;
  5. import net.minecraft.core.Direction;
  6. import net.minecraft.commands.Commands;
  7. import net.minecraft.commands.CommandSourceStack;
  8. import net.minecraft.commands.CommandBuildContext;
  9.  
  10. import net.mcreator.coppermain.procedures.OpenguiProcedure;
  11.  
  12. import com.mojang.brigadier.CommandDispatcher;
  13.  
  14. public class AddmodCommand {
  15.     public static void register(CommandDispatcher<CommandSourceStack> dispatcher, CommandBuildContext commandBuildContext) {
  16.         dispatcher.register(Commands.literal("addmod")
  17.  
  18.                 .executes(arguments -> {
  19.                     ServerLevel world = arguments.getSource().level();
  20.                     double x = arguments.getSource().getPosition().x();
  21.                     double y = arguments.getSource().getPosition().y();
  22.                     double z = arguments.getSource().getPosition().z();
  23.                     Entity entity = arguments.getSource().getEntity();
  24.                     Direction direction = entity.getDirection();
  25.  
  26.                     OpenguiProcedure.execute(com.google.common.collect.ImmutableMap.<String, Object>builder().put("world", world).put("x", x).put("y", y).put("z", z).put("entity", entity).build());
  27.                     return 0;
  28.                 }));
  29.     }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement