Skip to content

Releases: ocpu/Boxlin

Quality of Life Updates

10 Aug 16:13
5ea5f31

Choose a tag to compare

Implied mod id

If you are using the functional mod loading method you can now name the function like your mod id and remove the mod id from the annotation.

// Before
@FunctionalMod("boxlin")
fun main() {}

// After
@FunctionalMod
fun boxlin() {}

Function argument injections

You are now able to get the boxlin context injected into your functional mod function.

// Before
@FunctionalMod
fun boxlin() {
  val context = BoxlinContext.get()
  context.addListener<...> { ... }
}

@FunctionalMod
fun boxlin() {
  with (BoxlinContext.get()) {
    addListener<...> { ... }
  }
}

// After
@FunctionalMod
fun boxlin(context: BoxlinContext) {
  context.addListener<...> { ... }
}

@FunctionalMod
fun BoxlinContext.boxlin() {
  addListener<...> { ... }
}

Operator overloads

These methods have become available as operator overloads

  • BlockPos::add
  • BlockPos::sub
  • BlockPos::mul
  • BlockPos::div
  • Vec3i::add
  • Vec3i::sub
  • Vec3i::mul
  • Vec3i::div
  • + Int operations with BlockPos and Vec3i
  • CompoundNBT::put
  • CompoundNBT::putBoolean
  • CompoundNBT::putByte
  • CompoundNBT::putByteArray
  • CompoundNBT::putDouble
  • CompoundNBT::putFloat
  • CompoundNBT::putInt
  • CompoundNBT::putIntArray
  • CompoundNBT::putLong
  • CompoundNBT::putLongArray
  • CompoundNBT::putShort
  • CompoundNBT::putString
  • CompoundNBT::putUniqueId
  • CompoundNBT::merge
    1. newNBTTag = nbtTag + otherNBTTag
    2. nbtTag += otherNBTTag

Commits

  • 5ea5f31 Added automatic version publishing + version bump
  • 32c3df6 Removed unused code
  • c2708b9 Added a function that only takes a function
  • 7fdaa40 Added since information
  • 015a490 Ported behaviour from methods to kotlin operations
  • 781d7a4 Made the injections be from a map instead of inline
  • aa7dfc6 Able to imply the mod id from the function name
  • 2c0ef52 Extracted function signature parsing into a class
  • 00fd5d0 Bumped the loader version
  • ec35c3a Added logo to readme
  • 1b0c3de Changed logging texts to have more info
  • 609203e Added better function querying + functionality

Hey Listen

16 Jul 00:36
d2d4fc8

Choose a tag to compare

This release is mostly for fixing event listeners, but also to mark the beginning of the new version numbers. The version numbers from here on out has the actual version of the library suffixed with the Minecraft version it was build for with a hyphen (-) between. So if you are building for 1.14 you put 3.1.0-1.14.4 or for 1.15 3.1.0-1.15.2.

The fixes for the event listeners are for when the event type is of GenericEvent or for the most frequent of them RegistryEvent.Register. As of the a little weird way of generics the "sub" generic was not respected when registering the event listener. Other improvements are that you can add a little more configuration to when you are registering the event listener, like event priority and if the listener should receive canceled events.

Commits

  • d2d4fc8 Version bump for 3.1.0 [1.14, 1.15]
  • 09b24c6 Made the build script easier to swap MC version
  • a9273f5 Added more configuration when adding listeners
  • d8ae1aa Fixed GenericEvent listeners firing correctly
  • 5927c43 Fixed up code with IDEA IntelliSense

MC 1.15

24 Mar 14:45
17597f3

Choose a tag to compare

Updated game version to 1.15.

Commits

EventBusSubscriber for objects and working release

08 Nov 21:22
8616052

Choose a tag to compare

As the title says EventBusSubscriber annotations now work for objects. As for the working release part; since the manifest in the META-INF was empty forge thought that it was just a regular mod.

Commits

  • 8616052 Fixed Boxlin is not recogniced as a LANGPROVIDER in release
  • 9a96eb9 Fixed a bug with EventBusSubscriber and objects

Version 3.0.0 and Minecraft 1.14 mods

24 Aug 15:10
3818c35

Choose a tag to compare

Kotlin Corutines

25 Oct 16:19
e69d96f

Choose a tag to compare

This release provides the latest Kotlin corutines to the library for making asynchronous calls.

Proxy injector

18 Mar 18:19

Choose a tag to compare

You can now delegate your proxies to a property. Like this:

@Mod(...)
object ModClass {
  val proxy by useProxy(CLIENT_PROXY::class, SERVER_PROXY::class)

  @EventHandler
  fun preInit(e: FMLPreInitializationEvent) {
    proxy.preInit(e)
  }
}

Changes:

  • getGuiConfig -> getGuiConfigScreen
  • get(category, key, defaultValue, comment, values) -> get(category, key, defaultValue, comment)
  • ConfigurationHandler.guiConfig -> ConfigurationHandler.guiConfigScreen

Added:

  • Javadoc
  • Kotlin Reflect is now bundled with the jar
  • ProxyInjector delegate to create proxies
  • useProxy to create ProxyInjector instances

Refactoring and utilities

12 Dec 14:09

Choose a tag to compare

This version brings utilities to Boxlin. The utilities are documented here.

First version of Boxlin

26 Jun 20:02

Choose a tag to compare

v1.0.0.0

Readme and license