Content Modification API

Utilities to modify vanilla content such as blocks, items, and entities.

Setup

repositories {
    mavenCentral()
}

dependencies {
    modImplementation 'dev.creoii.creoapi:creo-content-modification-api:<VERSION>'
}

Block Modification

BlockModification.INSTANCE
// Set a new hardness value for the block.
void setHardness(Block block, float hardness);

// Set a new hardness value for the BlockState.
void setHardness(BlockState state, float hardness);

// Set a new resistance value for the block.
void setResistance(Block block, float resistance);

// Set both the hardness and resistance for the block.
void setStrength(Block block, float hardness, float resistance);

// Set both the hardness and resistance for the block.
void setStrength(Block block, float strength);

// Set a new SoundGroup for the block.
void setSoundGroup(Block block, BlockSoundGroup soundGroup);

// Set a new slipperiness value for the block.
void setSlipperiness(Block block, float slipperiness);

// Set a new luminance value for the block.
void setLuminance(Block block, int luminance);

// Set a new resistance value for the BlockState.
void setLuminance(BlockState state, int luminance);

// Set a new MapColor for the block.
void setMapColor(Block block, MapColor mapColor);

// Set a new MapColor for the BlockState.
void setMapColor(BlockState state, MapColor mapColor);

// Get the MapColor of the block.
MapColor getMapColor(Block block);

// Get the MapColor of the BlockState.
MapColor getMapColor(BlockState state);

// Set a new velocity multiplier value for the block.
void setVelocityMultiplier(Block block, float velocityMultiplier);

// Set a new jump velocity multiplier value for the block.
void setJumpVelocityMultiplier(Block block, float jumpVelocityMultiplier);

// Set whether the block has dynamic bounds.
void setDynamicBounds();

// Set whether the block ticks randomly.
void setRandomTicks(Block block, boolean randomTicks);

// Set whether a tool is required to mine the block.
void setToolRequired(Block block, boolean toolRequired);

// Set whether a tool is required to mine the blockstate.
void setToolRequired(BlockState state, boolean toolRequired);

// Set the loot table identifier of the block.
void setLootTableId(Block block, Identifier lootTableId);

// Set whether the block is opaque.
void setOpaque(Block block, boolean opaque);

// Set whether the blockstate is opaque.
void setOpaque(BlockState state, boolean opaque);

// Set whether the block can be lit on fire by lava.
void setBurnable(Block block, boolean burnable);

// Set whether the BlockState can be lit on fire by lava.
void setBurnable(BlockState state, boolean burnable);

// Set a new PistonBehavior for the block.
void setPistonBehavior(Block block, PistonBehavior pistonBehavior);

// Set a new PistonBehavior for the BlockState.
void setPistonBehavior(BlockState state, PistonBehavior pistonBehavior);

// Set a new Instrument for the block.
void setInstrument(Block block, Instrument instrument);

// Set a new Instrument for the blockstate.
void setInstrument(BlockState state, Instrument instrument);

// Set whether the block has block break particles.
void setBlockBreakParticles(Block block, boolean blockBreakParticles);

// Set whether the blockstate has block break particles.
void setBlockBreakParticles(BlockState state, boolean blockBreakParticles);

// Set whether the block is replaceable.
void setReplaceable(Block block, boolean replaceable);

// Set whether the blockstate is replaceable.
void setReplaceable(BlockState state, boolean replaceable);

Item Modification

Entity Type Modification

Enchantment Modification

Status Effect Modification

Last updated