DebugShapeConeCommand.java
package com.hypixel.hytale.server.core.modules.debug.commands;
import com.hypixel.hytale.component.Ref;
import com.hypixel.hytale.component.Store;
import com.hypixel.hytale.math.vector.Vector3d;
import com.hypixel.hytale.math.vector.Vector3f;
import com.hypixel.hytale.server.core.Message;
import com.hypixel.hytale.server.core.command.system.CommandContext;
import com.hypixel.hytale.server.core.command.system.basecommands.AbstractPlayerCommand;
import com.hypixel.hytale.server.core.modules.debug.DebugUtils;
import com.hypixel.hytale.server.core.modules.entity.component.TransformComponent;
import com.hypixel.hytale.server.core.universe.PlayerRef;
import com.hypixel.hytale.server.core.universe.world.World;
import com.hypixel.hytale.server.core.universe.world.storage.EntityStore;
import java.util.concurrent.ThreadLocalRandom;
import javax.annotation.Nonnull;
public class DebugShapeConeCommand extends AbstractPlayerCommand {
@Nonnull
private static final Message MESSAGE_COMMANDS_DEBUG_SHAPE_CONE_SUCCESS = Message.translation("server.commands.debug.shape.cone.success");
public DebugShapeConeCommand() {
super(, );
}
{
(TransformComponent)store.getComponent(ref, TransformComponent.getComponentType());
transformComponent != ;
transformComponent.getPosition();
ThreadLocalRandom.current();
(random.nextFloat(), random.nextFloat(), random.nextFloat());
DebugUtils.addCone(world, position, color, , );
context.sendMessage(MESSAGE_COMMANDS_DEBUG_SHAPE_CONE_SUCCESS);
}
}