Skip to content

Latest commit

 

History

History
54 lines (40 loc) · 2.31 KB

README.md

File metadata and controls

54 lines (40 loc) · 2.31 KB

Clothesline

Build Status CurseForge Downloads Maven Repository

A seamless laundry experience that is definitely not an item transport mod.

Developing Clothesline

To get started, refer to the MinecraftForge documentation.

Usage

To use this mod in your workspace, add the following to your build.gradle:

repositories {
    maven {url "https://oss.sonatype.org/content/repositories/snapshots"}
    maven {url "https://maven.jamieswhiteshirt.com/libs-release/"}
}

dependencies {
    deobfRuntimeOnly "com.jamieswhiteshirt:clothesline-hooks:<CLOTHESLINE_HOOKS_VERSION>"
    deobfCompile "com.jamieswhiteshirt:clothesline:<CLOTHESLINE_VERSION>"
}

Clothesline has an API, but it is currently unstable and with limited functionality. The API is located in the com.jamieswhiteshirt.clothesline.api package.

To get started, get the network manager of a world using the INetworkManager capability. Example:

import net.minecraftforge.common.capabilities.Capability;
import net.minecraftforge.common.capabilities.CapabilityInject;

import com.jamieswhiteshirt.clothesline.api.INetworkManager;

class Example {
    @CapabilityInject(INetworkManager.class)
    public static final Capability<INetworkManager> NETWORK_MANAGER_CAPABILITY = null;
    
    void example(World world) {
        INetworkManager manager = world.getCapability(NETWORK_MANAGER_CAPABILITY, null);
        if (manager != null) {
            /* ... */
        }
    }
}