forked from VoxeLibre/VoxeLibre
1.2 KiB
1.2 KiB
mcl_cauldrons
This mod add an API to add cauldrons to mcl.
mcl_cauldrons.is_cauldron(name)
return true if name is cauldron, false overwise.
mcl_cauldrons.get_cauldron_string(type, level)
return itemstring of cauldron with and
e.g: mcl_cauldrons.get_cauldron_string("water", 1) --return itemstring of a water cauldron with 1 level of water
mcl_cauldrons.take_cauldron(pos, itemstack, user, sounds)
empty cauldron at pos
return bucket
field of the cauldron def if user is player, itemstack overwise.
- pos: position of the cauldron
- itemstack: will be return if
bucket
field isn't defined in cauldron def or user is nil or not player. - user: player who takes cauldron
- sounds: sounds table. If not nil, dug sound will be played.
mcl_cauldrons.register_cauldron_type(def)
def can have these fields:
- name: name of the liquid e.g: "water"
- bucket: string of the bucket item. can be nil. e.g: "mcl_buckets:bucket_water"
- desc: description of the item. %s will be replaced by the level. e.g: "Water Cauldron %s/3 full"
- texture: texture of the flowing liquid e.g: "mcl_core_water_flowing.png"
mcl_cauldrons.registered_cauldrons
Table containing chauldrons def indexed by name.