Skip to content

CakeComponent

Parameters

NameTypeDefaultDescription
stateNameStringmorefood:slice
maxSlicesNumber6

Methods

onPlayerInteract

placeCandle

eat

addCandleCake

Example

js
var cake = new CakeComponent("slice", 6);
cake.addCandleCake("minecraft:candle", "minecraft:candle_cake");

Not associated with or approved by Mojang Studios or Microsoft