use of ivorius.reccomplex.world.gen.feature.WorldStructureGenerationData in project RecurrentComplex by Ivorforce.
the class CommandSightAdd method execute.
@Override
public void execute(MinecraftServer server, ICommandSender commandSender, String[] args) throws CommandException {
RCParameters parameters = RCParameters.of(args);
WorldStructureGenerationData generationData = WorldStructureGenerationData.get(commandSender.getEntityWorld());
SelectionOwner owner = RCCommands.getSelectionOwner(commandSender, null, true);
String name = parameters.get().text().require();
generationData.addEntry(WorldStructureGenerationData.CustomEntry.from(name, BlockAreas.toBoundingBox(owner.getSelection())));
commandSender.sendMessage(ServerTranslations.format("commands.rcremember.success", name));
}
use of ivorius.reccomplex.world.gen.feature.WorldStructureGenerationData in project RecurrentComplex by Ivorforce.
the class CommandSightInfo method execute.
@Override
public void execute(MinecraftServer server, ICommandSender sender, String[] args) throws CommandException {
RCParameters parameters = RCParameters.of(args);
WorldStructureGenerationData generationData = WorldStructureGenerationData.get(sender.getEntityWorld());
WorldStructureGenerationData.Entry entry = generationData.getEntry(UUID.fromString(parameters.get().first().require()));
if (entry == null)
throw ServerTranslations.commandException("commands.rcsightinfo.unknown");
else {
ITextComponent area = RCTextStyle.area(RCBlockAreas.from(entry.getBoundingBox()));
ITextComponent sight = RCTextStyle.sight(entry, true);
if (entry instanceof WorldStructureGenerationData.StructureEntry) {
WorldStructureGenerationData.StructureEntry structureEntry = (WorldStructureGenerationData.StructureEntry) entry;
sender.sendMessage(new TextComponentTranslation("commands.rcsightinfo.structure", RCTextStyle.structure(structureEntry.getStructureID()), area, RCTextStyle.copy(String.valueOf(structureEntry.getSeed())), sight));
} else
sender.sendMessage(new TextComponentTranslation("commands.rcsightinfo.get", entry.description(), area, sight));
}
}
Aggregations