Hook Question
#31
FakeTruth, even with the best optimizations there are situations that you won't handle well. Even the vanilla client has troubles with some things. I remember when I was toying with the terrain generator, that I accidentally generated terrain that had too many block faces exposed to air - think "20% stone to 80% air dithering". The client would halt and finally, after half an hour, crash.

Your optimization could be broken in the same way - an alternating pattern of cobble, mossy cobble and air.

I'm not saying that it's normal, I'm just saying that there are cases that you won't be able to handle well. The question is, is anyone gonna get into such a situation? And if so, is there a better solution?
Reply
Thanks given by:
#32
So what if there's gonna be a situation like that, the server's not gonna blow up just because it's storing a bit of data. Besides, this pattern will disappear sooner or later because all cobblestone will become mossy.
And yes I know the client has trouble with things, it's ridiculous, they should fix that stuff. When you say "even" you make it sound like the Minecraft client is a genius piece of software architectureTongue
Reply
Thanks given by:
#33
One question about OnBlockToPickups hook.
When a player breaks sugarcane/cacti, all blocks above are digged and a pickup it's spawned, would this be a natural reason (no Digger) or would there be a digger?
Reply
Thanks given by:
#34
I think it would be a natural reason.
Reply
Thanks given by:
#35
Could you add an OnFished hook? I'd like to add fisherman job to Jobs.
Something like
function OnFished(Player, Result)
Result would be the item player got fishing.
Reply
Thanks given by:
#36
Nice idea. Make it a set of two - OnFishing(Player, ResultItem) that is fired just as the player decided to reel in and could override the result, and OnFished(Player, ResultItem) that is fired as a notification only after the catch has been decided.
Reply
Thanks given by:
#37
I'll implent it tomorrow if I have time.

I was bored so I did it today ;( Sorry Smile
Reply
Thanks given by:
#38
The OnPlayerFished and OnPlayerFishing is implented.
Reply
Thanks given by: tonibm19 , Taugeshtu
#39
What about an OnPlayerTick hook? Like OnPlayerMoving, but called every tick.
Reply
Thanks given by:
#40
You have OnWorldTick() and cWorld::ForEachPlayer()
Reply
Thanks given by:




Users browsing this thread: 11 Guest(s)