A repository full of Forge 1.8.9 Kotlin utilities

Overview

kotlin-forge-api

kotlin-forge-api is a repository full of different APIs to be used by mods for Forge 1.8.9 to make modding easier!

Warning! To use any of these modules you must have the Jitpack repo added. To do this simply add

maven {
    url "https://jitpack.io"
}

to your build.gradle!

Modules

forge-chat-dsl

This module simply adds a chat dsl making it easier to forge chat messages

To use this module simply add

implementation "club.chachy.kotlin-forge-api:forge-chat-dsl:0.1.0"

Example:

Minecraft.getMinecraft().thePlayer.sendMessage {
    withStyle(green + bold + italic) {
        +"It's green, bold AND italic!"
    }
    +"Boring message"
}

forge-event-dsl

To use this module simply add

implementation "club.chachy.kotlin-forge-api:forge-event-dsl:0.1.0"

Example usage:

on<ClientChatReceivedEvent>()
    .filter { it.message.unformattedText.contains("Secret Fullscreen Tactic") }
    .subscribe {
        it.isCanceled = true
        Minecraft.getMinecraft().toggleFullscreen()
    }

all

To use all the modules simply add

implementation "club.chachy.kotlin-forge-api:all:0.1.0"

Main

Example for adding a module:

implementation "club.chachy.kotlin-forge-api:<module-here-example-forge-chat-dsl>:0.1.0"
You might also like...
Kotlin microservices with REST, and gRPC using BFF pattern. This repository contains backend services. Everything is dockerized and ready to
Kotlin microservices with REST, and gRPC using BFF pattern. This repository contains backend services. Everything is dockerized and ready to "Go" actually "Kotlin" :-)

Microservices Kotlin gRPC Deployed in EC2, Check it out! This repo contains microservices written in Kotlin with BFF pattern for performing CRUD opera

Repository with source code from http://rosettacode.org/wiki/Category:Kotlin

Rosetta Code Kotlin This is a repository with the Kotlin source code from RosettaCode wiki. The main motivation for extracting all the code into a rep

This repository shows how to declare Hibernate entities using Kotlin
This repository shows how to declare Hibernate entities using Kotlin

JPA Entities in Kotlin This repository was originally used in the "Getting the Most from JPA with Kotlin" webinar. To follow the webinar flow step by

This repository demonstrates how Kotlin can simplify Spring Boot configuration properties file mapping

Kotlin spring-boot nested config props This repository demonstrates how Kotlin can simplify Spring Boot configuration properties file mapping @Constru

❤️ A sample Marvel heroes application based on MVVM (ViewModel, Coroutines, LiveData, Room, Repository, Koin)  architecture.
❤️ A sample Marvel heroes application based on MVVM (ViewModel, Coroutines, LiveData, Room, Repository, Koin) architecture.

MarvelHeroes MarvelHeroes is a demo application based on modern Android application tech-stacks and MVVM architecture. Fetching data from the network

🦁 A Disney app using transformation motions based on MVVM (ViewModel, Coroutines, Flow, LiveData, Room, Repository, Koin) architecture.
🦁 A Disney app using transformation motions based on MVVM (ViewModel, Coroutines, Flow, LiveData, Room, Repository, Koin) architecture.

DisneyMotions A demo Disney app using transformation motions based on MVVM architecture. The motion system is included in the 1.2.0-alpha05 released m

It is a repository containing backend structure for Ktor.
It is a repository containing backend structure for Ktor.

Backend Architecture with Ktor + KMongo This project contains, Authentication using Jwt Database Layer (KMongo - Orm for MongoDB) Routing Advanced Rou

This repository contains RabbitMQ Protobuf starters with its usage samples for spring-rabbit and spring-cloud-starter-stream-rabbit modules

This repository contains RabbitMQ Protobuf starters with its usage samples for spring-rabbit and spring-cloud-starter-stream-rabbit modules

This repository is a simple humidity and temperature dashboard to present data from sensors on your phone
This repository is a simple humidity and temperature dashboard to present data from sensors on your phone

ChilliBook This repository is a simple humidity and temperature dashboard to present data from sensors on your phone. It uses Bluetooth LE and an ESP3

