MCPcopy Index your code
hub / github.com/GregTech6/gregtech6 / mark

Method mark

src/main/java/gregapi/util/WD.java:314–327  ·  view source on GitHub ↗

Marks a Chunk dirty so it is saved

(World aWorld, int aX, int aZ)

Source from the content-addressed store, hash-verified

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

Callers 6

onWorldTickMethod · 0.95
onPlayerInteractionMethod · 0.95
updateEntityMethod · 0.95
move_Method · 0.95
putMethod · 0.95

Calls 2

getBlockMetadataMethod · 0.80
printlnMethod · 0.80

Tested by

no test coverage detected