Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package net.mcreator.coppermain.command;
- import net.minecraft.world.entity.Entity;
- import net.minecraft.server.level.ServerLevel;
- import net.minecraft.core.Direction;
- import net.minecraft.commands.Commands;
- import net.minecraft.commands.CommandSourceStack;
- import net.minecraft.commands.CommandBuildContext;
- import net.mcreator.coppermain.procedures.OpenguiProcedure;
- import com.mojang.brigadier.CommandDispatcher;
- public class AddmodCommand {
- public static void register(CommandDispatcher<CommandSourceStack> dispatcher, CommandBuildContext commandBuildContext) {
- dispatcher.register(Commands.literal("addmod")
- .executes(arguments -> {
- ServerLevel world = arguments.getSource().level();
- double x = arguments.getSource().getPosition().x();
- double y = arguments.getSource().getPosition().y();
- double z = arguments.getSource().getPosition().z();
- Entity entity = arguments.getSource().getEntity();
- Direction direction = entity.getDirection();
- 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());
- return 0;
- }));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement