Frankly, I have no idea what tolua.setpeer() does, it is not exported by MCS, but rather by the Tolua++ glue code generator itself.
You cannot read other plugins' memory at all.
1. Each plugin runs in a separate Lua context, there's no way to leave a context in a plugin; the cPlugin:Call() function actually copies stuff from one context to the other in order to make the call.
2. Even if you did have a way of reading other plugins' memory, you couldn't use it because potentially the plugins may run in parallel - for example one plugin serving a webadmin page while the other is ticking the world. You know what happens in thread-unsafe accesses, right?
End portals should be okay. Nether portals are currently probably not possible for one simple reason - they require the player to be in some kind of "limbo" while the world around them gets generated and *then* the portal gets placed. MCS doesn't yet have the concept of this limbo, players in MCS need to always have specific coordinates in a world and then all the physics from the surroundings is applied to them.
Another sub-reason is that plugins cannot force MCS to keep chunks in memory so that they can look for a suitable portal placement. A special class, cChunkStay, is used in MCS code, but it's not available in the API (yet?)
You cannot read other plugins' memory at all.
1. Each plugin runs in a separate Lua context, there's no way to leave a context in a plugin; the cPlugin:Call() function actually copies stuff from one context to the other in order to make the call.
2. Even if you did have a way of reading other plugins' memory, you couldn't use it because potentially the plugins may run in parallel - for example one plugin serving a webadmin page while the other is ticking the world. You know what happens in thread-unsafe accesses, right?
(01-03-2014, 08:50 AM)ThuGie Wrote: Just wondering, but what is currently stopping us from, creating a plugin that handles end portals + nether portals ?
End portals should be okay. Nether portals are currently probably not possible for one simple reason - they require the player to be in some kind of "limbo" while the world around them gets generated and *then* the portal gets placed. MCS doesn't yet have the concept of this limbo, players in MCS need to always have specific coordinates in a world and then all the physics from the surroundings is applied to them.
Another sub-reason is that plugins cannot force MCS to keep chunks in memory so that they can look for a suitable portal placement. A special class, cChunkStay, is used in MCS code, but it's not available in the API (yet?)