MinecraftMinecraft我的世界我的世界

Spigot编译流程

2017-08-04  本文已影响130人  赵海洋

相关文档

使用说明

使用gitbash打开当前目录,输入java -jar BuildTools.jar --rev 1.8,这里的1.8可以替换成其它版本,如1.10,1.10.2等。

流程一,下载代码

Attempting to build version: '1.8' use --rev <version> to override
Found version
{
    "name": "1.8",
    "description": "Backport of fixes from 1.8.3",
    "information": "Last build of Spigot 1.8.0. To update please see http://www.spigotmc.org/",
    "warning": "***** Please ensure your BuildTools is at least #35 *****",
    "refs": {
        "BuildData": "0630ea462a82fdbd93018de7d5ec5e9d3b3c732b",
        "Bukkit": "1d2509b99fb10b3bd6f597e63805f85b49d5a055",
        "CraftBukkit": "7019900e276b7c9f6e940debf8529094c7f4da0c",
        "Spigot": "550ebace4b43adc73854d7d5976e1343eba6fb98"
    }
}

目录说明

BuildData

反编译工具及反编译minecraft使用的代码映射。

CraftBukkit

对minecraft server的魔改,改善性能,并支持插件等。

Bukkit

Bukkit是服务器插件编程接口,封装不同版本minecraft server的细节,统一接口,便于开发插件。

Spigot目录

spigot服务器是一个改良服务器,在文件夹里是两个补丁目录,CraftBukkit-Patches存放对craftBukkit代码的补丁,Bukkit-Patches存放对Bukkit代码的补丁。

流程二,下载minecraft server并反编译

Attempting to build Minecraft with details: VersionInfo(minecraftVersion=1.8, accessTransforms=bukkit-1.8.at, classMappings=bukkit-1.8-cl.csrg, memberMappings=bukkit-1.8-members.csrg, packageMappings=package.srg, minecraftHash=null, decompileCommand=null, serverUrl=null)
Starting download of https://s3.amazonaws.com/Minecraft.Download/versions/1.8/minecraft_server.1.8.jar

如果下载不下来,也可以迅雷下载后直接放在work目录中,如果已经存在,则会提示:
Found good Minecraft hash (5b19d1a562a8a7c5f9a787ad96c8148b)
Found good Minecraft hash (5b19d1a562a8a7c5f9a787ad96c8148b)

Final mapped jar: work\mapped.8eb82bde.jar does not exist, creating!
Loading mappings
Loading mappings
1 packages, 0 classes, 0 fields, 0 methods
INFO: merging AccessMap net/minecraft/server/CraftingManager/recipes from AccessChange(clear=16, set=0, vis=1) with AccessChange(clear=0, set=0, vis=1)
INFO: merging AccessMap net/minecraft/server/PropertyManager/properties from AccessChange(clear=0, set=0, vis=1) with AccessChange(clear=0, set=0, vis=1)
INFO: merging AccessMap net/minecraft/server/TileEntityBrewingStand/items from AccessChange(clear=0, set=0, vis=1) with AccessChange(clear=0, set=0, vis=1)
INFO: merging AccessMap net/minecraft/server/WorldServer/tracker from AccessChange(clear=16, set=0, vis=1) with AccessChange(clear=0, set=0, vis=1)
INFO: merging AccessMap net/minecraft/server/WorldManager/world from AccessChange(clear=0, set=0, vis=1) with AccessChange(clear=0, set=0, vis=1)
Remapping final jar
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-install-plugin:2.4:install-file (default-cli) @ standalone-pom ---
[INFO] Installing D:\mc\spigotmc_build\work\mapped.8eb82bde.jar to D:\repo\repository\org\spigotmc\minecraft-server\1.8-SNAPSHOT\minecraft-server-1.8-SNAPSHOT.jar
[INFO] Installing C:\Users\terry\AppData\Local\Temp\mvninstall1056450265315348368.pom to D:\repo\repository\org\spigotmc\minecraft-server\1.8-SNAPSHOT\minecraft-server-1.8-SNAPSHOT.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
extract ....*.class
Decomiling ***.java
Applying CraftBukkit Patches
Applying CraftBukkit Patches
Patching with BiomeDecorator.patch
Patching with BiomeTheEndDecorator.patch

流程三,编译代码

Rebuilding Forked projects.... 
From file:///D:\mc\spigotmc_build\Bukkit
 * [new branch]      spigot     -> origin/spigot
HEAD is now at 1d2509b Revert finite checks in locations. Fixes SPIGOT-628 and others
Cloning into 'Spigot-API'...
done.
Resetting Spigot-API to Bukkit...

...

HEAD is now at 36052f0 CraftBukkit $ Fri Aug 04 14:37:11 CST 2017
Cloning into 'Spigot-Server'...
done.
Resetting Spigot-Server to CraftBukkit...
Success! Everything compiled successfully. Copying final .jar files now.
Copying craftbukkit-1.8-R0.1-SNAPSHOT-remapped.jar to D:\mc\spigotmc_build\.
  - Saved as craftbukkit-1.8.jar
Copying craftbukkit-1.8-R0.1-SNAPSHOT.jar to D:\mc\spigotmc_build\.
  - Saved as craftbukkit-1.8.jar
Copying spigot-1.8-R0.1-SNAPSHOT-remapped.jar to D:\mc\spigotmc_build\.
  - Saved as spigot-1.8.jar
Copying spigot-1.8-R0.1-SNAPSHOT.jar to D:\mc\spigotmc_build\.
  - Saved as spigot-1.8.jar
上一篇下一篇

猜你喜欢

热点阅读