Comments
  • Furhter abstraction of the Eventbus-DSL.

    Furhter abstraction of the Eventbus-DSL.

    Currently, the Eventbus-DSL heavily relies on the Forge EventBus. Due to some mods using alternative event buses, for example, a popular choice is https://github.com/KevinPriv/KEventBus it would be easier to abstract the current DSL even further.

    We could create an interface that the Forge EventBus and custom event buses can implement to call to register code.

    Example:

    interface EventBus {
      fun <T> register(event: Class<T>, action: T.() -> Unit) 
    }
    
    opened by ChachyDev 2
  • Handler Data abstraction

    Handler Data abstraction

    Abstracting handler data could allow for modulation of handler data processing.

    class TimeoutHandlerData<T>(execute: (T) -> Unit, filter: List<(T) -> Boolean>, val timeout: Long = Long.MAX_VALUE) : HandlerData<T>(execute: (T) -> Unit, filter: List<(T) -> Boolean>) {
      val timeAdded = System.currentTimeMillis()  
    
      override fun execute(storage: MutableList<HandlerData<T>>) {
        if (System.currentTimeMillis() - timeAdded > timeout) {
        	storage.remove(this)
    		return
        }
        super.execute(storage) // runs execute block
      } 
    }
    

    Here is an example of a handler that will be removed after x amount of time

    opened by isXander 0
  • Memory improvements on the eventbus-dsl

    Memory improvements on the eventbus-dsl

    Currently, the event bus DSL registers many handlers but when using the Forge EventBus due to the Event superclass all events inherit we could simply create a global handler (would be a Kotlin object) instead of creating a new instance on each event.

    opened by ChachyDev 0
Releases(0.3.1)
Owner
Shalom Ademuwagun
Kotlin and Java Developer
Shalom Ademuwagun
Open-Source Forge 1.8.9 Hypixel Duels bot! Planned to support many modes and written in Kotlin.

This project has been moved to a new repository: [HumanDuck23/duck-dueller-v2](https://github.com/HumanDuck23/duck-dueller-v2) Duck Dueller Are you ti

null 2 Aug 29, 2022
Highly customizable, 1.8.9 Forge Hypixel Duels bot!

What is Duck Dueller? Duck Dueller is a free and open-source Hypixel Duels bot, designed to work for Forge 1.8.9! It is planned to support many modes

null 9 Jan 1, 2023
Forge 1.8.9 mod with miscellaneous (primarily dungeons-related) QOL features for Hypixel Skyblock.

AmbientAddons-Forge A work-in-progress Forge 1.8.9 port of the AmbientAddons ChatTriggers module. Currently includes only chest features (block reroll

appable 4 Nov 25, 2022
Some useful Android Kotlin utilities

Android-Kotlin-utilities Some useful Android Kotlin utilities Any PR are welcomed :) Please put your code in several files like this. it helps others

Kaaveh Mohamedi 6 Oct 12, 2021
Kotlin CLI utilities, mostly intended for use with Clikt

Kotlin CLI Utils A repo containing basic CLI utilities for Kotlin. Installation dependencies { implementation("com.slack.cli:kotlin-cli-util:<versio

Slack 21 Jan 2, 2023
Kotlin TodoMVC – full-stack Kotlin application demo

Kotlin full stack TodoMVC This project is an example implementation of the TodoMVC app written in Kotlin. More specifically, it's the Kotlin port of t

Gyula Voros 22 Oct 3, 2022
Full stack examples of how to use Hotwire JS in Kotlin services

hotwire-kt A collection of Kotlin examples using the Hotwire JS framework to build interactive web apps with a Kotlin Armeria server backend. Using Ho

Andrew (Paradi) Alexander 9 Dec 14, 2022
🧶 Full-fledged Kotlin client for MikaBot/cluster-operator as a separate package

?? Eri Full-fledged Kotlin client for MikaBot/cluster-operator as a separate package Usage Connecting to operator fun main(args: Array<String>) {

Nino 3 Nov 17, 2021
Lucilla - Fast, efficient, in-memory Full Text Search for Kotlin

Lucilla Lucilla is an in-memory Full Text Search library for Kotlin. It allows t

Kshitij Chauhan 111 Jan 6, 2023
AndroidIDE - an IDE for Android to develop full featured Android apps on Android smartphones.

AndroidIDE - an IDE for Android to develop full featured Android apps on Android smartphones.

Akash Yadav 615 Dec 27, 2022