Coming to Cuberite Lua from ROBLOX Lua
#2
Hello, welcome to the forum.
I suppose intuitivity is subjective. For me personally, it is quite hard to see why >>Instance.new("Part", game.Workspace)<< would create a cube, and if I were to think "I want to create a cube, how do I go about it?" it would probably be quite long before I stumbled on the correct API for this (whatever Instance is).

The Cuberite universe is more centered about a hierarchy of objects that is feels natural to anyone who has played Minecraft for some time - there's a world that contains blocks and entities, so if you want to change a block or create an entity, you know that you need to ask the world object to do that for you. Also Cuberite needs its plugins performant. If you want to change a cube of 50 x 50 x 50 blocks (which is not that much in Minecraft terms), the plugin will have to manipulate 125'000 blocks, and that already takes some time. Considering that a plugin may be called 20 times per second (the World Tick thread), and the numbers quickly add up. So it follows that the API is built to help speed.

The only advice I can offer is the same I offer to anyone new to Cuberite plugins: Learn by example. Look at a few plugins, see how they work and go from there.
Reply
Thanks given by:


Messages In This Thread
Coming to Cuberite Lua from ROBLOX Lua - by dusk - 10-23-2017, 02:32 PM
RE: Coming to Cuberite Lua from ROBLOX Lua - by xoft - 10-23-2017, 05:00 PM



Users browsing this thread: 3 Guest(s)