Marks a Chunk dirty so it is saved
(World aWorld, int aX, int aZ)
| 312 | |
| 313 | /** Marks a Chunk dirty so it is saved */ |
| 314 | public static boolean mark(World aWorld, int aX, int aZ) { |
| 315 | if (aWorld == null || aWorld.isRemote) return F; |
| 316 | Chunk aChunk = aWorld.getChunkFromBlockCoords(aX, aZ); |
| 317 | if (aChunk == null) { |
| 318 | aWorld.getBlockMetadata(aX, 0, aZ); |
| 319 | aChunk = aWorld.getChunkFromBlockCoords(aX, aZ); |
| 320 | if (aChunk == null) { |
| 321 | ERR.println("Some important Chunk does not exist for some reason at Coordinates X: " + aX + " and Z: " + aZ); |
| 322 | return F; |
| 323 | } |
| 324 | } |
| 325 | aChunk.setChunkModified(); |
| 326 | return T; |
| 327 | } |
| 328 | /** Marks a Chunk dirty so it is saved */ |
| 329 | public static boolean mark(Object aTileEntity) { |
| 330 | return aTileEntity instanceof TileEntity && mark(((TileEntity)aTileEntity).getWorldObj(), ((TileEntity)aTileEntity).xCoord, ((TileEntity)aTileEntity).zCoord); |
no test coverage detected