Skip to content

Block Types

BlockType is an asset that defines a block’s properties and behavior. It’s loaded from JSON files in the blocktype/ directory.

com.hypixel.hytale.server.core.asset.type.blocktype.config.BlockType

MyPlugin_CustomBlock.json
{
"Id": "MyPlugin_CustomBlock",
"Group": "MyBlocks",
"DrawType": "Cube",
"Material": "Stone",
"Opacity": "Solid",
"Textures": [
{
"Up": "textures/block_top.png",
"Down": "textures/block_bottom.png",
"North": "textures/block_side.png",
"South": "textures/block_side.png",
"East": "textures/block_side.png",
"West": "textures/block_side.png"
}
],
"HitboxType": "Full",
"BlockSoundSetId": "Hytale/Stone"
}
PropertyTypeDescription
DrawTypeDrawTypeHow the block is rendered (Cube, Model, Empty)
TexturesBlockTypeTextures[]Textures for each face
CustomModelstringPath to custom 3D model
CustomModelTexturearrayTextures for custom model
CustomModelScalefloatScale factor for model (default: 1.0)
CustomModelAnimationstringAnimation for model
OpacityOpacityLight blocking (Solid, Transparent, SemiTransparent)
RequiresAlphaBlendingboolEnable alpha blending
CubeShadingModeShadingModeShading style (Standard, etc.)
EffectShaderType[]Shader effects
PropertyTypeDescription
MaterialBlockMaterialPhysical material type
HitboxTypestringCollision hitbox type (Full, etc.)
InteractionHitboxTypestringHitbox for interactions
MovementSettingsobjectMovement modifiers on block
PropertyTypeDescription
LightColorLightEmitted light color and intensity
TintColor[]Color tint per face
TintUp/Down/North/South/East/WestColor[]Per-face tints
BiomeTintintBiome color application
ParticleColorColorParticle tint
ParticlesModelParticle[]Block-attached particles
BlockParticleSetIdstringParticle set for interactions
PropertyTypeDescription
BlockSoundSetIdstringSound set for block events
AmbientSoundEventIdstringLooping ambient sound
InteractionSoundEventIdstringSound on interaction
LoopingboolWhether ambient sound loops
PropertyTypeDescription
RandomRotationRandomRotationRandom rotation on placement
VariantRotationVariantRotationVariant-based rotation
FlipTypeBlockFlipTypeFlip behavior
RotationYawPlacementOffsetRotationYaw offset when placed
PropertyTypeDescription
SupportmapRequired support per face
SupportingmapSupport provided to neighbors
SupportDropTypeSupportDropTypeWhat happens when support lost
MaxSupportDistanceintMaximum support reach (0-14)
SupportsRequiredForenumWhen support is checked
IgnoreSupportWhenPlacedboolBypass support on placement

See Block Physics for detailed support system documentation.

PropertyTypeDescription
Flags.IsUsableboolCan be used/interacted with
Flags.IsStackableboolCan be stacked on top
InteractionsmapInteraction handlers
BenchobjectCrafting bench configuration
GatheringobjectResource gathering settings
PlacementSettingsobjectPlacement restrictions (see BlockPlacementSettings)
SeatsarraySeating mount points
BedsarrayBed mount points
IsDoorboolDoor behavior (deprecated)
DamageToEntitiesintContact damage
PropertyTypeDescription
StateStateDataBlock state configuration
BlockEntityHolderECS components for block entity
TickProcedureobjectBlock tick behavior

See Block States and Block Ticking for details.

ValueDescription
EmptyInvisible, no rendering
GizmoCubeGizmo cube rendering
CubeStandard cube block
ModelCustom 3D model
CubeWithModelCube with attached 3D model
ValueDescription
EmptyNo physical material
SolidGeneric solid
ValueDescription
BREAKBlock breaks and drops items
DESTROYBlock is destroyed with no drops
Getting BlockType references
// Get by ID
BlockType stone = BlockType.getAssetMap().get("Rock_Stone");
// Get from world position
World world = Universe.get().getDefaultWorld();
BlockType type = world.getBlockType(x, y, z);
// Get block ID (numeric)
int blockId = world.getBlock(x, y, z);
// Check special blocks
BlockType.EMPTY // Air block
BlockType.UNKNOWN // Unknown block placeholder
Setting blocks in the world
// Simple set
world.setBlock(x, y, z, blockType);
// With settings
SetBlockSettings settings = new SetBlockSettings();
settings.setNotifyNeighbors(true);
settings.setUpdateLighting(true);
settings.setTriggerBlockUpdate(true);
world.setBlock(x, y, z, blockType, settings);
MethodDescription
setNotifyNeighbors(boolean)Trigger neighbor updates
setUpdateLighting(boolean)Recalculate lighting
setTriggerBlockUpdate(boolean)Trigger block update event
setDropItems(boolean)Drop items when replacing

Define interactions in the block type:

Block with interactions
{
"Interactions": {
"Primary": "MyPlugin_PrimaryInteraction",
"Secondary": "MyPlugin_SecondaryInteraction"
},
"InteractionHint": "ui.interaction.open"
}

Blocks can connect to neighbors for visual continuity (fences, glass panes, etc.).

Connected block configuration
{
"ConnectedBlockRuleSet": {
"Rules": [
{
"Condition": { "Type": "SameBlock" },
"Connect": true
}
]
}
}