Creoii Mod Documentation & Wiki
Creo API
Creo API
  • Overview
  • Setup
  • Packages
    • Block API
    • Block Injection API
    • Content Modification API
    • Convention Tags
    • Entity Attributes
    • Entity-Block Collision API
    • Events
    • Food Component API
    • Item API
    • Mod Compatibility API
    • Registry API
    • Shader Interaction API
    • Worldgen
Powered by GitBook
On this page
  • Setup
  • Block Entity Type Injection
  • Point of Interest Type Injection
  • Block State Property Injection
  1. Packages

Block Injection API

Injection utilities related to blocks.

Setup

repositories {
    mavenCentral()
}

dependencies {
    modImplementation 'dev.creoii.creoapi:creo-block-injection-api:<VERSION>'
}
repositories {
    mavenCentral()
}

dependencies {
    modImplementation("dev.creoii.creoapi:creo-block-injection-api:<VERSION>")
}

Block Entity Type Injection

BlockEntityTypeInjection.java
public static void inject(BlockEntityType<?> blockEntityType, Block block);

public static void inject(BlockEntityType<?> blockEntityType, Block... blocks);

The methods above are used to inject a BlockEntityType into a block or group of blocks.

Point of Interest Type Injection

PointOfInterestTypeInjection.java
public static void inject(RegistryKey<PointOfInterestType> poi, BlockState state);

public static void inject(RegistryKey<PointOfInterestType> poi, Block block);

public static void inject(RegistryKey<PointOfInterestType> poi, BlockState... states);

public static void inject(RegistryKey<PointOfInterestType> poi, Block... blocks);

The methods above are used to inject a PointOfInterestType into a block, blockstate, or group of either. Injecting into a block will inject the PointOfInterestType into all of its blockstates.

Block State Property Injection

BlockStatePropertyInjection.java
public static <T extends Comparable<T>> void inject(Property<T> property, Block block);

public static <T extends Comparable<T>> void inject(Property<T> property, Block... blocks);

public static <T extends Comparable<T>> void inject(Property<T> property, @Nullable T defaultValue, Block block);

public static <T extends Comparable<T>> void inject(Property<T> property, @Nullable T defaultValue, Block... blocks);

The methods above are used to inject BlockState Properties into a block, optionally with a defaultValue.

PreviousBlock APINextContent Modification API

Last updated 1 year ago