By | 19 novembre 2014

Compilation d’un mod Forge pour Minecraft.

1) Installation de Java :

[~] ➔ sudo add-apt-repository ppa:webupd8team/java
[~] ➔ sudo apt-get update
[~] ➔ sudo apt-get install oracle-java7-installer
[~] ➔ sudo update-java-alternatives -s java-7-oracle
[~] ➔ java -version
java version "1.7.0_72"
Java(TM) SE Runtime Environment (build 1.7.0_72-b14)
Java HotSpot(TM) Server VM (build 24.72-b04, mixed mode)

2) Répertoire de travail :

[~] ➔ mkdir -p MINECRAFT/DEV
[~] ➔ cd MINECRAFT/DEV/
[~/MINECRAFT/DEV] ➔ 

3) Installation de l’IDE Eclipse :

Version : Eclipse IDE for Java Developers 32 bits

[~/MINECRAFT/DEV] ➔ mkdir ECLIPSE
[~/MINECRAFT/DEV] ➔ cd ECLIPSE/
[~/MINECRAFT/DEV/ECLIPSE] ➔ wget http://eclipse.ialto.com/technology/epp/downloads/release/luna/SR1/eclipse-jee-luna-SR1-linux-gtk.tar.gz
[~/MINECRAFT/DEV/ECLIPSE] ➔ tar xvfz eclipse-jee-luna-SR1-linux-gtk.tar.gz 
[~/MINECRAFT/DEV/ECLIPSE] ➔ sudo mv eclipse/ /opt/
[~/MINECRAFT/DEV/ECLIPSE] ➔ cd 

4) Configuration de bash :

Ouvrir :

.bashrc

Ajouter à la fin :

export PATH=$PATH:/opt/eclipse/

Action :

source .bashrc

5) Installation de Forge : http://files.minecraftforge.net/

[~/MINECRAFT/DEV] ➔ mkdir FORGE
[~/MINECRAFT/DEV] ➔ cd FORGE/
[~/MINECRAFT/DEV/FORGE] ➔ wget http://files.minecraftforge.net/maven/net/minecraftforge/forge/1.7.10-10.13.2.1230/forge-1.7.10-10.13.2.1230-src.zip
[~/MINECRAFT/DEV/FORGE] ➔ unzip forge-1.7.10-10.13.2.1230-src.zip

6) Post-configuration :

[~/MINECRAFT/DEV/FORGE] ➔ ./gradlew setupDecompWorkspace
[~/MINECRAFT/DEV/FORGE] ➔ ./gradlew eclipse

7) Lancer Eclipse :

[~/MINECRAFT/DEV/FORGE] ➔ eclipse

Au 1er démarrage, sélectionner le workspace forge :

Workspace : /home/util01/MINECRAFT/DEV/FORGE/eclipse
Use this as the default and do not ask again : v
[OK]

8) Lien :

http://www.minecraftforgefrance.fr/showthread.php?tid=566

II) Test de compilation d’un mod de test.

1) Répertoire :

[~] ➔ cd MINECRAFT/DEV/FORGE/
[~/MINECRAFT/DEV/FORGE] ➔ 

2) Compilation :

[~/MINECRAFT/DEV/FORGE] ➔ ./gradlew build
[~/MINECRAFT/DEV/FORGE] ➔ ls -l build/libs/
total 4
-rw-rw-r-- 1 util01 util01 1875 nov.  19 19:23 modid-1.0.jar

3) Installation du mod :

[~/MINECRAFT/DEV/FORGE] ➔ cp build/libs/modid-1.0.jar ~/.minecraft/mods/

4) Lancer Minecraft, cliquer sur [Mods], « Example Mod 1.0 » s’affiche.

III) Compilation de Balkon’s weapon :

– Téléchargement du mod Forge :

[~/MINECRAFT/DEV] ➔ cd FORGE/
[~/MINECRAFT/DEV/FORGE] ➔ wget http://files.minecraftforge.net/maven/net/minecraftforge/forge/1.7.10-10.13.2.1230/forge-1.7.10-10.13.2.1230-src.zip

– Décompression de l’archive :

[~/MINECRAFT/DEV/FORGE] ➔ unzip forge-1.7.10-10.13.2.1230-src.zip
[~/MINECRAFT/DEV/FORGE] ➔ cd ..

– Téléchargement du mod Balkon’s Weapon :

[~/MINECRAFT/DEV] ➔ mkdir BALKONWEAPON
[~/MINECRAFT/DEV] ➔ cd BALKONWEAPON/
[~/MINECRAFT/DEV/BALKONWEAPON] ➔ git clone https://github.com/Ckathode/balkons-weaponmod.git

– Répertoire de travail :

[~/MINECRAFT/DEV/BALKANWEAPON] ➔ mkdir balkons-weaponmod.v1
[~/MINECRAFT/DEV/BALKANWEAPON] ➔ cp -r ../FORGE/* balkons-weaponmod.v1/
[~/MINECRAFT/DEV/BALKANWEAPON] ➔ rm balkons-weaponmod.v1/src/ -rf
[~/MINECRAFT/DEV/BALKONWEAPON] ➔ cd balkons-weaponmod.v1/
[~/MINECRAFT/DEV/BALKONWEAPON/balkons-weaponmod.v1] ➔ cp -r ../balkons-weaponmod/* .

– Compilation :

[~/MINECRAFT/DEV/BALKONWEAPON/balkons-weaponmod.v1] ➔ ./gradlew setupDecompWorkspace
[~/MINECRAFT/DEV/BALKONWEAPON/balkons-weaponmod.v1] ➔ ./gradlew build
[~/MINECRAFT/DEV/BALKONWEAPON/balkons-weaponmod.v1] ➔ ./gradlew eclipse
[~/MINECRAFT/DEV/BALKONWEAPON/balkons-weaponmod.v1] ➔ ls -l build/libs/
total 280
-rw-rw-r-- 1 util01 util01 286151 nov.  19 21:35 [1.7.10-10.13.0.1198]weaponmod-universal-1.15.0-gitbuild-2014-11-19_21-34-46.jar

– Installation du mod :

[~/MINECRAFT/DEV/BALKONWEAPON/balkons-weaponmod.v1] ➔ cp build/libs/\[1.7.10-10.13.0.1198\]weaponmod-universal-1.15.0-gitbuild-2014-11-19_21-34-46.jar ~/.minecraft/mods/

forge_weapon

https://github.com/Nekrofage/MinecraftForgeModWeapon