[Solved] Make a structure's spawner in VoxeLibre use a specific mob

Post Reply
User avatar
Blockhead
Moderator
Posts: 2984
Joined: Wed Jul 17, 2019 10:14
GitHub: Montandalar
IRC: Blockhead256
In-game: Blockhead Blockhead256
Location: Land Down Under
Contact:

[Solved] Make a structure's spawner in VoxeLibre use a specific mob

by Blockhead » Post

I am reposting this discussion from the Luanti Matrix with permission. Here is some info about placing structures in VoxeLibre and setting up mob spawners inside of them.
hunter0one wrote: Does anyone know how to make a spawner in a schematic made in VoxeLibre use a specific mob, like a fire elemental? I used a spawn egg to replace the spawner and created a schematic of the structure but now when it spawns naturally the mod the mob spawner is empty.

This is for a fork of VoxeLibre
Blockhead256 wrote: spawners from mcl_mobspawners use a metadata property on the node called "Mob" https://git.minetest.land/VoxeLibre/Vox ... t.lua#L157

VoxeLibre/mods/ITEMS/mcl_mobspawners/init.lua at f3e7dcd29dc2decb700a6692daf9c7a977798e11 - Mesehub
VoxeLibre - VoxeLibre (formerly known as MineClone2), a voxel-based sandbox game for Minetest
maybe your current schematic format doesn't support metadata, if it's the basic MTS format from the engine I don't think that one does. WorldEdit's format does
hunter0one wrote: Maybe so, I was using schemedit
Blockhead256 wrote: yes, that's the same MTS format
hunter0one wrote: I just used WorldEdit and it also spawned an empty spawner
Well I guess because I used MTS format, but all the other structures in VL seem to use MTS
Blockhead256 wrote: VoxeLibre will have code that adds stuff to the structures after placing the schematics, so you will need some like that
hunter0one wrote: I'll try and find that, thanks

I found it, there is an after_place value for mcl_structures:register_structure and you can add a function to find spawners and change them to a specific kind
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂

User avatar
Blockhead
Moderator
Posts: 2984
Joined: Wed Jul 17, 2019 10:14
GitHub: Montandalar
IRC: Blockhead256
In-game: Blockhead Blockhead256
Location: Land Down Under
Contact:

Re: [Solved] Make a structure's spawner in VoxeLibre use a specific mob

by Blockhead » Post

repetitivestrain, developer of Mineclonia, also comments to let us know:
repetitivestrain wrote: Btw, you would conceivably be better served by mineclonia in such applications
since mineclonia's structure blocks and structure templates will record node metadata automatically
without any requirement for additional code
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests