MCPcopy Create free account
hub / github.com/cabaletta/baritone / getRegionID

Method getRegionID

src/main/java/baritone/cache/CachedWorld.java:283–289  ·  view source on GitHub ↗

Returns the region ID based on the region coordinates. 0 will be returned if the specified region coordinates are out of bounds. @param regionX The region X coordinate @param regionZ The region Z coordinate @return The region ID

(int regionX, int regionZ)

Source from the content-addressed store, hash-verified

281 * @return The region ID
282 */
283 private long getRegionID(int regionX, int regionZ) {
284 if (!isRegionInWorld(regionX, regionZ)) {
285 return 0;
286 }
287
288 return (long) regionX & 0xFFFFFFFFL | ((long) regionZ & 0xFFFFFFFFL) << 32;
289 }
290
291 /**
292 * Returns whether or not the specified region coordinates is within the world bounds.

Callers 3

pruneMethod · 0.95
getRegionMethod · 0.95
getOrCreateRegionMethod · 0.95

Calls 1

isRegionInWorldMethod · 0.95

Tested by

no test coverage detected