Sulfur Cube Archetypes

Sulfur cube archetypes are data-driven JSON files that control the attribute modifiers, buoyancy, and valid item contents of a sulfur cube. Each archetype is referenced by its file name and can be assigned to sulfur cube entities to change their behavior.

File Structure

data/<namespace>/sulfur_cube_archetype/<name>.json
Null

Creating an Archetype

Use sulfurCubeArchetype on your DataPack. Pass an ItemTagArgument describing which items the sulfur cube can hold, then add attribute modifiers with modifier:

import io.github.ayfri.kore.commands.AttributeModifierOperation
import io.github.ayfri.kore.features.sulfurcubearchetype.modifier
import io.github.ayfri.kore.features.sulfurcubearchetype.sulfurCubeArchetype
import io.github.ayfri.kore.generated.Attributes
import io.github.ayfri.kore.generated.Tags

datapack.sulfurCubeArchetype("regular", items = Tags.Item.SWORDS) {
	buoyant = true

	modifier(
		amount = 4.0,
		attribute = Attributes.MAX_HEALTH,
		id = "sulfur_cube_archetype:regular",
		operation = AttributeModifierOperation.ADD_VALUE,
	)
}
Kotlin

SulfurCubeArchetype Fields

Field Type Description
attributeModifiers MutableList<SulfurCubeArchetypeAttributeModifier> Attribute modifiers applied while the archetype is active.
buoyant Boolean Whether the sulfur cube floats on liquids.
items ItemTagArgument Item tag defining which items the sulfur cube can hold. Required.

SulfurCubeArchetypeAttributeModifier Fields

Field Type Description
amount Double The amount applied by the modifier.
attribute AttributeArgument The attribute being modified.
id String The identifier of the modifier.
operation AttributeModifierOperation How amount is combined with the attribute's base value.

See Also

External Resources