Laminate: a new Paper fork that merges Bukkit/Paper plugins with full Mixin capabilities

  • Thread starter Thread starter /u/Scientific_Cheater
  • Start date Start date
U

/u/Scientific_Cheater

Guest
Laminate: a new Paper fork that merges Bukkit/Paper plugins with full Mixin capabilities

Laminate is a Paper fork I'm working on which, alongside normal plugin functionality, allows developers to use Mixins and have them interface with Bukkit/Paper code (commands, events, etc.) through the Laminate API.

It’s a superset of Paper, so every existing plugin runs flawlessly on Laminate while still benefiting from all the features and optimizations that Paper provides.

The Laminate API ships with two very useful tools:

• Accessors - Given an instance of the associated class, Accessors allow developers to call methods defined in Mixins from anywhere else in the code, as if they were part of that instance.

• InjectEvent - As shown in the video, this allows a Bukkit event to be fired whenever an internal Minecraft method is called. The event can carry information from that method call, such as the instance or arguments, and expose it inside the Bukkit context. InjectEvent also includes a nested annotation, @Rewrite, which - given a method name, its return type (if not void), and its arguments - automatically rewrites the method signature into JVM bytecode if the plugin developer prefers not to do that manually.

Laminate is currently in development, but I’ll make another post here once it’s public.

submitted by /u/Scientific_Cheater
[link] [comments]

Continue reading...
 
Back
Top