aadnk / ProtocolLib

Provides read and write access to the Minecraft protocol with Bukkit.
GNU General Public License v2.0
288 stars 92 forks source link

Forge? #72

Closed ryantheleach closed 8 years ago

ryantheleach commented 9 years ago

How much would need to change for a forge implementation of ProtocolLib?

aadnk commented 9 years ago

It does support Cauldron (formerly known as MCPC+), so there is actually Forge support. You can even intercept Forge-specific packets, or packets belonging to mods (such as RedPower).

Or are you referring to Sponge?

ryantheleach commented 9 years ago

Caulron still uses a bukkit API, I was referring to a raw forge implementation as opposed to Cauldron which is subject to similar DMCA problems.

aadnk commented 9 years ago

Right.

Well, quite a lot would have to change, I imagine. If you search for "import org.bukkit" in the ProtocolLib source code, you'll find over 238 matches in nearly every file throughout the code base, which obviously would have to be replaced with Forge equivalents.

Next, there is a lot of code that relies on the internal structure of CraftBukkit and Minecraft (try looking at this class without weeping), which may break on a pure Forge server. It does this mostly through reflection, so you can't just look at imported classes - in fact, ProtocolLib does no explicit import of CraftBukkit classes due to package versioning.