Cuberite Forum
Command block 1.9-1.12 and daylight sensor don't work? - Printable Version

+- Cuberite Forum (https://forum.cuberite.org)
+-- Forum: Cuberite (https://forum.cuberite.org/forum-4.html)
+--- Forum: Discussion (https://forum.cuberite.org/forum-5.html)
+--- Thread: Command block 1.9-1.12 and daylight sensor don't work? (/thread-2978.html)



Command block 1.9-1.12 and daylight sensor don't work? - IronWolf - 06-16-2017

Hi,
I would like to move my server to cuberite, but I have 2 problems.

Its possible to use commandblocks from new version of minecraft? 

What limitations have command block?

Why daylight sensor not work, its posible to fix it?

thank you for all information


RE: Command block 1.9-1.12 and daylight sensor don't work? - xoft - 06-16-2017

Hello, welcome to the forum.

There is some initial support for commandblocks, but basically they don't work as you'd expect from Vanilla. For this reason, they need to be explicitly allowed in the configuration, they are disabled by default.

Daylight sensors haven't been implemented yet.


RE: Command block 1.9-1.12 and daylight sensor don't work? - IronWolf - 06-16-2017

its bad information for me Sad

so i must rewrite all my command block to plugins. Its posible to detect the word time in plugins?


RE: Command block 1.9-1.12 and daylight sensor don't work? - Mathias - 06-17-2017

The normal command block (id 137) works, but the GUI for editing its command doesn't work in 1.9-1.12 right now due to changes in Minecraft. It's quite useless though, since it can only run console commands at the moment.

Besides switching to 1.8, you can edit it by using plugins. I've attached an example plugin.


RE: Command block 1.9-1.12 and daylight sensor don't work? - Mathias - 06-17-2017

(06-16-2017, 11:46 PM)IronWolf Wrote: Its posible to detect the word time in plugins?

You can use GetTimeOfDay. For example


Code:
Player:GetWorld():GetTimeOfDay()


will give the world time in ticks for the world a player is in.

Code:
cRoot:Get():GetWorld("worldname"):GetTimeOfDay()
will give the time of the specified world.

https://api.cuberite.org/cWorld.html