Horje
Iterate through a player's current chunk in minecraft forge Code Example
Iterate through a player's current chunk in minecraft forge

EntityPlayer player = Minecraft.getMinecraft().player;
World world = player.getEntityWorld();
Chunk chunk  = world.getChunkFromBlockCoords(player.getPosition());

for ( double x = 0; x <= 15; x++) {  
	for( double y = 0; y <= 255; y++ ) {
		for( double z = 0; z <= 15; z++ ) {
      
			BlockPos actualPosition = new BlockPos(x,y,z);
           	IBlockState state = chunk.getBlockState(actualPosition);
      		//do stuff
      		
    	}
  	}
}




Java

Related
how does plus works in Java Code Example how does plus works in Java Code Example
java swing swap panels Code Example java swing swap panels Code Example
java println format Code Example java println format Code Example
authentication in spring boot Code Example authentication in spring boot Code Example
nqueen problem with python Code Example nqueen problem with python Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
9