Commit fdeb7c6
committed
Minimal fix for Drone in 1.13
The deprecated Block.setTypeIdAndData method that the Drone was using
was finally removed from the Bukkit API as part of the 1.13 update.
There is no longer a method on the Block interface that can work with
the old numeric block IDs.
Fortunately, CraftBukkit/Spigot now has a `CraftEvil` class offering
a static `setTypeIdAndData` method that maps the old IDs to the new
API. It is definitely not future-proof but allows us to run on 1.13
until we come up with a way to use the more recent API without breaking
a lot of existing ScriptCraft code.
This patch simply detects when the `Block.setTypeIdAndData` is missing
and tries to use the `CraftEvil` class instead.1 parent 0a6fe18 commit fdeb7c6
1 file changed
Lines changed: 28 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
326 | 326 | | |
327 | 327 | | |
328 | 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 | + | |
329 | 356 | | |
330 | 357 | | |
331 | 358 | | |
| |||
349 | 376 | | |
350 | 377 | | |
351 | 378 | | |
352 | | - | |
353 | | - | |
| 379 | + | |
354 | 380 | | |
355 | 381 | | |
356 | 382 | | |
| |||
0 commit comments