Cuberite Forum
Random Chitchat 2012-2016 - Printable Version

+- Cuberite Forum (https://forum.cuberite.org)
+-- Forum: Off Topic (https://forum.cuberite.org/forum-9.html)
+--- Forum: Off Topic Discussion (https://forum.cuberite.org/forum-10.html)
+--- Thread: Random Chitchat 2012-2016 (/thread-434.html)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487


RE: What we're doing - xoft - 04-30-2013

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.


RE: What we're doing - NiLSPACE - 04-30-2013

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.


RE: What we're doing - xoft - 04-30-2013

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);



RE: What we're doing - NiLSPACE - 04-30-2013

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.


RE: What we're doing - keyboard - 04-30-2013

cool, are we changing the license? To which one are going? Smile


RE: What we're doing - xoft - 04-30-2013

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


RE: What we're doing - NiLSPACE - 04-30-2013

how can I change the biome in a spot? i saw cChunkDesc has Setbiome but i don't know how to use that.


RE: What we're doing - xoft - 05-01-2013

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.


RE: What we're doing - NiLSPACE - 05-01-2013

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


RE: What we're doing - NiLSPACE - 05-01-2013

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