Cuberite Forum
[SOLVED] Set chests by plaugin - Printable Version

+- Cuberite Forum (https://forum.cuberite.org)
+-- Forum: Plugins (https://forum.cuberite.org/forum-1.html)
+--- Forum: Plugin Discussion (https://forum.cuberite.org/forum-8.html)
+--- Thread: [SOLVED] Set chests by plaugin (/thread-2328.html)



[SOLVED] Set chests by plaugin - DrMasik - 01-21-2016

Is it possible to create chests into world by plugin?
I'm can't find how to do it.


RE: Set chests by plaugin - NiLSPACE - 01-22-2016

Use cWorld:SetBlock(BlockX, BlockY, BlockZ, E_BLOCK_CHEST, Meta). Then you can use cWorld:DoWithChestAt(BlockX, BlockY, BlockZ, CallbackFunction) to change it's contents if wanted.


RE: Set chests by plaugin - DrMasik - 01-22-2016

I't does not work.


RE: Set chests by plaugin - NiLSPACE - 01-22-2016

What doesn't work, setting the chest block, or filling it with the callback?

I believe the minimum blockmeta for chests is 2. Try setting it to that.


RE: Set chests by plaugin - Seadragon91 - 01-22-2016

Check that you use for chest the meta value of 2 to 5. A meta value of 0 makes the chest invisible.


RE: Set chests by plaugin - DrMasik - 01-22-2016

I spent 18 hours in order to somehow solve the problem. A decision was so close Sad(((
Thank you very much, NiLSPACE and Seadragon91.