Skip to content

Instantly share code, notes, and snippets.

View niklaswimmer's full-sized avatar
🏹
Memento Vivere

Niklas Wimmer niklaswimmer

🏹
Memento Vivere
  • 09:45 (UTC +01:00)
View GitHub Profile
@niklaswimmer
niklaswimmer / MyCapability.java
Created December 10, 2021 14:38
Getting Started with Capabilities: a practical example
public class MyCapability {
public static final Capability<MyCapabilityInterface> INSTANCE = CapabilityManager.get(new CapabilityToken<>() {});
public static void register(RegisterCapabilitiesEvent event) {
event.register(MyCapabilityInterface.class);
}
private MyCapability() {
}
@niklaswimmer
niklaswimmer / build.gradle.kts
Last active May 4, 2021 19:13
forge kotlin dsl
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import net.minecraftforge.gradle.common.util.RunConfig
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import java.time.Instant
import java.time.format.DateTimeFormatter
plugins {
kotlin("jvm") version "1.4.32"
id("net.minecraftforge.gradle") version "4.1.9"