Random Chitchat 2012-2016
Yep. GTG out and do something, but I'll see about doing these later today.
Thanks given by:
(08-08-2013, 07:36 PM)xoft Wrote: Oh, by the way, the entity spawning hooks have been implemented and seem to work. I wonder what kind of plugins will this spark Smile
I still need to document them in the wiki, though.
Im planning to make a mob spawning plugin. When an entity spawn, it will check if if its in the right biome and if not, kill mob. One question, OnMonsterSpawned is called only when a monster is spawned or when an animal is spawned too?
Thanks given by:
Monster is anything "living", it equals Mob in the default terminology. We haven't yet settled the terminology down, sometimes we use Mob, sometimes Monster, but they are the same.
You can see that in the inheritance graph here:
http://mc-server.xoft.cz/wiki/API%20clas...tities.png


Behold the c++ template master. I have bent LuaState several times over until calling named Lua functions is almost as easy as calling a C++ function:
bool FirstReturnedValue = false;
int SecondReturnedValue = 0;
m_LuaState.Call("FunctionName", a_World, a_Player, cLuaState::Return, FirstReturnedValue, SecondReturnedValue);
This calls function FunctionName() that takes 2 args (World, Player) and returns 2 values (a bool and an int).

Pity that each combination of {#args, #returns} must be specifically written in cLuaState, but still, this is a major step-up.
Thanks given by:
Mob is a stupid name for an enemy/sentient/monster/whatever
Thanks given by:
I tried the latest rev and now when I break a block I get:
Quote:Error in plugin WorldEdit: Could not find function OnPlayerEating()
Thanks given by:
Oops, probably a mixed up constant in the cPlugin_NewLua. I'll fix it momentarily.

Fixed.

I'm glad that the error reporting in the new Lua interface works, I didn't try it out Smile

(08-09-2013, 12:17 AM)FakeTruth Wrote: Mob is a stupid name for an enemy/sentient/monster/whatever

On the other hand, Monster is a stupid name for sheep, chicken etc.Tongue

I personally like Mob better, especially because its meaning has kinda already stuck in the MC community.
Thanks given by: NiLSPACE
Yeah I think Mob is probably the best name - it's already established in minecraft and it doesn't get confusing whatever type it is.
Thanks given by:
Monster is not good either no :p You shouldn't encourage Notches strange naming of things :p
Thanks given by:
Should I be dumping the tests I write back into the source code as well?

Then we could have a script that would run the tests and report on failures that anybody could use.
Thanks given by:
What's up with the NoiseTest in the tests folder. It seems to test the speed of the noise gens. Anybody mind if I re-purpose the folder for different tests?
Thanks given by:




Users browsing this thread: 24 Guest(s)