Sunday, 1 September 2019

java - How to launch minecraft 1.7.2 from Terminal / Command Line


I've been playing with the new Yggdrasil authserver that mojang created and I have been learning how to get authentication keys etc. Now I want to know how I can launch minecraft from terminal (UBUNTU) (1.7.2). I've looked everywhere on stackoverflow and google and can only find stuff for the old methods.


The old code such as:


java -cp ".minecraft/bin/*" -Djava.library.path=".minecraft/bin/natives/" net.minecraft.client.Minecraft "username" "login id"

no longer works with the updates around 1.7.2 Any ideas?



Answer



Here is the method I used that works (only tested on Windows XP):



@echo off
cd\
set MCDIR=%APPDATA%\.minecraft
cd %MCDIR%
java -Xmx512M -Djava.library.path="%MCDIR%\versions\1.7.2\1.7.2-natives" -cp "%MCDIR%\libraries\org\apache\logging\log4j\log4j-api\2.0-beta9\log4j-api-2.0-beta9.jar;%MCDIR%\libraries\org\apache\logging\log4j\log4j-core\2.0-beta9\log4j-core-2.0-beta9.jar;%MCDIR%\libraries\com\ibm\icu\icu4j-core-mojang\51.2\icu4j-core-mojang-51.2.jar;%MCDIR%\libraries\com\mojang\authlib\1.3\authlib-1.3.jar;%MCDIR%\libraries\io\netty\netty-all\4.0.10.Final\netty-all-4.0.10.Final.jar;%MCDIR%\libraries\java3d\vecmath\1.3.1\vecmath-1.3.1.jar;%MCDIR%\libraries\net\sf\trove4j\trove4j\3.0.3\trove4j-3.0.3.jar;%MCDIR%\libraries\net\sf\jopt-simple\jopt-simple\4.5\jopt-simple-4.5.jar;%MCDIR%\libraries\com\paulscode\codecjorbis\20101023\codecjorbis-20101023.jar;%MCDIR%\libraries\com\paulscode\codecwav\20101023\codecwav-20101023.jar;%MCDIR%\libraries\com\paulscode\librarylwjglopenal\20100824\librarylwjglopenal-20100824.jar;%MCDIR%\libraries\com\paulscode\libraryjavasound\20101123\libraryjavasound-20101123.jar;%MCDIR%\libraries\com\paulscode\soundsystem\20120107\soundsystem-20120107.jar;%MCDIR%\libraries\com\google\guava\guava\15.0\guava-15.0.jar;%MCDIR%\libraries\org\apache\commons\commons-lang3\3.1\commons-lang3-3.1.jar;%MCDIR%\libraries\commons-io\commons-io\2.4\commons-io-2.4.jar;%MCDIR%\libraries\net\java\jinput\jinput\2.0.5\jinput-2.0.5.jar;%MCDIR%\libraries\net\java\jinput\jinput-platform\2.0.5\jinput-platform-2.0.5-natives-windows.jar;%MCDIR%\libraries\net\java\jutils\jutils\1.0.0\jutils-1.0.0.jar;%MCDIR%\libraries\com\google\code\gson\gson\2.2.4\gson-2.2.4.jar;%MCDIR%\libraries\org\lwjgl\lwjgl\lwjgl\2.9.0\lwjgl-2.9.0.jar;%MCDIR%\libraries\org\lwjgl\lwjgl\lwjgl_util\2.9.0\lwjgl_util-2.9.0.jar;%MCDIR%\versions\1.7.2\1.7.2.jar" net.minecraft.client.main.Main --username [player name] --version 1.7.2 --gameDir C:\DOCUME~1\[USER]\APPLIC~1\MINECR~1 --assetsDir C:\DOCUME~1\[USER]\APPLIC~1\MINECR~1\assets --accessToken [obtain from launcher_profiles.json in MC directory] --uuid (Default)



Before this will work, you MUST run Minecraft and open the folder "versions\1.7.2\1.7.2-natives-xxxx", where xxxx is a random number and copy the contents to a new folder called "1.7.2-natives" or without the numbers.


Note: Change [USER] to your user account in Windows. If your user account is >8 characters, you have to stop at 6 characters and put the "~1" on the end (MS-DOS format). [player name] can just be like Player or any name you wish. The launcher_profiles.json file (in main MC folder) is where you obtain the access token that you put in here.


Save using notepad as minecraft.bat


You can create a VBS file so this batch runs without a command prompt window (looks nicer). To do this, create a VBS file (minecraft.vbs) using notepad, edit and add this code:



Set oShell = CreateObject ("Wscript.Shell")
Dim strArgs
strArgs = "cmd /c minecraft.bat"
oShell.Run strArgs, 0, false



Create a shortcut using (minecraft.vbs) and you are all set!


bios - UEFI vs non-UEFI options in boot menu


I just built new PC based on Asus Z87-Plus motherboard and in BIOS boot menu I now have my removable devices listed twice - once as a device itself and once with "UEFI: " prefix.


It looks like this for Blu-ray drive on SATA port 5:


