MCPcopy Create free account
hub / github.com/GregTech6/gregtech6 / replace

Method replace

src/main/java/gregapi/util/WD.java:504–509  ·  view source on GitHub ↗
(World aWorld, int aX, int aY, int aZ, Block aReplaceBlock, long aReplaceMeta, Block aTargetBlock, long aTargetMeta)

Source from the content-addressed store, hash-verified

502 }
503
504 public static boolean replace(World aWorld, int aX, int aY, int aZ, Block aReplaceBlock, long aReplaceMeta, Block aTargetBlock, long aTargetMeta) {
505 if (aTargetBlock == null || aReplaceBlock == null) return F;
506 if (aReplaceBlock != block(aWorld, aX, aY, aZ)) return F;
507 if (aReplaceMeta != W && aReplaceMeta != meta(aWorld, aX, aY, aZ)) return F;
508 return aWorld.setBlock(aX, aY, aZ, aTargetBlock, Code.bind4(aTargetMeta), 2);
509 }
510 public static boolean replace(World aWorld, ChunkCoordinates aCoords, Block aReplaceBlock, long aReplaceMeta, Block aTargetBlock, long aTargetMeta) {
511 return replace(aWorld, aCoords.posX, aCoords.posY, aCoords.posZ, aReplaceBlock, aReplaceMeta, aTargetBlock, aTargetMeta);
512 }

Callers 4

replaceAllMethod · 0.95
getDeathMessageMethod · 0.80
getCommonSuperClassMethod · 0.80
getCommonSuperClassMethod · 0.80

Calls 4

blockMethod · 0.95
metaMethod · 0.95
bind4Method · 0.95
setBlockMethod · 0.45

Tested by

no test coverage detected