Skip to content

Instantly share code, notes, and snippets.

@ihatecsv
Created January 3, 2016 03:43
Show Gist options
  • Save ihatecsv/9f0fc73f8b1d69a0395c to your computer and use it in GitHub Desktop.
Save ihatecsv/9f0fc73f8b1d69a0395c to your computer and use it in GitHub Desktop.
else{
System.out.println("Handled");
RadiationEventHandler.chunkList.put(chunk, new ArrayList<Point3D>());
int modCornerX = n*16;
int modCornerZ = m*16;
for(int i = modCornerX; i <= modCornerX+15; i++){
for(int k = modCornerZ; k <= modCornerZ+15; k++){
for(int j = 0; j <= 255; j++){
Block sourceBlock = player.worldObj.getBlock(i, j, k);
int sourceMeta = player.worldObj.getBlockMetadata(i, j, k);
String sourceModId = GameRegistry.findUniqueIdentifierFor(sourceBlock).modId;
String sourceName = GameRegistry.findUniqueIdentifierFor(sourceBlock).name;
RadObj source = RadObjects.findObj(sourceModId + ":" + sourceName + "/" + sourceMeta);
if(source != null){
RadiationEventHandler.chunkList.get(chunk).add(new Point3D(i, j, k));
System.out.println("P-Found new sourceblock at " + i + ", " + j + ", " + k);
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment