跳到正文

Annotated

作者:LeBossMax2

Automated code generator for packets !

收藏

介绍

中文介绍正在准备中,下面暂时显示原文。

Annotated is at the same time a development tool and a library.

The tool includes an annotation processor that can generate code for you.

Features :

  • Generate packet class :

Annotated can generate a packet class from a “data” class (a class with fields for the data)

You can implement the IClientPacket interface to define what happens when the packet is received on the client and / or IServerPacket for the server.

Then just add the @GeneratePacket annotation to your class and Annotated will automatically generate a packet class with the correct constructor, the fromBytes and the toByte methods.

Examples : Simple example, Example with all data types

 

  • Generate a network class and register the packets :

Adding the @GenerateNetwork on your main class will generate a network with all your generated packets already registered.

Example : Test class

 

 

常见问题

Annotated 支持哪些 Minecraft 版本?

Annotated 支持 Minecraft Java 版 1.9–1.12.2,共 14 个版本,可用的加载器:Forge。下载时注意选择和你游戏版本一致的文件。

Annotated 怎么安装?

先用 PCL2 或 HMCL 启动器安装对应版本的 Forge,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。

评论

登录后评论和评分

LeBossMax2 的其他作品

查看全部 →