use of com.mraof.minestuck.world.lands.gen.ChunkProviderLands in project Minestuck by mraof.
the class CommandCheckLand method execute.
@Override
public void execute(MinecraftServer server, ICommandSender sender, String[] args) throws CommandException {
if (!(sender instanceof EntityPlayerMP))
throw new PlayerNotFoundException("commands.playerOnly");
EntityPlayerMP player = (EntityPlayerMP) sender;
if (MinestuckDimensionHandler.isLandDimension(player.dimension)) {
LandAspectRegistry.AspectCombination aspects = MinestuckDimensionHandler.getAspects(player.dimension);
ChunkProviderLands chunkProvider = (ChunkProviderLands) player.world.provider.createChunkGenerator();
ITextComponent aspect1 = new TextComponentTranslation("land." + aspects.aspectTerrain.getNames()[chunkProvider.nameIndex1]);
ITextComponent aspect2 = new TextComponentTranslation("land." + aspects.aspectTitle.getNames()[chunkProvider.nameIndex2]);
ITextComponent toSend;
if (chunkProvider.nameOrder)
toSend = new TextComponentTranslation("land.message.check", aspect1, aspect2);
else
toSend = new TextComponentTranslation("land.message.check", aspect2, aspect1);
player.sendMessage(toSend);
} else {
player.sendMessage(new TextComponentTranslation("land.message.checkFail"));
}
}
Aggregations