Random Chitchat 2012-2016
How about cWorld:UpdateSign() ? Smile
It takes the coords, the texts and an optional cPlayer object of the player who's doing the change (may be nil). Never tested in the plugins, though, so it might not need to work really, or have a really weird assumption on parameters, who knows.
Thanks given by:
what are the parameters? becouse i tried to use it but it is also calling the OnUpdatingSign hook. and then i get an error becouse Player is nil.
Thanks given by:
The full C++ declaration:
void cWorld::UpdateSign(int a_BlockX, int a_BlockY, int a_BlockZ, const AString & a_Line1, const AString & a_Line2, const AString & a_Line3, const AString & a_Line4, cPlayer * a_Player)

It is designed to call the OnUpdatingSign callback - you simply cannot update a sign without this callback knowing.

It should be possible to pass a nil for a_Player; if that errors, it's probably an error in some plugin that expects to always get a valid cPlayer in OnUpdatingSign(). The error message should include the name of the plugin, maybe even location in the code, if you're lucky.

So the call should look like
World:UpdateSign(1000, 60, -1000, "text1", "text2", "text3", "text4", nil);
Thanks given by:
i think i now know the problem. becouse I change the blocktype in the OnUpdatingSign function from 63(standing sign) to 68(wall sign) and becouse of that you don't see any text until you relog.
Thanks given by:
cool, are we changing the license? To which one are going? Smile
Thanks given by:
It was just an idea, when I found out that our license is incompatible with a few of the SSL/Crypto libraries, I also considered this possibility. I don't really care about the license of my code, I'd even make it public domain Smile
Thanks given by:
how can I change the biome in a spot? i saw cChunkDesc has Setbiome but i don't know how to use that.
Thanks given by:
You cannot "change" in a spot, you either have to provide the entire 16x16 biomes or leave them as generated. That is, you have a chance to set biomes before the generator kicks in, so you can set yours, but you don't have access to those that the generator will generate (OnChunkGenerating); or you have access to the biomes *after* the entire chunk has been generated, you can change a single column's biome then, but it won't make any difference for the generator anymore (OnChunkGenerated).

Come to think of it, this isn't too useful for the plugins, I might rethink the callbacks in the chunk generator to give plugins more control.

There's one more point to this - some parts of the generator query neighboring chunk for data (Biomal height uses 3x3 chunk neighbors worth of biome data, Trees use 3x3 neighbors of Composition data), and those neighbors don't go through the callbacks at all, so even if you had a plugin that would set all biome to one value, the height generator won't work as expected, because it would still see the underlying biome generator in the neighbors.
Thanks given by:
well i'm trying to create a worldedit plugin. its working (kinda) but i also want a //setbiome command in there so i can't realy use the OnChunkGenerating hook :S
Thanks given by:
My Worldedit plugin is working greatBig Grin not that it is finished, but it is super fastBig Grin i am using cBlockArea Smile
if you want to try it here is the github link: https://github.com/STRWarrior/WorldEdit
Thanks given by: tonibm19




Users browsing this thread: 12 Guest(s)