P5: PIONEER BD-RW BDR-208M (3523 MB)
UEFI: PIONEER BD-RW BDR-208M (3523 MB)


USB flash drives are similarly listed twice.


Hard drives are only listed once as non-UEFI.


What are the implications of picking UEFI boot option vs non-UEFI? Why aren't hard drives available in boot menu with UEFI option?



Answer



The non-UEFI option will boot the device in the legacy BIOS mode. If you have a Win7/8 DVD it can be booted in either BIOS or UEFI mode. If you have a GPT partitioned boot drive then you need to install Windows in UEFI mode.


Once you install an OS in BIOS or UEFI mode, to switch modes you'll need to reinstall the OS (with Windows at least), so guess for hard drives only the mode the OS is installed in is shown.


Dynamically selecting modes is thus generally useful only for USB or DVD drives.


compression - Flash and image compressor

In my Flash site is loading slow. I want to speed up my site. How can I speed up the site? Tell me about Flash and image compression.

keyboard - How can I remap CTRL-h in Mac OS X?


I'd like to remap CTRL + H from delete to nothing in Leopard.



Answer



The default ⌃H behavior comes from the Standard Key Bindings file in the AppKit framework resources. You can override this easily.


Create a file with this as the contents:


{ "^h" = ""; }

And save it to ~/Library/KeyBindings/DefaultKeyBinding.dict, creating the KeyBindings folder if it doesn't exist. (Note: you will need to restart your applications for this to start working.)


(Another side note: I'm not entirely sure if using "" is the right way to make it do nothing, but it works. The documentation I found said nothing about any no-op methods.)


worksheet function - How to concatenate values in Excel?


I have a spreadsheet that looks something like this:



   A B C D E ...
1| 1 0 0 1 0
2| 0 1 0 0 1
3| 0 0 0 1 0
4| 1 0 0 0 0



I'd like to concatenate row 1 in column F so that it returns: 10010


But entering =concatenate(A1:E1) returns an error #VALUE! and using an array formula ({=concatenate(A1:E1)}) returns just 1.


This method gets me close, but it removes the formula so I can't drag down and concatenate all rows.


Why does Excel make concatenating so hard? Is there another way to do this without using VBA?



Answer



In F1 enter:


=A1 & B1 & C1 & D1 & E1

and copy down.


enter image description here


EDIT#1:


If you want to bite the bullet and use VBA, then consider this tiny UDF


Public Function KonKatenate(rIN As Range) As String
Dim r As Range
For Each r In rIN
KonKatenate = KonKatenate & r.Text
Next r
End Function

User Defined Functions (UDFs) are very easy to install and use:



  1. ALT-F11 brings up the VBE window

  2. ALT-I ALT-M opens a fresh module

  3. paste the stuff in and close the VBE window


If you save the workbook, the UDF will be saved with it. If you are using a version of Excel later then 2003, you must save the file as .xlsm rather than .xlsx


To remove the UDF:



  1. bring up the VBE window as above

  2. clear the code out

  3. close the VBE window


To use the UDF from Excel:


=KonKatenate(A1:Z1)

To learn more about macros in general, see:


http://www.mvps.org/dmcritchie/excel/getstarted.htm


and


http://msdn.microsoft.com/en-us/library/ee814735(v=office.14).aspx


and for specifics on UDFs, see:


http://www.cpearson.com/excel/WritingFunctionsInVBA.aspx


Macros must be enabled for this to work!


conversion - Inserting SVG files in a Microsoft Word document


How can I convert or insert an Inkscape SVG file to a Microsoft Word document?


Note: It has to be editable. The resulting exported PDF has selectable text.



Answer



To embed an Inkscape drawing into a Word document:




  1. Open the file in Inkscape.


    open




  2. Save the file as an Enhanced Metafile (.emf).


    save as




  3. Be sure to untick Convert text to paths


    text to paths




  4. Insert the .emf file as a picture in a Word document.


    insert picture






To edit the drawing and text:




  1. Right-click the picture and select Edit Picture.


    edit




  2. Click Yes to convert to a drawing object.


    object




  3. Tada!


    complete




external hard drive - Cross-platform usable filesystem with large file support


What is the best filesystem to use cross-platform (Linux, Windows, OS X) which supports disk sizes of at least 2TB and file sizes >4GB?


I'm planning to use it on a USB drive on different computers.


Are there any filesystems that can be used on all the named OSes without installing additional drivers?



Answer



Look at this chart on Wikipedia and scroll down to the last table for "Supporting operating systems." This lists OS support by file system.


As you can see, there is no file system that is covers all OS platforms, the closest being FAT16. FAT32 is a close 2nd, requiring 3rd party driver support for z/OS.


Since you require read/write support and large files and file systems, the best option would be NTFS. Obviously, Windows OSs support NTFS. Modern Linux kernels (2.2+) can read and write NTFS natively. OS X supports reading NTFS natively and writing with NTFS-3G.


How can I VLOOKUP in multiple Excel documents?

I am trying to VLOOKUP reference data with around 400 seperate Excel files. Is it possible to do this in a quick way rather than doing it m...